Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] [GDBserver] Fix compiling conditional expressions accessing registers
@ 2015-09-11 17:25 Pierre Langlois
  2015-09-11 17:25 ` [PATCH 2/2] [testsuite] Add test case for tracepoints with conditions Pierre Langlois
  2015-09-11 17:25 ` [PATCH 1/2] [GDBserver] Fix compiling conditional expressions accessing registers Pierre Langlois
  0 siblings, 2 replies; 9+ messages in thread
From: Pierre Langlois @ 2015-09-11 17:25 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pierre Langlois

Hi all,

I noticed compiled conditions for fast tracepoints failed to read
registers.  We can uncover the issue by compiling and executing the
following expression: `$rip == *set_point' on x86_64, with `set_point'
being the tracepoint symbol.  The expression should always be true but this
shows it isn't:

~~~
(gdb) ftrace set_point if $rip == *set_point
Fast tracepoint 2 at 0x4006b9: ...
(gdb) tstart
(gdb) continue
Continuing.

Breakpoint 3, end () at ..
(gdb) tstatus
Trace is running on the target.
Collected 0 trace frames.
^^^^^^^^^^^^^^^^^^^^^^^^^
Trace buffer has 5242880 bytes of 5242880 bytes free (0% full).
Trace will stop if GDB disconnects.
Not looking at any trace frame.
Trace started at 1441727485.544642 secs.
~~~

The following patches address this particular issue and adds a test case.
However, the test cases uncovered other issues which have been marked as
known failures, linking to PR/18955.

I have ran the test suite on both x86_64-linux and i386-linux, in a remote
configuration.

Thanks,
Pierre

Pierre Langlois (2):
  [GDBserver] Fix compiling conditional expressions accessing registers
  [testsuite] Add test case for tracepoints with conditions

 gdb/gdbserver/linux-amd64-ipa.c             |   9 --
 gdb/gdbserver/linux-i386-ipa.c              |  15 ---
 gdb/gdbserver/linux-x86-low.c               |   4 +-
 gdb/gdbserver/tracepoint.c                  |  42 ++++---
 gdb/gdbserver/tracepoint.h                  |   9 +-
 gdb/testsuite/gdb.trace/trace-condition.c   |  66 +++++++++++
 gdb/testsuite/gdb.trace/trace-condition.exp | 167 ++++++++++++++++++++++++++++
 7 files changed, 263 insertions(+), 49 deletions(-)
 create mode 100644 gdb/testsuite/gdb.trace/trace-condition.c
 create mode 100644 gdb/testsuite/gdb.trace/trace-condition.exp

-- 
2.4.6


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-09-17  8:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-11 17:25 [PATCH 0/2] [GDBserver] Fix compiling conditional expressions accessing registers Pierre Langlois
2015-09-11 17:25 ` [PATCH 2/2] [testsuite] Add test case for tracepoints with conditions Pierre Langlois
2015-09-16  9:19   ` Yao Qi
2015-09-17  8:51   ` Yao Qi
2015-09-11 17:25 ` [PATCH 1/2] [GDBserver] Fix compiling conditional expressions accessing registers Pierre Langlois
2015-09-16  9:15   ` Yao Qi
2015-09-16 11:50     ` Ulrich Weigand
2015-09-16 13:54       ` Pedro Alves
2015-09-16 15:03         ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox