SET_NAMESTRING ();
- processing_gcc_compilation =
- (bufp->n_type == N_TEXT
- && (strcmp (namestring, GCC_COMPILED_FLAG_SYMBOL) == 0
- || strcmp(namestring, GCC2_COMPILED_FLAG_SYMBOL) == 0));
+ processing_gcc_compilation = 0;
+ if (bufp->n_type == N_TEXT)
+ {
+ if (strcmp (namestring, GCC_COMPILED_FLAG_SYMBOL) == 0)
+ processing_gcc_compilation = 1;
+ else if (strcmp (namestring, GCC2_COMPILED_FLAG_SYMBOL) == 0)
+ processing_gcc_compilation = 2;
+ }
/* Try to select a C++ demangling based on the compilation unit
producer. */
if (processing_gcc_compilation)
{
#if 1 /* Works, but is experimental. -fnf */
- if (current_demangling_style == auto_demangling)
+ if (AUTO_DEMANGLING)
{
set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
}
}
/* We skip checking for a new .o or -l file; that should never
happen in this routine. */
- else if (type == N_TEXT
- && (strcmp (namestring, GCC_COMPILED_FLAG_SYMBOL) == 0
- || strcmp (namestring, GCC2_COMPILED_FLAG_SYMBOL) == 0))
+ else if (type == N_TEXT)
{
/* I don't think this code will ever be executed, because
the GCC_COMPILED_FLAG_SYMBOL usually is right before
the N_SO symbol which starts this source file.
However, there is no reason not to accept
the GCC_COMPILED_FLAG_SYMBOL anywhere. */
- processing_gcc_compilation = 1;
+
+ processing_gcc_compilation = 0;
+ if (strcmp (namestring, GCC_COMPILED_FLAG_SYMBOL) == 0)
+ processing_gcc_compilation = 1;
+ else if (strcmp (namestring, GCC2_COMPILED_FLAG_SYMBOL) == 0)
+ processing_gcc_compilation = 2;
+
#if 1 /* Works, but is experimental. -fnf */
- if (current_demangling_style == auto_demangling)
+ if (AUTO_DEMANGLING)
{
set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
}
case N_OPT: /* Solaris 2: Compiler options */
if (name)
{
- if (!strcmp (name, GCC2_COMPILED_FLAG_SYMBOL))
+ if (strcmp (name, GCC2_COMPILED_FLAG_SYMBOL) == 0)
{
- processing_gcc_compilation = 1;
+ processing_gcc_compilation = 2;
#if 1 /* Works, but is experimental. -fnf */
- if (current_demangling_style == auto_demangling)
+ if (AUTO_DEMANGLING)
{
set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
}
adjusted for elf details. */
void
-DEFUN(elfstab_build_psymtabs, (objfile, section_offsets, mainline,
+elfstab_build_psymtabs (objfile, section_offsets, mainline,
staboffset, stabsize,
- stabstroffset, stabstrsize),
- struct objfile *objfile AND
- struct section_offsets *section_offsets AND
- int mainline AND
- unsigned int staboffset AND
- unsigned int stabsize AND
- unsigned int stabstroffset AND
- unsigned int stabstrsize)
+ stabstroffset, stabstrsize)
+ struct objfile *objfile;
+ struct section_offsets *section_offsets;
+ int mainline;
+ unsigned int staboffset;
+ unsigned int stabsize;
+ unsigned int stabstroffset;
+ unsigned int stabstrsize;
{
int val;
bfd *sym_bfd = objfile->obfd;
(a lie, and a serious one since we don't know which register to
use), and a LOC_REGISTER saying that the struct is in a register
(sort of a lie, but fixable with REG_STRUCT_HAS_ADDR). Gcc version
- two (as of 1.92) behaves like sun cc, but I don't know how we can
- distinguish between gcc version 1 and gcc version 2.
+ two (as of 1.92) behaves like sun cc. REG_STRUCT_HAS_ADDR is smart
+ enough to distinguish between Sun cc, gcc version 1 and gcc version 2.
This still doesn't work if the argument is not one passed in a
register (i.e. it's the 7th or later argument). */
-#define REG_STRUCT_HAS_ADDR(gcc_p) (!(gcc_p))
-#define STRUCT_ARG_SYM_GARBAGE(gcc_p) (!(gcc_p))
+#define REG_STRUCT_HAS_ADDR(gcc_p) (gcc_p != 1)
+#define STRUCT_ARG_SYM_GARBAGE(gcc_p) (gcc_p != 1)
/* If Pcc says that a parameter is a short, it's a short. This is
because the parameter does get passed in in a register as an int,