Package: gdb Version: 7.3-1+b1 Severity: normal I've got a program, that (for the sake of testing) does fork() in a loop; I want to follow the child.
To work around the bug in https://lkml.org/lkml/2011/8/16/121 I've tried to set breakpoints at the end of main() and on exit() that use "commands" to detach from the binary. But now I get a segfault in gdb. Sadly there's no gdb-dbg package, so I can only give the raw stack dump: (gdb) bt #0 0x0000000000784dba in xstrdup () #1 0x00000000004e3634 in ?? () #2 0x00000000004e2cd6 in execute_control_command () #3 0x000000000052bdde in ?? () #4 0x000000000052be70 in bpstat_do_actions () #5 0x00000000005afadb in ?? () #6 0x00000000005b0181 in ?? () #7 0x00007f7c51a5cfe8 in rl_callback_read_char () from /lib/x86_64-linux- gnu/libreadline.so.6 #8 0x00000000005aef85 in ?? () #9 0x00000000005af9c5 in stdin_event_handler () #10 0x00000000005adf28 in ?? () #11 0x00000000005ad400 in ?? () #12 0x00000000005ad4cb in gdb_do_one_event () #13 0x00000000005a770e in catch_errors () #14 0x00000000004f8ca7 in ?? () #15 0x00000000005a7e95 in current_interp_command_loop () #16 0x000000000045173b in ?? () #17 0x00000000005a770e in catch_errors () #18 0x00000000004527e1 in ?? () #19 0x00000000005a770e in catch_errors () #20 0x0000000000452817 in gdb_main () #21 0x000000000045143f in main () For reference, here's the file I "source" in gdb: set follow-fork-mode child set detach-on-fork off b exit commands detach inferior 1 end b *((long)main+232) commands detach inferior 1 end # and some more breakpoints on "interesting" locations -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages gdb depends on: ii gdbserver 7.3-1+b1 ii libc6 2.13-21 ii libexpat1 2.0.1-7 ii libncurses5 5.9-1 ii libpython2.7 2.7.2-5 ii libreadline6 6.2-4 ii zlib1g 1:1.2.3.4.dfsg-3 gdb recommends no packages. Versions of packages gdb suggests: ii gdb-doc 7.3-1 -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org