aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-03-30 21:48:14 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-03-30 21:48:14 +0000
commit34d265dc08f2c8b130b3c4a47696775424604e9e (patch)
tree1bcfa6fd6e40c2b8df2b9d990ef95f0dac5a3486
parentaece310f08ddfd425f0712f609d0060e13b299ad (diff)
downloadgdb-34d265dc08f2c8b130b3c4a47696775424604e9e.zip
gdb-34d265dc08f2c8b130b3c4a47696775424604e9e.tar.gz
gdb-34d265dc08f2c8b130b3c4a47696775424604e9e.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/xcoffread.c39
2 files changed, 30 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6f81014..bc90023 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 06aa3c9..e4dd816 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;