Re: breakpoint in gdbserver

Ulrich Weigand
2008-08-29T21:36:59Z

Amol Dixit wrote:

> I am attempting to port gdbserver for freebsd (libpthread/libthr). While
> I may have complex doubts later, I will start with a simple one.
> I need to look at some gdbserver code path on Linux, and while I can set
> breakpoints and these functions are entered, gdb doesn't break at all.
> Gdbserver is compiled w/ symbols and I am using gdb6.8 to debug it.
> Any idea what I am missing here?

Gdbserver uses a direct call to the Linux "clone" system call at startup,
and for some reason GDB gets really confused by this.

When I want to debug gdbserver, I generally simply comment out the call
to linux_test_for_tracefork in linux-nat.c:initialize_low to avoid this.

Bye,
Ulrich

--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com