From: Jim Kingdon Date: Wed, 30 Mar 1994 21:48:14 +0000 (+0000) Subject: * xcoffread.c (xcoff_next_symbol_text): New function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34d265dc08f2c8b130b3c4a47696775424604e9e;p=binutils-gdb.git * xcoffread.c (xcoff_next_symbol_text): New function. (read_xcoff_symtab): Set next_symbol_text_func to it. Move raw_symbol outside of read_xcoff_symtab. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6f81014dca6..bc90023eb84 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ Wed Mar 30 11:43:29 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + * xcoffread.c (xcoff_next_symbol_text): New function. + (read_xcoff_symtab): Set next_symbol_text_func to it. + Move raw_symbol outside of read_xcoff_symtab. + * remote.c (getpkt): Remove unused "out" label. Wed Mar 30 09:15:42 1994 Jeffrey A. Law (law@snake.cs.utah.edu) diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 06aa3c927d1..e4dd816d3ed 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -971,6 +971,30 @@ static int static_block_section = -1; static int symname_alloced = 0; +/* Next symbol to read. Pointer into raw seething symbol table. */ + +static char *raw_symbol; + +/* This is the function which stabsread.c calls to get symbol + continuations. */ +static char * +xcoff_next_symbol_text () +{ + struct internal_syment symbol; + static struct complaint msg = + {"Unexpected symbol continuation", 0, 0}; + + bfd_coff_swap_sym_in (current_objfile->obfd, raw_symbol, &symbol); + if (symbol->n_zeroes) + complain (&msg); + else if (symbol->n_sclass & 0x80) + return debugsec + symbol->n_offset; + else + complain (&msg); + raw_symbol += coff_data (current_objfile->obfd)->local_symesz; + ++symnum; +} + /* read the whole symbol table of a given bfd. */ static void @@ -979,7 +1003,6 @@ read_xcoff_symtab (objfile, nsyms) int nsyms; /* # of symbols */ { bfd *abfd = objfile->obfd; - char *raw_symbol; /* Pointer into raw seething symbol table */ char *raw_auxptr; /* Pointer to first raw aux entry for sym */ sec_ptr textsec; /* Pointer to text section */ TracebackInfo *ptb; /* Pointer to traceback table */ @@ -1050,6 +1073,8 @@ read_xcoff_symtab (objfile, nsyms) printf_unfiltered ("Unable to locate text section!\n"); } + next_symbol_text_func = xcoff_next_symbol_text; + while (symnum < nsyms) { QUIT; /* make this command interruptable. */ @@ -1863,18 +1888,6 @@ free_linetab () linetab = NULL; } -/* dbx allows the text of a symbol name to be continued into the - next symbol name! When such a continuation is encountered - (a \ at the end of the text of a name) - call this function to get the continuation. */ -/* So far, I haven't seen this happenning xlc output. I doubt we'll need this - for xcoff. */ - -#undef next_symbol_text -#define next_symbol_text() \ - printf_unfiltered ("Gdb Error: symbol names on multiple lines not implemented.\n") - - static void xcoff_new_init (objfile) struct objfile *objfile;