* [PATCH] Fix error when gdb connect to a stub that tracepoint is running[0/2]
@ 2012-01-31 2:05 Hui Zhu
2012-01-31 8:22 ` Yao Qi
0 siblings, 1 reply; 2+ messages in thread
From: Hui Zhu @ 2012-01-31 2:05 UTC (permalink / raw)
To: gdb-patches
Hi,
I found some error when I try to let GDB connect to a stub that have a
tracepoint and it support insert tracepoint when trace is running, for
example:
(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'.
This is because GDB try to insert this tracepoint to gdb stub part
because this stub support inserted tracepoint when it running. but this
behaveior have 2 trouble:
1. stub already have a treacepoint same with gdb part, if GDB try to
re-inserted it, we will got a error.
2. Even if gdb part doesn't have this tracepoint, when it got this
tracepoint from gdbstub part, it will try to insert this tracepoint to
gdbstub when create_breakpoint.
So I fix this issue with 2 patches.
Thanks,
Hui
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Fix error when gdb connect to a stub that tracepoint is running[0/2]
2012-01-31 2:05 [PATCH] Fix error when gdb connect to a stub that tracepoint is running[0/2] Hui Zhu
@ 2012-01-31 8:22 ` Yao Qi
0 siblings, 0 replies; 2+ messages in thread
From: Yao Qi @ 2012-01-31 8:22 UTC (permalink / raw)
To: Hui Zhu; +Cc: gdb-patches
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 (é½å°§)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-31 8:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-31 2:05 [PATCH] Fix error when gdb connect to a stub that tracepoint is running[0/2] Hui Zhu
2012-01-31 8:22 ` Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox