On 12/06/2011 11:56 PM, Hui Zhu wrote:
Hi,
I use a gdb tstart again in a section an got:
(gdb) tstart
(gdb) tstop
(gdb) tstart
../../src/gdb/tracepoint.c:1770: internal-error: start_tracing:
Assertion `!loc->inserted' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
Thanks for this patch! It is related to my previous commit
[patch 4/8] Download tracepoint locations and track its status
http://sourceware.org/ml/gdb-patches/2011-11/msg00337.html
The reason is:
start_tracing:
for (loc = b->loc; loc; loc = loc->next)
{
/* Since tracepoint locations are never duplicated, `inserted'
flag should be zero. */
gdb_assert (!loc->inserted);
target_download_tracepoint (loc);
loc->inserted = 1;
}
But in stop_tracing and trace_status_command don't have code to set
inserted back to 0.
Right, I agree that loc->inserted should be cleared on stop_tracing.
However, I don't know why we have to clear loc->inserted in
trace_status_command. A few comments below.