- Rebase to 8.1 release:
* ptype/o prints offsets and sizes of members (like pahole) * tab-completion improved: quoting function names is not generally necessary anymore, completion offers for breakpoint don't include data symbol * enable/disable breakpoints now accept ranges: 'disable 1.3-5' * new commands: - set/show cwd: working directory of debuggee - set/show compile-gcc: program to use for 'compile' command - starti: start program and stop at first instruction - TUI single-key commands: 'i' for stepi and 'o' for nexti * --readnever option disables any reading of debug info (for dumping) * s390: guarded storage register access for z14 * gcore option -a dumps all memory mapping * C++ breakpoints: 'b foo' will now set a breakpoint on all functions and methods named 'foo' no matter the scope. Use -qualified if you don't want that * python scripting: new events gdb.new_inferior, gdb.inferior_deleted and gdb.new_thread; new command rbreak (breakpoint accepting regexps) * gdbserver can be passed environment parameters to remote debuggee - Added patches from Fedora: gdb-ppc64-stwux-tautological-compare.patch gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch gdb-vla-intel-fix-print-char-array.patch - Removed unused gdb-libstdc++-v3-python-7.1.1-20170526.tar.bz2 - Removed obsolete upstream patches: gdb-s390x-1b63490.patch gdb-s390x-289e23a.patch gdb-s390x-8fe09d7.patch gdb-s390x-96235dc.patch OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=177
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: print a more useful error message for "gdb core"
|
||||
|
||||
FileName: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
|
||||
;;=push+jan
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2010-01/msg00558.html
|
||||
Subject: Re: [patch] print a more useful error message for "gdb core"
|
||||
|
||||
[ Fixed up since the mail. ]
|
||||
|
||||
@@ -31,16 +39,13 @@ autodetections. The second command line argument
|
||||
(captured_main->pid_or_core_arg) is also autodetected (for PID or CORE) but
|
||||
neither "attach" accepts a core file nor "core-file" accepts a PID.
|
||||
|
||||
|
||||
The patch makes sense only with the build-id patchset so this is not submit
|
||||
for FSF GDB inclusion yet. I am fine with your patch (+/- Hui Zhu's pending
|
||||
bfd_check_format_matches) as the patch below is its natural extension.
|
||||
|
||||
|
||||
Sorry for the delay,
|
||||
Jan
|
||||
|
||||
|
||||
2010-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* exceptions.h (enum errors <IS_CORE_ERROR>): New.
|
||||
@@ -57,11 +62,30 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
|
||||
|
||||
* exec.c (exec_file_attach): Print a more useful error message if the
|
||||
user did "gdb core".
|
||||
---
|
||||
gdb/common/common-exceptions.h | 3 +++
|
||||
gdb/exec.c | 22 +++++++++++++++---
|
||||
gdb/main.c | 53 +++++++++++++++++++++++++++++++++++++++---
|
||||
3 files changed, 72 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: gdb-7.12.50.20170226/gdb/exec.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/exec.c 2017-02-27 22:18:00.945026211 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/exec.c 2017-02-27 22:18:08.111076350 +0100
|
||||
diff --git a/gdb/common/common-exceptions.h b/gdb/common/common-exceptions.h
|
||||
index 15c85e28ab..9fe2375bce 100644
|
||||
--- a/gdb/common/common-exceptions.h
|
||||
+++ b/gdb/common/common-exceptions.h
|
||||
@@ -104,6 +104,9 @@ enum errors {
|
||||
"_ERROR" is appended to the name. */
|
||||
MAX_COMPLETIONS_REACHED_ERROR,
|
||||
|
||||
+ /* Attempt to load a core file as executable. */
|
||||
+ IS_CORE_ERROR,
|
||||
+
|
||||
/* Add more errors here. */
|
||||
NR_ERRORS
|
||||
};
|
||||
diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
index c8c32ecc27..b329e2b834 100644
|
||||
--- a/gdb/exec.c
|
||||
+++ b/gdb/exec.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "progspace.h"
|
||||
#include "gdb_bfd.h"
|
||||
@@ -70,7 +94,7 @@ Index: gdb-7.12.50.20170226/gdb/exec.c
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "readline/readline.h"
|
||||
@@ -359,12 +360,27 @@
|
||||
@@ -346,12 +347,27 @@ exec_file_attach (const char *filename, int from_tty)
|
||||
|
||||
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
|
||||
{
|
||||
@@ -101,11 +125,11 @@ Index: gdb-7.12.50.20170226/gdb/exec.c
|
||||
}
|
||||
|
||||
if (build_section_table (exec_bfd, §ions, §ions_end))
|
||||
Index: gdb-7.12.50.20170226/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/main.c 2017-02-27 22:18:00.945026211 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/main.c 2017-02-27 22:18:08.112076357 +0100
|
||||
@@ -459,6 +459,37 @@
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index 3c98787edb..17d35f4a8a 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -446,6 +446,37 @@ struct cmdarg
|
||||
char *string;
|
||||
};
|
||||
|
||||
@@ -141,9 +165,9 @@ Index: gdb-7.12.50.20170226/gdb/main.c
|
||||
+}
|
||||
+
|
||||
static void
|
||||
captured_main_1 (struct captured_main_args *context, int &python_script)
|
||||
captured_main_1 (struct captured_main_args *context)
|
||||
{
|
||||
@@ -910,6 +941,8 @@
|
||||
@@ -882,6 +913,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||
{
|
||||
symarg = argv[optind];
|
||||
execarg = argv[optind];
|
||||
@@ -152,7 +176,7 @@ Index: gdb-7.12.50.20170226/gdb/main.c
|
||||
optind++;
|
||||
}
|
||||
|
||||
@@ -1060,11 +1093,25 @@
|
||||
@@ -1032,11 +1065,25 @@ captured_main_1 (struct captured_main_args *context)
|
||||
&& symarg != NULL
|
||||
&& strcmp (execarg, symarg) == 0)
|
||||
{
|
||||
@@ -171,27 +195,16 @@ Index: gdb-7.12.50.20170226/gdb/main.c
|
||||
/* The exec file and the symbol-file are the same. If we can't
|
||||
open it, better only print one error message.
|
||||
- catch_command_errors returns non-zero on success! */
|
||||
- if (catch_command_errors_const (exec_file_attach, execarg,
|
||||
- !batch_flag))
|
||||
- if (catch_command_errors (exec_file_attach, execarg,
|
||||
- !batch_flag))
|
||||
+ catch_command_errors returns non-zero on success!
|
||||
+ Do not load EXECARG as a symbol file if it has been already processed
|
||||
+ as a core file. */
|
||||
+ if (catch_command_errors_const (func, execarg, !batch_flag)
|
||||
+ if (catch_command_errors (func, execarg, !batch_flag)
|
||||
+ && core_bfd == NULL)
|
||||
catch_command_errors_const (symbol_file_add_main_adapter, symarg,
|
||||
!batch_flag);
|
||||
catch_command_errors (symbol_file_add_main_adapter, symarg,
|
||||
!batch_flag);
|
||||
}
|
||||
Index: gdb-7.12.50.20170226/gdb/common/common-exceptions.h
|
||||
===================================================================
|
||||
--- gdb-7.12.50.20170226.orig/gdb/common/common-exceptions.h 2017-02-27 22:18:00.946026218 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/common/common-exceptions.h 2017-02-27 22:18:08.112076357 +0100
|
||||
@@ -106,6 +106,9 @@
|
||||
"_ERROR" is appended to the name. */
|
||||
MAX_COMPLETIONS_REACHED_ERROR,
|
||||
|
||||
+ /* Attempt to load a core file as executable. */
|
||||
+ IS_CORE_ERROR,
|
||||
+
|
||||
/* Add more errors here. */
|
||||
NR_ERRORS
|
||||
};
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
Reference in New Issue
Block a user