This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix error when gdb connect to a stub that tracepoint is running[0/2]
- From: Yao Qi <yao at codesourcery dot com>
- To: Hui Zhu <hui_zhu at mentor dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 31 Jan 2012 16:18:36 +0800
- Subject: Re: [PATCH] Fix error when gdb connect to a stub that tracepoint is running[0/2]
- References: <4F274C2C.7090107@mentor.com>
On 01/31/2012 10:04 AM, Hui Zhu wrote:
> (gdb) info tracepoints
> Num Type Disp Enb Address What
> 1 tracepoint keep y 0x0000000000400557 in main at 1.c:15
> collect $reg
> (gdb) set disconnected-tracing on
> (gdb) tstart
> (gdb) disconnect
> Trace is running and will continue after detach; detach anyway? (y or n) y
> Ending remote debugging.
> (gdb) target remote localhost:1234
> Remote debugging using localhost:1234
> Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/ld-linux-x86-64.so.2
> Error in re-setting breakpoint 1: Target returns error code '01'.
> Target returns error code '01'.
> (gdb) disconnect
> You can't do that when your target is `exec'
> (gdb) quit
> gdb ./a.out
> (gdb) target remote localhost:1234
> Remote debugging using localhost:1234
> Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/ld-linux-x86-64.so.2
> 0x00007ffff7ddcaf0 in ?? () from /lib64/ld-linux-x86-64.so.2
> Trace is already running on the target.
> Tracepoint 1 at 0x400557: file 1.c, line 15.
> Target returns error code '01'.
>
Yes, this is a bug. It is better if we can convert these steps into a
.exp test case :).
--
Yao (éå)