This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Handle DW_AT_const_value/DW_FORM_strp variables


Pedro,

This doesn't work as is on PPC. The ".value" pseudo-op it not available,
but using ".short" instead does the trick. Tested on x86 and PPC with
".short" for the DWARF version field.

Ok to change this?

Regards,
Luis


On Fri, 2008-04-25 at 19:59 +0100, Pedro Alves wrote:
> A Friday 25 April 2008 19:28:58, Joel Brobecker escreveu:
> > Hi Pedro,
> >
> > > gdb/
> > > 2008-04-25  Pedro Alves  <pedro@codesourcery.com>
> > >
> > > 	* dwarf2read.c (dwarf2_const_value): Handle DW_FORM_strp.
> > >
> > > gdb/testsuite/
> > > 2008-04-25  Pedro Alves  <pedro@codesourcery.com>
> > >
> > > 	* gdb.dwarf2/dw2-strp.S, gdb.dwarf2/dw2-strp.exp: New files.
> >
> > Both patches look good to me. Please go ahead and commit.
> >
> 
> Thanks for the quick review.  It's in now.
> 
> > > +# This test can only be run on targets which support DWARF-2 and use
> > > gas. +# For now pick a sampling of likely targets.
> > > +if {![istarget *-*-linux*]
> > > +    && ![istarget *-*-gnu*]
> > > +    && ![istarget *-*-elf*]
> > > +    && ![istarget *-*-openbsd*]
> > > +    && ![istarget arm-*-eabi*]
> > > +    && ![istarget powerpc-*-eabi*]} {
> > > +    return 0
> > > +}
> >
> > I wonder if we should put that in a function somewhere. We have been
> > repeating this pretty large condition in several files, now. Just
> > thinking out loud...
> 
> Indeed.
> 
> (
> Thinking out load too:
> However, we could also make the predicate the other way around.
> Check for targets that *don't* support dwarf and *don't* use gas.  Could
> they be fewer?  Probably some of the non-free Unixen, and older
> xcoff/coff/a.out based targets.
> 
> E.g.  Windows/Cygwin aren't running these tests, and dwarf is a bit
> more susceptible to bugs there in the sense that debug sections
> don't get VMA == 0.
> )


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]