aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-01-18 03:42:30 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-01-18 03:42:30 +0000
commitaf8b79066722cbfa82508a188b0c744058789137 (patch)
treed19096b08552bc29a71e8845f4dce27727411f04 /gdb/xcoffread.c
parent80edc7cb3cd332077c4213f12816921c61bda4ea (diff)
downloadgdb-af8b79066722cbfa82508a188b0c744058789137.zip
gdb-af8b79066722cbfa82508a188b0c744058789137.tar.gz
gdb-af8b79066722cbfa82508a188b0c744058789137.tar.bz2
* xcoffread.c (read_xcoff_symtab, case C_FILE): Accept the name
from either the symbol name or the auxent. * coffread.c, symfile.h (coff_getfilename): Renamed from getfilename, no longer static.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 8b70625..d9a723a 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1381,15 +1381,23 @@ function_entry_point:
cur_src_end_addr = file_end_addr;
end_symtab (file_end_addr, 1, 0, objfile, textsec->target_index);
end_stabs ();
+
+ /* XCOFF, according to the AIX 3.2 documentation, puts the filename
+ in cs->c_name. But xlc 1.3.0.2 has decided to do things the
+ standard COFF way and put it in the auxent. We use the auxent if
+ there is one, otherwise use the name. Simple enough. */
+ if (cs->c_naux > 0)
+ filestring = coff_getfilename (&main_aux);
+ else
+ filestring = cs->c_name;
+
start_stabs ();
- start_symtab (cs->c_name, (char *)NULL, (CORE_ADDR)0);
+ start_symtab (filestring, (char *)NULL, (CORE_ADDR)0);
last_csect_name = 0;
/* reset file start and end addresses. A compilation unit with no text
(only data) should have zero file boundaries. */
file_start_addr = file_end_addr = 0;
-
- filestring = cs->c_name;
break;