* Don't run compiled condition expressions in gdbserver
@ 2010-06-20 22:25 Pedro Alves
0 siblings, 0 replies; only message in thread
From: Pedro Alves @ 2010-06-20 22:25 UTC (permalink / raw)
To: gdb-patches
As explained in the patch. Committed.
--
Pedro Alves
2010-06-20 Pedro Alves <pedro@codesourcery.com>
* tracepoint.c (condition_true_at_tracepoint): Don't run compiled
conditions in gdbserver.
---
gdb/gdbserver/tracepoint.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
Index: src/gdb/gdbserver/tracepoint.c
===================================================================
--- src.orig/gdb/gdbserver/tracepoint.c 2010-06-20 22:53:32.000000000 +0100
+++ src/gdb/gdbserver/tracepoint.c 2010-06-20 23:12:00.000000000 +0100
@@ -3923,9 +3923,25 @@ condition_true_at_tracepoint (struct tra
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-20 22:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-20 22:25 Don't run compiled condition expressions in gdbserver Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).