aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1996-01-08 17:55:25 +0000
committerJeff Law <law@redhat.com>1996-01-08 17:55:25 +0000
commit436d4143274d6bb3c32632f7ae1bd82cda5128b5 (patch)
tree1b03454d0f21a99f7d5f601c3f7d023edfea7e8f /gdb/xcoffread.c
parent01082eaf1926a56afc7b4cb51a25d3560ee31f5b (diff)
downloadgdb-436d4143274d6bb3c32632f7ae1bd82cda5128b5.zip
gdb-436d4143274d6bb3c32632f7ae1bd82cda5128b5.tar.gz
gdb-436d4143274d6bb3c32632f7ae1bd82cda5128b5.tar.bz2
* buildsym.c (end_symtab): Remove sort_pending and sort_linevec
arguments. Sorting is now dependent on OBJF_REORDERED. All callers/references changed. * dbxread.c (read_ofile_symtab): Correctly determine value for last_source_start_addr for reordered executables. (process_one_symbol): Handle N_FUN with no name as an end of function marker. * partial-stab.h (case N_FN, N_TEXT): Don't assume CUR_SYMBOL_VALUE is the high text address for a psymtab. (case N_SO): Likewise. (case N_FUN): Handle N_FUN with no name as an end of function marker. * minsyms.c (lookup_minimal_symbol_by_pc): Examine all symbols at the same address rather than a random subset of them. * coffread.c (coff_symfile_init): Set OBJF_REORDERED. * elfread.c (elf_symfile_init): Similarly. * somread.c (som_symfile_init): Similarly. * xcoffread.c (xcoff_symfile_init): Similarly. Support for debugging reordered executables. Remaining mentor vm changes.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index c94cb76..b553102 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1,5 +1,5 @@
/* Read AIX xcoff symbol tables and convert to internal format, for GDB.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996
Free Software Foundation, Inc.
Derived from coffread.c, dbxread.c, and a lot of hacking.
Contributed by IBM Corporation.
@@ -1023,7 +1023,7 @@ read_xcoff_symtab (pst)
if (last_source_file)
{
pst->symtab =
- end_symtab (cur_src_end_addr, 1, 0, objfile, SECT_OFF_TEXT);
+ end_symtab (cur_src_end_addr, objfile, SECT_OFF_TEXT);
end_stabs ();
}
@@ -1087,8 +1087,7 @@ read_xcoff_symtab (pst)
{
complete_symtab (filestring, file_start_addr);
cur_src_end_addr = file_end_addr;
- end_symtab (file_end_addr, 1, 0, objfile,
- SECT_OFF_TEXT);
+ end_symtab (file_end_addr, objfile, SECT_OFF_TEXT);
end_stabs ();
start_stabs ();
/* Give all csects for this source file the same
@@ -1203,7 +1202,7 @@ read_xcoff_symtab (pst)
complete_symtab (filestring, file_start_addr);
cur_src_end_addr = file_end_addr;
- end_symtab (file_end_addr, 1, 0, objfile, SECT_OFF_TEXT);
+ end_symtab (file_end_addr, objfile, SECT_OFF_TEXT);
end_stabs ();
/* XCOFF, according to the AIX 3.2 documentation, puts the filename
@@ -1393,7 +1392,7 @@ read_xcoff_symtab (pst)
complete_symtab (filestring, file_start_addr);
cur_src_end_addr = file_end_addr;
- s = end_symtab (file_end_addr, 1, 0, objfile, SECT_OFF_TEXT);
+ s = end_symtab (file_end_addr, objfile, SECT_OFF_TEXT);
/* When reading symbols for the last C_FILE of the objfile, try
to make sure that we set pst->symtab to the symtab for the
file, not to the _globals_ symtab. I'm not sure whether this
@@ -1844,6 +1843,12 @@ xcoff_symfile_init (objfile)
/* Allocate struct to keep track of the symfile */
objfile -> sym_private = xmmalloc (objfile -> md,
sizeof (struct coff_symfile_info));
+
+ /* XCOFF objects may be reordered, so set OBJF_REORDERED. If we
+ find this causes a significant slowdown in gdb then we could
+ set it in the debug symbol readers only when necessary. */
+ objfile->flags |= OBJF_REORDERED;
+
init_entry_point_info (objfile);
}