diff options
author | Pedro Alves <palves@redhat.com> | 2010-06-20 22:18:48 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-06-20 22:18:48 +0000 |
commit | c6beb2cba632df8ac2cd5fa9392c5c91333fe091 (patch) | |
tree | 30674c0ec44f3295a2f715d2b339dc99c4e4ec97 /gdb | |
parent | 09db93a8133156951672f4d71bcddce9a023cec3 (diff) | |
download | gdb-c6beb2cba632df8ac2cd5fa9392c5c91333fe091.zip gdb-c6beb2cba632df8ac2cd5fa9392c5c91333fe091.tar.gz gdb-c6beb2cba632df8ac2cd5fa9392c5c91333fe091.tar.bz2 |
* tracepoint.c (condition_true_at_tracepoint): Don't run compiled
conditions in gdbserver.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/tracepoint.c | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 06c63430..f25e409 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2010-06-20 Pedro Alves <pedro@codesourcery.com> + + * tracepoint.c (condition_true_at_tracepoint): Don't run compiled + conditions in gdbserver. + 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com> * spu-low.c (spu_read_memory): Wrap around local store limit. diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 5f2e6b6..6557749 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -3923,9 +3923,25 @@ condition_true_at_tracepoint (struct tracepoint_hit_ctx *ctx, ULONGEST value = 0; enum eval_result_type err; + /* Presently, gdbserver doesn't run compiled conditions, only the + IPA does. If the program stops at a fast tracepoint's address + (e.g., due to a breakpoint, trap tracepoint, or stepping), + gdbserver preemptively collect the fast tracepoint. Later, on + resume, gdbserver steps over the fast tracepoint like it steps + over breakpoints, so that the IPA doesn't see that fast + tracepoint. This avoids double collects of fast tracepoints in + that stopping scenario. Having gdbserver itself handle the fast + tracepoint gives the user a consistent view of when fast or trap + tracepoints are collected, compared to an alternative where only + trap tracepoints are collected on stop, and fast tracepoints on + resume. When a fast tracepoint is being processed by gdbserver, + it is always the non-compiled condition expression that is + used. */ +#ifdef IN_PROCESS_AGENT if (tpoint->compiled_cond) err = ((condfn) (uintptr_t) (tpoint->compiled_cond)) (ctx, &value); else +#endif err = eval_agent_expr (ctx, NULL, tpoint->cond, &value); if (err != expr_eval_no_error) |