This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: create a watchpoint with trace functionality
On Wed, 21 Oct 2009, Michael Snyder wrote:
> martin mangard wrote:
>> Hello
>>
>> I'm trying to trace the value of a global status variable of an
>> application. This variable is changed from various code positions. I
>> would like to log/trace each change of this variable without stopping
>> the application (at least for a long time) in order to perform a
>> longterm test. I'm currently using a hardware-watchpoint
>>
>> Is there a possibility to configure a "autocontinue" after a
>> watchpoint-event? Which means that the changed value is printed and
>> the execution continues without any user interaction (pressing "c")?
>
> Yes, sure. See below.
>
>> Is ist possible to set a tracepoint on a change of a memory area?
>
> A tracepoint is different from a watchpoint, and no, I don't
> remember that you can do that with a tracepoint (I could be
> wrong).
you are right - no support for that in tracepoints - tracepoints are just
like breakpoints just that they execute the bytecode provided
rather than stoping the process and calling the gdb-frontend. But
I guess that due to the invasive nature of watchpoints (execution timing wise)
it would not make that much sense to have a that behavior in tracepoints as
the prime intention of tracepoints is to allow debugging without breaking
the temporal behoavior too badly (the impact is of course still significant).
hofrat