diff options
author | Stu Grossman <grossman@cygnus> | 1992-07-16 20:40:36 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1992-07-16 20:40:36 +0000 |
commit | cdaa27e9ae0eb4ef1d53ede0a7b7c0fef6dfa7c3 (patch) | |
tree | 5a87b5f6f7fc0a41ae1777af1bfc6fdd233e0c04 /gdb | |
parent | 345e9ab8dc26cad486eeb628e5a9d420539bd477 (diff) | |
download | gdb-cdaa27e9ae0eb4ef1d53ede0a7b7c0fef6dfa7c3.zip gdb-cdaa27e9ae0eb4ef1d53ede0a7b7c0fef6dfa7c3.tar.gz gdb-cdaa27e9ae0eb4ef1d53ede0a7b7c0fef6dfa7c3.tar.bz2 |
* Makefile.in (OTHERS): Add gcc.patch.
* partial-stab.h (N_SO): Fix handling of redundant SOs (again...)
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/Makefile.in | 30 | ||||
-rw-r--r-- | gdb/partial-stab.h | 66 |
3 files changed, 44 insertions, 57 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e6d0241..b9b9290 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 16 13:37:09 1992 Stu Grossman (grossman at cygnus.com) + + * Makefile.in (OTHERS): Add gcc.patch. + * partial-stab.h (N_SO): Fix handling of redundant SOs (again...) + Thu Jul 16 12:07:40 1992 Fred Fish (fnf@cygnus.com) * dwarfread.c (LCC_PRODUCER): Change to match current NCR diff --git a/gdb/Makefile.in b/gdb/Makefile.in index d839964..071b04d 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -168,21 +168,12 @@ DIST=gdb LINT=/usr/5bin/lint LINTFLAGS= -I${BFD_DIR} -# Select the default C++ demangling style to use. The default is "auto", -# which allows gdb to attempt to pick an appropriate demangling style for -# the executable it has loaded. It can be set to a specific style ("gnu", -# "lucid", "cfront", etc) in which case gdb will never attempt to do auto -# selection of the style unless you do an explicit "set demangle auto". -# To select one of these as the default, set DEMANGLING_STYLE in the -# appropriate target dependent makefile fragment. -DEMANGLING_STYLE = "gnu" - -# Select demangler to use. +# Select demangler to use. Currently gdb only supports inclusion of a +# single demangler. The default demangler (cplus-dem.c) can demangle +# several different styles that differ in only minor details. See +# demangle.c information about selecting styles. DEMANGLER = cplus-dem -# Select options to use when compiling ${DEMANGLER}.c. -DEMANGLE_OPTS = -DDEMANGLING_STYLE=${DEMANGLING_STYLE} - # Host and target-dependent makefile fragments come in here. #### # End of host and target-dependent makefile fragments @@ -262,7 +253,7 @@ OTHERS = Makefile.in depend alldeps.mak createtags munch configure.in \ .gdbinit COPYING $(YYFILES) \ copying.c Convex.notes copying.awk \ saber.suppress standalone.c stuff.c kdb-start.c \ - putenv.c + putenv.c gcc.patch # Subdirectories of gdb, which should be included in their entirety in # gdb-xxx.tar.Z: @@ -710,15 +701,10 @@ gdb.cxref: $(SFILES) force_update: -# Generate the demangler linked in with gdb. Also create a standalone -# demangler if so desired ("make demangle"). - -${DEMANGLER}.o: ${DEMANGLER}.c - ${CC} -c ${INTERNAL_CFLAGS} ${DEMANGLE_OPTS} \ - `echo ${srcdir}/${DEMANGLER}.c | sed 's,^\./,,'` +# Create a standalone demangler if so desired ("make demangle"). -demangle: ${DEMANGLER}.c - ${CC} -o $@ -DMAIN ${INTERNAL_CFLAGS} ${DEMANGLE_OPTS} \ +demangle: ${srcdir}/${DEMANGLER}.c + ${CC} -o $@ -DMAIN ${INTERNAL_CFLAGS} \ `echo ${srcdir}/${DEMANGLER}.c | sed 's,^\./,,'` # GNU Make has an annoying habit of putting *all* the Makefile variables diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h index a0ad20d..9af5b8d 100644 --- a/gdb/partial-stab.h +++ b/gdb/partial-stab.h @@ -198,27 +198,35 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ case N_SO: { unsigned long valu = CUR_SYMBOL_VALUE; - static int last_so_symnum = -10; - static int dir_so_symnum = -10; - int tmp; + static int prev_so_symnum = -10; + static int first_so_symnum; char *p; + past_first_source_file = 1; + + if (prev_so_symnum != symnum - 1) + { /* Here if prev stab wasn't N_SO */ + first_so_symnum = symnum; + + if (pst) + { + END_PSYMTAB (pst, psymtab_include_list, includes_used, + symnum * symbol_size, valu, + dependency_list, dependencies_used); + pst = (struct partial_symtab *) 0; + includes_used = 0; + dependencies_used = 0; + } + } + + prev_so_symnum = symnum; + /* End the current partial symtab and start a new one */ SET_NAMESTRING(); valu += ANOFFSET (section_offsets, SECT_OFF_TEXT); - if (pst) - { - END_PSYMTAB (pst, psymtab_include_list, includes_used, - symnum * symbol_size, valu, - dependency_list, dependencies_used); - pst = (struct partial_symtab *) 0; - includes_used = 0; - dependencies_used = 0; - } - /* Some compilers (including gcc) emit a pair of initial N_SOs. The first one is a directory name; the second the file name. If pst exists, is empty, and has a filename ending in '/', @@ -226,30 +234,18 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ p = strrchr (namestring, '/'); if (p && *(p+1) == '\000') - { - dir_so_symnum = symnum; - continue; /* Simply ignore directory name SOs */ - } + continue; /* Simply ignore directory name SOs */ /* Some other compilers (C++ ones in particular) emit useless - SOs for non-existant .c files. */ - - if (last_so_symnum == symnum - 1) - continue; /* Ignore repeated SOs */ - last_so_symnum = symnum; - - past_first_source_file = 1; - - if (dir_so_symnum == symnum - 1) /* Was prev. SO a directory? */ - tmp = dir_so_symnum; - else - tmp = symnum; - pst = START_PSYMTAB (objfile, section_offsets, - namestring, valu, - tmp * symbol_size, - objfile -> global_psymbols.next, - objfile -> static_psymbols.next); - dir_so_symnum = -10; + SOs for non-existant .c files. We ignore all subsequent SOs that + immediately follow the first. */ + + if (!pst) + pst = START_PSYMTAB (objfile, section_offsets, + namestring, valu, + first_so_symnum * symbol_size, + objfile -> global_psymbols.next, + objfile -> static_psymbols.next); continue; } |