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/i386] pb reading insns if breakpoints still inserted


> Date: Fri, 28 Apr 2006 13:58:39 -0700
> From: "Jim Blandy" <jimb@red-bean.com>
> 
> On 4/28/06, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> > I don't completely disagree with you here, but, a different way to
> > view the problem is putting the blame with the fact that we (ab)use
> > the prologue analyzer for skipping the prologue when trying to place a
> > breakpoint at the start of a function, where we really should be able
> > to use the debug info for doing this.
> 
> I certainly agree that debug info is preferable to pig-nosing through
> machine code.  Perhaps there should be generic code that does what
> find_function_start_sal does, and everybody should be using that
> instead of calling SKIP_PROLOGUE directly.
> 
> But sometimes we don't have debugging information.  I had thought that
> prologue analysis was pretty much dead, given that .debug_frame does a
> much better job, and puts the problem in the hands of somebody who can
> solve it (the compiler).  But it still seems to come up fairly often.

But if we don't have debug information, what's the point in trying to
skip the prologue in order to put a breakpoint on ... eh what exactly?
Isn't it better to just punt prologue skipping in that case and place
the breakpoint on the first instruction of the code?

Mark


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