diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-05-27 22:06:12 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-05-27 22:06:12 +0000 |
commit | 860b4da38b4af1821c0805c353bfbe0d6535c3a4 (patch) | |
tree | 7af778d76dbedb411f80483feef49283edf7368e /gdb | |
parent | b9653d81655b4c0e2f4853ddf749245626c5a495 (diff) | |
download | gdb-860b4da38b4af1821c0805c353bfbe0d6535c3a4.zip gdb-860b4da38b4af1821c0805c353bfbe0d6535c3a4.tar.gz gdb-860b4da38b4af1821c0805c353bfbe0d6535c3a4.tar.bz2 |
* xcoffread.c (read_xcoff_symtab): If several program csects in one
source file, give them all the name of the source file, rather than
the 2nd and subsequent ones having NULL names.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/xcoffread.c | 22 |
2 files changed, 19 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 41d3434..f377660 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +Thu May 27 16:56:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * xcoffread.c (read_xcoff_symtab): If several program csects in one + source file, give them all the name of the source file, rather than + the 2nd and subsequent ones having NULL names. + Thu May 27 06:16:56 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * printcmd.c (print_address_symbolic): Append source filename and diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 585a4f0..cd16e74 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1163,14 +1163,16 @@ read_xcoff_symtab (objfile, nsyms) case XMC_PR : /* a `.text' csect. */ { - /* A program csect is seen. - - We have to allocate one symbol table for each program csect. Normally - gdb prefers one symtab for each compilation unit (CU). In case of AIX, one - CU might include more than one prog csect, and they don't have to be - adjacent in terms of the space they occupy in memory. Thus, one single - CU might get fragmented in the memory and gdb's file start and end address - approach does not work! */ + /* A program csect is seen. We have to allocate one + symbol table for each program csect. Normally gdb + prefers one symtab for each source file. In case + of AIX, one source file might include more than one + [PR] csect, and they don't have to be adjacent in + terms of the space they occupy in memory. Thus, one + single source file might get fragmented in the + memory and gdb's file start and end address + approach does not work! GCC (and I think xlc) seem + to put all the code in the unnamed program csect. */ if (last_csect_name) { @@ -1191,7 +1193,9 @@ read_xcoff_symtab (objfile, nsyms) textsec->target_index); end_stabs (); start_stabs (); - start_symtab ((char *)NULL, (char *)NULL, (CORE_ADDR)0); + /* Give all csects for this source file the same + name. */ + start_symtab (filestring, (char *)NULL, (CORE_ADDR)0); } /* If this is the very first csect seen, basically `__start'. */ |