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
.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:
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
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 '/',
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;
}