This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Support exec tracing on GNU/Linux and HP-UX
On Sun, Oct 21, 2007 at 09:38:31PM -0700, Joel Brobecker wrote:
> I have tested this patch, and it unfortunately creates some issues:
>
> (gdb) run
> Starting program: /[...]/p
> Executing new program: /usr/local/bin/zsh
> (no debugging symbols found)
> Unable to find __dld_flags symbol in object file.
>
> What seems to happen is that we're enabling exec-following during
> the startup sequence, and that causes us to do the follow-exec routine
> on it. Eventually, this fails because the shell binary that I use
> apparently does not have any symbols, thus causing the solib-som hook
> to error out.
>
> Do we do the same on Linux? (exec-follow during the startup)
No, we don't. We don't turn on the exec tracing option until
linux_child_post_startup_inferior, and by then the shell has
already execed. But inf-ttrace.c turns on exec tracing in
inf_ttrace_him instead.
This must be related to the code in infrun.c:1454 and its comment
about how HP-UX is probably broken. It's not quite the same
though since inferior_ignoring_leading_exec_events is supposed to
handle execs which are reported twice.
--
Daniel Jacobowitz
CodeSourcery