Sync from SUSE:SLFO:Main gdb revision 3f92f2fdda83ad5ab43bdecff7dbb9dd

This commit is contained in:
2025-05-30 17:04:49 +02:00
parent 6efde559c9
commit 3c43a04cdc
91 changed files with 1778 additions and 17700 deletions

View File

@@ -1,9 +1,7 @@
From 0bb6f49bb9ad577667075550ca2ad4cb49931078 Mon Sep 17 00:00:00 2001
From 6634dd948f02d1f7bd5c0a952899620276b1c260 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Thu, 18 Apr 2024 14:27:04 +0200
Subject: [PATCH 2/2] gdb-cli-add-ignore-errors-command
[gdb/cli] Add ignore-errors command
Date: Mon, 7 Apr 2025 16:19:48 +0200
Subject: [PATCH] [gdb/cli] Add ignore-errors command
While trying to reproduce a failing test-case from the testsuite on the
command line using a gdb command script, I ran into the problem that a command
@@ -75,10 +73,10 @@ gdb/testsuite/ChangeLog:
create mode 100644 gdb/testsuite/gdb.base/ignore-errors.gdb
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index cfe7b71b0b7..0ae5530c558 100644
index 0140c717ca2..c244eebbdf7 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -40,6 +40,7 @@
@@ -39,6 +39,7 @@
#include "location.h"
#include "block.h"
#include "valprint.h"
@@ -86,7 +84,7 @@ index cfe7b71b0b7..0ae5530c558 100644
#include "ui-out.h"
#include "interps.h"
@@ -2544,6 +2545,34 @@ shell_internal_fn (struct gdbarch *gdbarch,
@@ -2572,6 +2573,34 @@ shell_internal_fn (struct gdbarch *gdbarch,
return value::allocate_optimized_out (int_type);
}
@@ -121,10 +119,10 @@ index cfe7b71b0b7..0ae5530c558 100644
void _initialize_cli_cmds ();
void
_initialize_cli_cmds ()
@@ -2942,4 +2971,10 @@ when GDB is started."), GDBINIT).release ();
@@ -2972,4 +3001,10 @@ when GDB is started."), GDBINIT).release ();
c = add_cmd ("source", class_support, source_command,
source_help_text, &cmdlist);
set_cmd_completer (c, filename_completer);
set_cmd_completer (c, deprecated_filename_completer);
+
+ c = add_cmd ("ignore-errors", class_support, ignore_errors_command,
+ _("Execute a single command, ignoring all errors.\n"
@@ -133,10 +131,10 @@ index cfe7b71b0b7..0ae5530c558 100644
+ set_cmd_completer (c, ignore_errors_command_completer);
}
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 1abf91c4470..c277c16297c 100644
index 47c538520ab..b830d42da72 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -29250,7 +29250,8 @@ The lines in a command file are generally executed sequentially,
@@ -29472,7 +29472,8 @@ The lines in a command file are generally executed sequentially,
unless the order of execution is changed by one of the
@emph{flow-control commands} described below. The commands are not
printed as they are executed. An error in any command terminates
@@ -146,7 +144,7 @@ index 1abf91c4470..c277c16297c 100644
@value{GDBN} first searches for @var{filename} in the current directory.
If the file is not found there, and @var{filename} does not specify a
@@ -29345,6 +29346,11 @@ the controlling expression.
@@ -29567,6 +29568,11 @@ the controlling expression.
@item end
Terminate the block of commands that are the body of @code{if},
@code{else}, or @code{while} flow-control commands.
@@ -196,6 +194,8 @@ index 00000000000..5962ff49b11
@@ -0,0 +1,2 @@
+ignore-errors run
+echo here\n
--
2.35.3
base-commit: 1398f45a2641e0e9e0e331681655404ae1d4ed97
--
2.43.0