Date: Wed, 8 Sep 1999 16:50:27 -0400 (EDT) From: Zhihui Zhang <zzhang@cs.binghamton.edu> To: freebsd-hackers@freebsd.org Subject: Using gdb with fork() Message-ID: <Pine.GSO.3.96.990908163503.22711B-100000@sol.cs.binghamton.edu>
next in thread | raw e-mail | index | archive | help
I am using gdb 4.18 on FreeBSD-current. The program being debugged consists of two small files: test1.c and test2.c. The main() in test1.c has a call to fork() and for the child process case, it will call a routine, say test(), in test2.c. I use "set follow-fork-mode child", "break fork", "step" command trying to access the source in test2.c without success. The program is compiled with "cc -g test1.c test2.c" and I run gdb with "gdb a.out". If there is no fork(), a call from test1.c to a routine in test2.c will bring up the source of test2.c if I step that routine. Why it does not work with fork()? Am I missing something? Thanks for any help. -------------------------------------------------- Zhihui Zhang. Please visit http://www.freebsd.org -------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.96.990908163503.22711B-100000>