This is the mail archive of the gdb@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: how to make gdb happy with my linkmap


On Thu, Dec 18, 2008 at 11:10 PM, Daniel Jacobowitz <drow@false.org> wrote:

> Oh!  Sorry.  Then I was off on a tangent.  The salient difference is
> whether your loader is started by the kernel based on a PT_INTERP
> entry in the executable, or from the command line.  If it's started
> by PT_INTERP, things are much easier to handle.
>
> The only things I can think of are having the main application first,
> and having the debug function be named _dl_debug_state (because we set
> a breakpoint before _r_debug is initialized).  There's not much more
> to it.

Ok, it appears that this is, indeed, sufficient to get good debugging
when running the executable from a PT_INTERP. However, as you
mentioned above, running the executable from the command-line without
an associated PT_INTERP entry seems to confuse gdb quite a bit: it
seems unable to place or handle breakpoints. Is there something I
could do to help alleviate this problem (I would be happy to do
whatever is needed in gdb proper) ? Maybe I could go and hack the
on-stack aux vectors to help gdb ?

regards,
Mathieu
-- 
Mathieu Lacage <mathieu.lacage@gmail.com>


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