From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nx217.node01.secure-mailgate.com (nx217.node01.secure-mailgate.com [89.22.108.217]) by sourceware.org (Postfix) with ESMTPS id 4E4F43858D33 for ; Fri, 2 Apr 2021 16:05:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4E4F43858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=trande.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=zied.guermazi@trande.de Received: from host202.checkdomain.de ([185.137.168.148]) by node01.secure-mailgate.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1lSMIh-0023Ks-W4; Fri, 02 Apr 2021 18:05:36 +0200 X-SecureMailgate-Identity: zied.guermazi@trande.de;host202.checkdomain.de Received: from [192.168.178.48] (x4db674a5.dyn.telefonica.de [77.182.116.165]) (Authenticated sender: zied.guermazi@trande.de) by host202.checkdomain.de (Postfix) with ESMTPSA id 9190A2C17C4; Fri, 2 Apr 2021 18:05:34 +0200 (CEST) X-SecureMailgate-Identity: zied.guermazi@trande.de;host202.checkdomain.de Subject: Re: [PATCH v3 0/7] extend branch tracing to use ARM CoreSight traces To: Simon Marchi , gdb-patches@sourceware.org References: <20210331025234.518688-1-zied.guermazi@trande.de> <2b5cc0d3-cb97-6252-65dc-7b7db1d1e3f8@polymtl.ca> From: Zied Guermazi Message-ID: <075fb603-8493-ebb6-c4e6-995fd71bf41e@trande.de> Date: Fri, 2 Apr 2021 18:05:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <2b5cc0d3-cb97-6252-65dc-7b7db1d1e3f8@polymtl.ca> Content-Language: en-US X-PPP-Message-ID: <20210402160534.3878655.22213@host202.checkdomain.de> X-PPP-Vhost: trande.de X-Originating-IP: 185.137.168.148 X-SecureMailgate-Domain: host202.checkdomain.de X-SecureMailgate-Username: 185.137.168.148 Authentication-Results: secure-mailgate.com; auth=pass smtp.auth=185.137.168.148@host202.checkdomain.de X-SecureMailgate-Outgoing-Class: ham X-SecureMailgate-Outgoing-Evidence: Combined (0.02) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT+s2hFxqPEY7rcAyMxvRJIMPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5xyqEdt6CnQhppeSX/xINWPhI8gjzT9yHEM1fHPv+pm9nYf gJ55pDnOxWzxymfhhAUcEJUqtZn698k7kZCd7zwAAXDkcXwqI3EzqRI7b1h6dus2Cj/9lGiS8xJ8 gFlvUyg4PWJM2zMugzmIRtzFHL4afz7UQ3+pA9YsKho3IIhZHwyHTF41g9aJXQdr669tzAxShOH2 2SRgbHWq1uciMDoDoHBZrxxqME7mCp43YAhDXoIYFMmJ0aQ7laD+DGTZUaj9/3IVs9pF1X2kRVlf FJ+Kh7xTyrHomk3ykV8XSaKxjDoF1cwbZEcJthebTJehPr3ndEL8IbXBpRiMfP45Wz78wlk3Iika AYYay6zwzan8jE1RQln8i58sC7Rqi7bMRKc7KPGGEytFZMhdzmPuvUEJ4vB6Mmh6nzlzGKK4CNTd FuPNiG0jspaXi6m7a1pBRylTW/o/wfweYsSdx8lmpE4DIvsOvDewgpo9/2BnFiTM5bMiHXCSfkH6 a4xO5LYsPDO3wOzweEy7wCy4L5c/QhZ1Q0Bx8094Bqo0eLiRt5LaVH6YFrhxVw5i30CZMe0+JKqH QAcWaSeYVjwAX0LdM6NnrgO3SBMQr286U6+kVdeM7K5yPvfmYVwWqhzjLKy9AzwBIkUL/j1Y48Gv meURQjjE5eZESXQbKBD78tHlYvwhXGGymWOQ6GmPPB2ZFS7FQCS+eFYOF7hTLSoS9JJWG7GYh/yp TTS/kUfM7AIF6kdNO1zMUOko+akJ9nTkMAVYXCT/EyUYfSCsEnJ6AIyUfOWdW/EN6OpzWBK8DZjE JE5wwhOuT3DCrqcfvP9veALIsDc9h13WgJqE4zXqGvoA7x5dW4IYuBcmm5J9X0kJiaXlLxiwieCc reO4UxobH4R+RtseujkNDaI1BZL4xlheqFLWEGTl6yCeuN8lwOMU0Cs3LXqO8myZpmlspFk2wAGd VxgqKSCmvlrVpOaFe6IjcJj3Uf9EWGgv/ErlqgY5id5zz940eTXlWiUAYdLmsJdAoPKhsK3/AYBH 1xzp4MVkzgkmgUwAc+3A5AHxnqFc14cDVDlXZ6YnsqM0CTLH7yUUuborSpDzjEtjfX8+OHl4cyU6 OkEzNKpKuSwlOMW8kbg97g== X-Report-Abuse-To: spam@node04.secure-mailgate.com X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HTML_MESSAGE, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2021 16:05:41 -0000 hi Simon the patchset applies to this commit commit 39b07596938e4c2a7251d77ea01981d475747599 (*origin/master*, *origin/HEAD*, *master*) Author: GDB Administrator Date: Thu Feb 25 00:00:20 2021 +0000 Automatic date update in version.in Kind Regards Zied Guermazi On 02.04.21 18:02, Simon Marchi wrote: > On 2021-03-30 10:52 p.m., Zied Guermazi wrote: >> This patch set adds support for branch tracing in GDB on arm platforms >> using coresight etm traces >> Branch tracing offers instructions and functions histories as well as >> execution record and replay (forwards and reverse debugging) >> this patch set was tested using the gdb.btrace testsuite on ARMv7 and ARMv8 >> cortex A processors running linux operating system with coresight drivers. >> >> test results of gdb.btrace testsuite on ARMv8, variation unix >> # of expected passes 595 >> # of unexpected failures 1 >> # of unsupported tests 1 >> >> test results of gdb.btrace testsuite on ARMv8 variation native-gdbserver >> # of expected passes 582 >> # of unexpected failures 4 >> # of unsupported tests 2 >> >> test results of gdb.btrace testsuite on ARMv7, variation unix >> >> test results of gdb.btrace testsuite on ARMv7 variation native-gdbserver >> >> >> known limitations: >> for arm v7 only >> - some registers needed for breakpoint address calculation in forwards >> executions may be missing. >> for arm v7 and arm v8 >> - sometimes trace buffers are not flushed properly or flushed in >> the buffer of a different thread. this was observed >> in test scripts only. >> - sometimes, in non-stop mode, while executing "stepi n" for two threads >> in parallel, a thread is hitting breakpoints intended for stepping >> the other one. >> Gdb recognizes that it is intended for the second thread, >> but decreases the step counter. leading to a stepping less than "n" >> times. >> patches are: >> >> Zied Guermazi (7): >> configure gdb build system for supporting btrace on arm processors >> add btrace coresight related commands >> start/stop btrace with coresight etm and parse etm buffer. nat >> independant >> start/stop btrace with coresight etm and collect etm buffer on linux >> os >> fix issue: gdb hangs in the command following a commad returning with >> TARGET_WAITKIND_NO_HISTORY >> add support for coresight btrace via remote protocol >> adapt btrace testcases for arm target >> >> gdb/ChangeLog | 139 +++ >> gdb/Makefile.in | 5 +- >> gdb/NEWS | 30 + >> gdb/aarch64-linux-nat.c | 68 ++ >> gdb/arch/arm.h | 33 + >> gdb/arm-linux-nat.c | 68 ++ >> gdb/btrace.c | 977 +++++++++++++++++- >> gdb/btrace.h | 16 +- >> gdb/config.in | 3 + >> gdb/configure | 545 ++++++++++ >> gdb/configure.nat | 4 +- >> gdb/doc/gdb.texinfo | 115 ++- >> gdb/features/btrace-conf.dtd | 10 +- >> gdb/features/btrace.dtd | 38 +- >> gdb/infrun.c | 3 +- >> gdb/nat/linux-btrace.c | 400 ++++++- >> gdb/nat/linux-btrace.h | 19 + >> gdb/record-btrace.c | 168 ++- >> gdb/record.c | 2 + >> gdb/remote.c | 66 +- >> .../gdb.btrace/aarch64-instruction_history.S | 31 + >> .../gdb.btrace/aarch64-record_goto.S | 400 +++++++ >> .../gdb.btrace/aarch64-tailcall-only.S | 517 +++++++++ >> gdb/testsuite/gdb.btrace/aarch64-tailcall.S | 409 ++++++++ >> .../gdb.btrace/arm-instruction_history.S | 31 + >> gdb/testsuite/gdb.btrace/arm-record_goto.S | 433 ++++++++ >> gdb/testsuite/gdb.btrace/arm-tailcall-only.S | 504 +++++++++ >> gdb/testsuite/gdb.btrace/arm-tailcall.S | 391 +++++++ >> gdb/testsuite/gdb.btrace/buffer-size.exp | 15 +- >> gdb/testsuite/gdb.btrace/delta.exp | 10 + >> .../gdb.btrace/instruction_history.exp | 107 +- >> gdb/testsuite/gdb.btrace/non-stop.exp | 60 +- >> gdb/testsuite/gdb.btrace/record_goto.exp | 241 +++-- >> gdb/testsuite/gdb.btrace/stepi.exp | 95 +- >> gdb/testsuite/gdb.btrace/tailcall-only.exp | 8 + >> gdb/testsuite/gdb.btrace/tailcall.exp | 46 +- >> ...on_history.S => x86-instruction_history.S} | 0 >> gdb/testsuite/lib/gdb.exp | 2 +- >> gdb/top.c | 10 +- >> gdbserver/ChangeLog | 16 + >> gdbserver/config.in | 3 + >> gdbserver/configure | 545 ++++++++++ >> gdbserver/configure.srv | 4 + >> gdbserver/linux-low.cc | 104 +- >> gdbserver/server.cc | 34 +- >> gdbsupport/ChangeLog | 29 + >> gdbsupport/Makefile.in | 3 + >> gdbsupport/btrace-common.cc | 46 + >> gdbsupport/btrace-common.h | 115 ++- >> gdbsupport/common.m4 | 39 + >> gdbsupport/config.in | 3 + >> gdbsupport/configure | 545 ++++++++++ >> 52 files changed, 7347 insertions(+), 158 deletions(-) >> create mode 100644 gdb/testsuite/gdb.btrace/aarch64-instruction_history.S >> create mode 100644 gdb/testsuite/gdb.btrace/aarch64-record_goto.S >> create mode 100644 gdb/testsuite/gdb.btrace/aarch64-tailcall-only.S >> create mode 100644 gdb/testsuite/gdb.btrace/aarch64-tailcall.S >> create mode 100644 gdb/testsuite/gdb.btrace/arm-instruction_history.S >> create mode 100644 gdb/testsuite/gdb.btrace/arm-record_goto.S >> create mode 100644 gdb/testsuite/gdb.btrace/arm-tailcall-only.S >> create mode 100644 gdb/testsuite/gdb.btrace/arm-tailcall.S >> rename gdb/testsuite/gdb.btrace/{instruction_history.S => x86-instruction_history.S} (100%) >> > Hi Zied, > > I'd like to take a quick look, but I am not able to apply your patchset, > it seems you weren't on the latest master at the time you sent it. Do > you know which sha1 your patchset applies on? > > Simon