[RFC] Support exec tracing on GNU/Linux and HP-UX

Joel Brobecker brobecker@adacore.com
Mon Oct 22 06:01:00 GMT 2007


> The user interface is the same as it was when this was originally
> added on HP-UX long ago.  When GDB sees an exec event, it
> automatically loads the new executable as the main symbol file.
> This is a little disconcerting if you try to use "run" again
> later, but otherwise seems pretty convenient.
> 
> Any comments?  Mark (or someone else), could you offer to test this
> on HP-UX?  I suspect the tests will fail for cosmetic reasons due to
> the changed messages but I hope exec tracing will generally work.

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)

-- 
Joel



More information about the Gdb-patches mailing list