aboutsummaryrefslogtreecommitdiff
path: root/gas/stabs.c
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1996-05-23 21:49:18 +0000
committerMichael Meissner <gnu@the-meissners.org>1996-05-23 21:49:18 +0000
commit63cafcefeac326d2435260714834a785dfa768dd (patch)
treee79b281de7698c15dd499a9fc7ad17ee13b0df71 /gas/stabs.c
parent31778db0dbe3aba3004df070501806aeccf7005e (diff)
downloadgdb-63cafcefeac326d2435260714834a785dfa768dd.zip
gdb-63cafcefeac326d2435260714834a785dfa768dd.tar.gz
gdb-63cafcefeac326d2435260714834a785dfa768dd.tar.bz2
Allow bogus .stabd with 4 arguments for PowerPC Solaris
Diffstat (limited to 'gas/stabs.c')
-rw-r--r--gas/stabs.c64
1 files changed, 47 insertions, 17 deletions
diff --git a/gas/stabs.c b/gas/stabs.c
index 38ef846..2b56894 100644
--- a/gas/stabs.c
+++ b/gas/stabs.c
@@ -224,6 +224,52 @@ s_stab_generic (what, stab_secname, stabstr_secname)
SKIP_WHITESPACE ();
}
+#ifdef TC_PPC
+#ifdef OBJ_ELF
+ /* Solaris on PowerPC has decided that .stabd takes 4 arguments, so emulate it. */
+ else if (what == 'd')
+ {
+ char *save_location = input_line_pointer;
+
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == ',')
+ {
+ int dummy;
+
+ input_line_pointer++;
+ SKIP_WHITESPACE ();
+
+ dummy = get_absolute_expression ();
+ if (dummy != 0)
+ {
+ as_warn (".stabd: Fourth field must be 0");
+ ignore_rest_of_line ();
+ return;
+ }
+ SKIP_WHITESPACE ();
+ }
+ else
+ input_line_pointer = save_location;
+ }
+#endif /* OBJ_ELF */
+#endif /* TC_PPC */
+
+#ifndef NO_LISTING
+ if (listing)
+ {
+ switch (type)
+ {
+ case N_SLINE:
+ listing_source_line ((unsigned int) desc);
+ break;
+ case N_SO:
+ case N_SOL:
+ listing_source_file (string);
+ break;
+ }
+ }
+#endif /* ! NO_LISTING */
+
/* We have now gathered the type, other, and desc information. For
.stabs or .stabn, input_line_pointer is now pointing at the
value. */
@@ -310,7 +356,7 @@ s_stab_generic (what, stab_secname, stabstr_secname)
}
#ifdef OBJ_PROCESS_STAB
- OBJ_PROCESS_STAB (seg, what, string + stroff, type, other, desc);
+ OBJ_PROCESS_STAB (seg, what, string, type, other, desc);
#endif
subseg_set (saved_seg, saved_subseg);
@@ -324,22 +370,6 @@ s_stab_generic (what, stab_secname, stabstr_secname)
#endif
}
-#ifndef NO_LISTING
- if (listing)
- {
- switch (type)
- {
- case N_SLINE:
- listing_source_line ((unsigned int) desc);
- break;
- case N_SO:
- case N_SOL:
- listing_source_file (string);
- break;
- }
- }
-#endif /* ! NO_LISTING */
-
demand_empty_rest_of_line ();
}