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: Child process terminating to early


On Thu, Oct 01, 2009 at 04:53:21PM -0500, Patrick_Boyd@Dell.com wrote:
> (gdb) run
> Starting program: /mnt/NFS/debug/bin/strace
> cmdstat
>         status       : 2
>         status_tag   : COMMAND PROCESSING FAILED
>         error        : 253
>         error_tag    : COMMAND NOT RECOGNIZED
> 
> Program exited normally.
> You can't do that without a process to debug.

Often, this means that your shell (/bin/sh or $SHELL) or kernel is broken.  GDB
starts the debuggee using sh -c 'exec your-program arg arg arg'.  The first
time it gets a trap, it assumes the shell is done and the second program has
started.  If it's never getting that trap, you don't get to debug.

Try looking at 'set debug infrun 1' and 'set debug lin-lwp 1' for more
information about what events GDB sees.

-- 
Daniel Jacobowitz
CodeSourcery


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