aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1992-06-16 01:43:35 +0000
committerStu Grossman <grossman@cygnus>1992-06-16 01:43:35 +0000
commitc72af08913dcf61045305c1c048b2a20639b9d99 (patch)
tree0e8bdd10396c1b11a2aeea4801d76a6d4b878309 /gdb/dbxread.c
parent65f14e33aa430affc876a5dc5fa6bf36aa1eed8c (diff)
downloadgdb-c72af08913dcf61045305c1c048b2a20639b9d99.zip
gdb-c72af08913dcf61045305c1c048b2a20639b9d99.tar.gz
gdb-c72af08913dcf61045305c1c048b2a20639b9d99.tar.bz2
* dbxread.c (process_one_symbol), partial-stab.h: Ignore
extraneous SO stabs from busted C++ compilers.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 7cbdbe1..f437935 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -33,6 +33,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "defs.h"
#include <string.h>
+#include <strings.h>
#if defined(USG) || defined(__CYGNUSCLIB__)
#include <sys/types.h>
@@ -1618,16 +1619,18 @@ process_one_symbol (type, desc, valu, name, offset, objfile)
sanity checks). If so, that one was actually the directory
name, and the current one is the real file name.
Patch things up. */
- if (previous_stab_code == N_SO
- && current_subfile && current_subfile->dirname == NULL
- && current_subfile->name != NULL
- && current_subfile->name[strlen(current_subfile->name)-1] == '/')
+ if (previous_stab_code == N_SO)
{
- current_subfile->dirname = current_subfile->name;
- current_subfile->name =
- obsavestring (name, strlen (name),
- &objfile -> symbol_obstack);
- break;
+ if (current_subfile && current_subfile->dirname == NULL
+ && current_subfile->name != NULL
+ && current_subfile->name[strlen(current_subfile->name)-1] == '/')
+ {
+ current_subfile->dirname = current_subfile->name;
+ current_subfile->name =
+ obsavestring (name, strlen (name),
+ &objfile -> symbol_obstack);
+ }
+ break; /* Ignore repeated SOs */
}
(void) end_symtab (valu, 0, 0, objfile);
}