diff mbox

[mips,stabs] Do any MIPS targets use stabs?

Message ID 87a9sk4tkn.fsf@talisman.default
State New
Headers show

Commit Message

Richard Sandiford Jan. 7, 2013, 8:38 p.m. UTC
Richard Sandiford <rdsandiford@googlemail.com> writes:
> "Steve Ellcey " <sellcey@mips.com> writes:
>> While testing all the variations of my mips-mti-elf target I found that
>> a number of debug tests like gcc.dg/debug/trivial.c fail when compiled
>> using a stabs debug flag (-gstabs3 for example) and -mips16.  While running
>> the GNU simulator I get:
>>
>> mips-core: 1 byte read to unmapped address 0xffffe820 at 0xffffffff80020278
>> program stopped with signal 10 (User defined signal 1).
>> FAIL: gcc.dg/debug/trivial.c -gstabs3 -O execution test
>>
>> Since I don't actually care about STABS I was looking at undefining 
>> DBX_DEBUGGING_INFO in mips-mti-elf.h and mips-mti-linux.h which makes
>> the failures a moot point for me since I would no longer run the tests
>> with any -stabs flags.
>>
>> But I was wondering, are there any MIPS targets that do use stabs?  If not
>> maybe we should just remove the define of DBX_DEBUGGING_INFO from mips.h
>> instead of undefing it just for my targets.  Opinions?
>
> Do you know why selecting stabs causes an execution failure?
> That shouldn't happen regardless of whether the debug info itself is good.

Ah, sorry, this reminded me of a patch I'd written a year ago and never
got around to sanity-checking.  Does it fix the problem for you?

Richard

Comments

Steve Ellcey Jan. 7, 2013, 8:54 p.m. UTC | #1
On Mon, 2013-01-07 at 20:38 +0000, Richard Sandiford wrote:

> 
> Ah, sorry, this reminded me of a patch I'd written a year ago and never
> got around to sanity-checking.  Does it fix the problem for you?
> 
> Richard

It fixes my small test case, I will try it on the full testsuite
overnight.

Steve
Steve Ellcey Jan. 8, 2013, 4:29 p.m. UTC | #2
On Mon, 2013-01-07 at 12:54 -0800, Steve Ellcey wrote:
> On Mon, 2013-01-07 at 20:38 +0000, Richard Sandiford wrote:
> 
> > 
> > Ah, sorry, this reminded me of a patch I'd written a year ago and never
> > got around to sanity-checking.  Does it fix the problem for you?
> > 
> > Richard
> 
> It fixes my small test case, I will try it on the full testsuite
> overnight.
> 
> Steve

The full testsuite worked fine too, so I think this should be checked
in.  Given this fix I will probably leave the stab support alone for
now, though I would have no objection if someone wanted to remove it for
MIPS.

Steve Ellcey
sellcey@mips.com
diff mbox

Patch

Index: gas/config/tc-mips.c
===================================================================
--- gas/config/tc-mips.c	2012-01-28 14:47:10.000000000 +0000
+++ gas/config/tc-mips.c	2012-01-28 14:48:14.000000000 +0000
@@ -1476,7 +1476,9 @@  static const pseudo_typeS mips_pseudo_ta
   {"section", s_change_section, 0},
   {"short", s_cons, 1},
   {"single", s_float_cons, 'f'},
+  {"stabd", s_mips_stab, 'd'},
   {"stabn", s_mips_stab, 'n'},
+  {"stabs", s_mips_stab, 's'},
   {"text", s_change_sec, 't'},
   {"word", s_cons, 2},
 
@@ -16817,9 +16819,7 @@  s_insn (int ignore ATTRIBUTE_UNUSED)
 static void
 s_mips_stab (int type)
 {
-  if (type == 'n')
-    mips_mark_labels ();
-
+  mips_mark_labels ();
   s_stab (type);
 }