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: [RFC/RFA?] Should break FILE:LINENO skip prologue?


Daniel Jacobowitz <drow at false.org> writes:
> On Thu, Jan 10, 2008 at 11:58:07AM +0100, Mark Kettenis wrote:
>> If generating the right location information for -O0 is too difficult,
>> perhaps the compiler should make life easier for itself and disable
>> scheduling instructions into the prologue?
>
> It already doesn't do that at -O0.
>
> This part of the thread was about not skipping prologues at all; we
> can't do that even with GCC, because the debug info says arguments
> live in their stack slots.  But they're in different incoming
> locations until the end of the prologue (registers or other stack
> slots).  

I tried this out on the IA-32.  GCC left my original int and char *
arguments in their incoming stack slots, and GDB printed them
correctly at the function's entry point.  When I changed one argument
to a double, GCC generated code to copy that argument into the local
frame, and GDB couldn't print it properly at the entry point.

> I think we'd want debug info which only specified the
> incoming locations and the local stack slots, not every load into a
> register - which is probably what GCC tries to produce.

That could be a nice solution.  The amount of bloat would depend on
how common those argument moves are in real life; I have no idea.

(I wonder if there is a good way to improve the density of location
lists.  The format seems kind of rigid.)


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