This is the mail archive of the gdb-patches@sources.redhat.com 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: Adding -file-list-exec-source-file command to GDB/MI


On Sun, Mar 30, 2003 at 11:22:03PM -0500, Andrew Cagney wrote:
> > 
> > Sure, I'll look into that. I would also like to add the extra field to
> > -break-list. Does that make sense to everyone else?
> 
> Does to me.

Ah, I see why this has never been an issue at Apple.  We control
the compiler, and -gstabs+ is the default debug output.  This means
that we have the compilation directory at the start of each file,
e.g. (the file /tmp/e/f/a.c compiled from /tmp/e)

        .stabs  "/tmp/e/",100,0,0,.Ltext0
        .stabs  "f/a.c",100,0,0,.Ltext0

And we have a modification to MI in our gdb which includes that
directory in things like stack-list-frames.  Here's the Apple gdb
output when stopped:

-stack-list-frames
^done,stack=[frame={level="0",addr="0x00001dc8",fp="0xbffffca0",func="foo",file="f/a.c",line="3",dir="/tmp/e/"}, [...]

And here's the FSF gdb:

-stack-list-frames
^done,stack=[frame={level="0 ",addr="0x0804830f",func="foo",file="f/a.c",line="3"}, [...]

The other difference is the addition of FP here -- our UI uses the
PC and FP to uniquely identify stack frames so it won't re-fetch
things unnecessarily while keeping its stack frame display current.


I send this as an aside, not as an argument against the change Bob
is proposing.  The gdb developer community doesn't control gcc as
handily as we can at Apple, so this particular solution isn't
relevant.  Although I see gcc 3.2's DWARF-2 output includes the
compilation directory.

J


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