From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124804 invoked by alias); 11 Sep 2015 17:25:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 124794 invoked by uid 89); 11 Sep 2015 17:25:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Sep 2015 17:25:08 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-31-ZOUlbJi9RkODJeDCZ5TNhQ-1; Fri, 11 Sep 2015 18:25:04 +0100 Received: from e105615-lin.cambridge.arm.com ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 11 Sep 2015 18:25:03 +0100 From: Pierre Langlois To: gdb-patches@sourceware.org Cc: Pierre Langlois Subject: [PATCH 0/2] [GDBserver] Fix compiling conditional expressions accessing registers Date: Fri, 11 Sep 2015 17:25:00 -0000 Message-Id: <1441992301-26779-1-git-send-email-pierre.langlois@arm.com> X-MC-Unique: ZOUlbJi9RkODJeDCZ5TNhQ-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00239.txt.bz2 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 =3D=3D *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 =3D=3D *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 --=20 2.4.6