This is the mail archive of the gdb-prs@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]

[Bug remote/8967] Can't remotely debug attached process


------- Additional Comments From pedro at codesourcery dot com  2008-12-24 18:53 -------
The description of the bug is a bit misleading.  What is really happening, is that:

>From a terminal launch the log2 program in the background

... this doesn't really leave the log2 program running.  Since log2 is trying to
read from stdin, when you try to put it in the background, it is immediately
left stopped:

>../log2 &
Please enter a positive numeric value:  [1] 3669

[1]+  Stopped                 ../log2
[pedro@orlando][~/gdb/baseline/build/gdb/gdbserver]

>bg
[1]+ ../log2 &

[1]+  Stopped                 ../log2

>head /proc/3669/status
Name:   log2
State:  T (stopped)

gdbserver doesn't have support for attaching to stopped processes (yet), so the
attaching never completes successfully, and the socket is never open.

(Native GDB debugging just recently got support for attaching to stopped processes.)

If you instead launched log2 in the foreground in another terminal, gdbserver
would be able to attach successfully, and GDB would be able to connect to it.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=8967

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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