From d4cedfe4ae4316ec6b6d31e3742b5bfc0f954364 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Wed, 28 Sep 1994 17:18:59 +0000 Subject: [PATCH] * xcoffread.c (read_xcoff_symtab): Process XTY_LD symbols we were ignoring before. But continue to ignore XMC_DS. --- gdb/ChangeLog | 5 +++++ gdb/xcoffread.c | 31 +++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9ceab3efdb..2c4da0cea7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Wed Sep 28 08:59:14 1994 Jim Kingdon (kingdon@cygnus.com) + + * xcoffread.c (read_xcoff_symtab): Process XTY_LD symbols we were + ignoring before. But continue to ignore XMC_DS. + Mon Sep 26 02:59:00 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * defs.h (misc_command_type): Remove trailing comma from diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 7a0f4c5785..57d3f40624 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1282,11 +1282,12 @@ read_xcoff_symtab (objfile, nsyms) break; /* switch CSECT_SCLAS() */ case XTY_LD : - - /* a function entry point. */ - if (CSECT_SCLAS (&main_aux) == XMC_PR) { -function_entry_point: + switch (CSECT_SCLAS (&main_aux)) + { + case XMC_PR: + /* a function entry point. */ + function_entry_point: RECORD_MINIMAL_SYMBOL (cs->c_name, cs->c_value, mst_text, symname_alloced, cs->c_secnum, objfile); @@ -1357,9 +1358,9 @@ function_entry_point: cs->c_value + ptb->fsize, objfile); } continue; - } - /* shared library function trampoline code entry point. */ - else if (CSECT_SCLAS (&main_aux) == XMC_GL) { + + case XMC_GL: + /* shared library function trampoline code entry point. */ /* record trampoline code entries as mst_solib_trampoline symbol. When we lookup mst symbols, we will choose mst_text over @@ -1397,8 +1398,22 @@ function_entry_point: symname_alloced, objfile); #endif continue; + + case XMC_DS: + /* The symbols often have the same names as debug symbols for + functions, and confuse lookup_symbol. */ + continue; + + default: + /* xlc and old versions of gcc put each variable in a + separate csect, so we get an XTY_SD. But new (2.5? + 2.6? something like that) gcc's put several variables + in a csect, so that each variable only gets an XTY_LD. + We still need to record them. This will typically be + XMC_RW; I suspect XMC_RO and XMC_BS might be possible + too. */ + break; } - continue; default : /* all other XTY_XXXs */ break;