From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7975 invoked by alias); 3 Jun 2014 05:00:17 -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 7958 invoked by uid 89); 3 Jun 2014 05:00:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Jun 2014 05:00:15 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5350ELA022116 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 3 Jun 2014 01:00:14 -0400 Received: from redacted.bos.redhat.com ([10.18.17.143]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5350CTX027944 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO) for ; Tue, 3 Jun 2014 01:00:13 -0400 Date: Tue, 03 Jun 2014 05:00:00 -0000 From: Kyle McMartin To: gdb-patches@sourceware.org Subject: [PATCH 0/2] aarch64: skip over stack protector setup in function prologues Message-ID: <20140603050011.GA15355@redacted.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00056.txt.bz2 When debugging code which ends up with stack protector setup in the function prologue, break points on functions end up stopping in the prologue, instead of on a useful statement inside the function. To fix this, do something similar to ARM (which has more cases to handle) and analyse the instructions we stopped at to see if its the stack protector sequence. Also add a simple testcase to check to see if we successfully manage to end up on the statement we expect or not. (Which could also be used as a test on ARM, but I don't have hardware handy, will investigate later.) regards, Kyle gdb/aarch64-tdep.c | 125 +++++++++++++++++++-- gdb/testsuite/gdb.arch/aarch64-stack_chk_guard.c | 28 +++++ gdb/testsuite/gdb.arch/aarch64-stack_chk_guard.exp | 43 +++++++ 3 files changed, 189 insertions(+), 7 deletions(-)