diff options
author | Stu Grossman <grossman@cygnus> | 1992-07-08 08:00:30 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1992-07-08 08:00:30 +0000 |
commit | 784fd92b3d3474bdace393b07d480fe6d8087111 (patch) | |
tree | b2566888529efe31bc34fecae1799f4d771cfd7f /gdb/dbxread.c | |
parent | 179798e1e0459d0fd00c93e080aa2745de53d7f4 (diff) | |
download | gdb-784fd92b3d3474bdace393b07d480fe6d8087111.zip gdb-784fd92b3d3474bdace393b07d480fe6d8087111.tar.gz gdb-784fd92b3d3474bdace393b07d480fe6d8087111.tar.bz2 |
* dbxread.c (dbx_symfile_init): Init stab_section_info to NULL to
prevent crashes when examining cross-targets.
* dbxread.c (process_one_symbol): Include directory name when
calling start_subfile for SOL & BINCL symbols. This allows gdb to
find include files, and yacc/lex sources when the cwd doesn't match
that in which the object was compiled.
* objfiles.h (ALL_MSYMBOLS): Don't seg fault when there are no
msymbols.
* symtab.c (lookup_symtab_1): Rewrite. It now handles include
files.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r-- | gdb/dbxread.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 9672343..e7cc1ae 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -545,6 +545,7 @@ dbx_symfile_init (objfile) #endif /* FIXME POKING INSIDE BFD DATA STRUCTURES */ + DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL; DBX_TEXT_SECT (objfile) = bfd_get_section_by_name (sym_bfd, ".text"); if (!DBX_TEXT_SECT (objfile)) error ("Can't find .text section in symbol file"); @@ -1800,17 +1801,17 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile) (whose name was given in the N_SO symbol.) */ /* Relocate for dynamic loading */ valu += ANOFFSET (section_offsets, SECT_OFF_TEXT); - start_subfile (name, NULL); + start_subfile (name, current_subfile->dirname); break; case N_BINCL: push_subfile (); add_new_header_file (name, valu); - start_subfile (name, NULL); + start_subfile (name, current_subfile->dirname); break; case N_EINCL: - start_subfile (pop_subfile (), NULL); + start_subfile (pop_subfile (), current_subfile->dirname); break; case N_EXCL: |