From: Pierre Langlois <pierre.langlois@arm.com>
To: gdb-patches@sourceware.org
Cc: Pierre Langlois <pierre.langlois@arm.com>
Subject: [PATCH 0/2] [GDBserver] Fix compiling conditional expressions accessing registers
Date: Fri, 11 Sep 2015 17:25:00 -0000 [thread overview]
Message-ID: <1441992301-26779-1-git-send-email-pierre.langlois@arm.com> (raw)
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
next reply other threads:[~2015-09-11 17:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 17:25 Pierre Langlois [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441992301-26779-1-git-send-email-pierre.langlois@arm.com \
--to=pierre.langlois@arm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox