From ec48dc8bd4d90fa5c1b7cb4088fbc60a33344688 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Fri, 3 Oct 2014 09:29:57 +0200 Subject: [PATCH] [RFA] Stabs: Ignore N_BNSYM/N_ENSYM entry types Trying to debug gdb with itself, I stumbled on the following complaints Unknown symbol type 0x2e or Unknown symbol type 0x4e It appears that those corrspond to N_BNSYM and N_ENSYM, which are MacOS extensions of stabs debugging format. But these extensions have been used inside gcc probalby for a while already, see: https://gcc.gnu.org/ml/gcc/2004-08/msg00157.html As the only purpose of these entries is to allow for removal of stabs information if the function is removed, it can be safely ignored by GDB. This patch simply adds those two entry types to the list of ignored entry type in read_dbx_symtab function. Is this OK? Pierre Muller 2014-10-03 Pierre Muller * dbxread.c (read_dbx_symtab): Also ignore N_BNSYM/N_ENSYM. --- gdb/ChangeLog | 4 ++++ gdb/dbxread.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 748d61d..748efe9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2014-10-03 Pierre Muller + + * dbxread.c (read_dbx_symtab): Also ignore N_BNSYM/N_ENSYM. + 2014-10-02 Pedro Alves * breakpoint.c (breakpoints_should_be_inserted_now): Use diff --git a/gdb/dbxread.c b/gdb/dbxread.c index fd7910c..2c3be20 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -2120,6 +2120,8 @@ read_dbx_symtab (struct objfile *objfile) case N_SLINE: case N_RSYM: case N_PSYM: + case N_BNSYM: + case N_ENSYM: case N_LBRAC: case N_NSYMS: /* Ultrix 4.0: symbol count */ case N_DEFD: /* GNU Modula-2 */ -- 2.7.4