Yuri <yuri-wd5pmp1on6wavxtiumw...@public.gmane.org> writes: > When I run 'gdb printf' with and without strace, the output of gdb is > different in that with strace "Inferior exited" message disappears. > It looks like strace maybe consumes the exit signal of the debugged > process before gdb does? > > $ gdb printf > <...skipped...> > (gdb) r "Hello\n" > Starting program: /usr/bin/printf "Hello\n" > Hello > [Inferior 1 (process 3057) exited normally] > (gdb) > > > $ strace -f 2>/dev/null gdb printf > <...skipped...> > (gdb) r "Hello\n" > Starting program: /usr/bin/printf "Hello\n" > Hello > (gdb)
That's because gdb never gets a chance to trace the inferior (there can be only one tracer). A newer gdb complains that the program exited during startup. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel