From patchwork Tue Mar 10 10:32:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 5545 Received: (qmail 50977 invoked by alias); 10 Mar 2015 10:33:02 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 50927 invoked by uid 89); 10 Mar 2015 10:33:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp16.uk.ibm.com Received: from e06smtp16.uk.ibm.com (HELO e06smtp16.uk.ibm.com) (195.75.94.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 10 Mar 2015 10:33:01 +0000 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Mar 2015 10:32:57 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp16.uk.ibm.com (192.168.101.146) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 10 Mar 2015 10:32:56 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1DC4D1B0804B for ; Tue, 10 Mar 2015 10:33:16 +0000 (GMT) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2AAWt3l59900070 for ; Tue, 10 Mar 2015 10:32:55 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2AAWthI009972 for ; Tue, 10 Mar 2015 04:32:55 -0600 Received: from br87z6lw.de.ibm.com (sig-9-84-137-148.evts.de.ibm.com [9.84.137.148]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t2AAWrMf009898; Tue, 10 Mar 2015 04:32:53 -0600 From: Andreas Arnez To: gdb-patches@sourceware.org Cc: Ulrich Weigand Subject: [PATCH] S390: Skip prologue using SAL information, if possible Date: Tue, 10 Mar 2015 11:32:53 +0100 Message-ID: <87vbi9f8h6.fsf@br87z6lw.de.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15031010-0025-0000-0000-000004388F2E X-IsSubscribed: yes Instead of analyzing the prologue and possibly coming to a wrong conclusion, this change tries to skip the prologue with the use of skip_prologue_using_sal. Only if that fails, the prologue analyzer is invoked as before. gdb/ChangeLog: * s390-linux-tdep.c (s390_skip_prologue): Skip the prologue using SAL, if possible. --- gdb/s390-linux-tdep.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index e33eb8e..cafa57b 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -1462,7 +1462,16 @@ static CORE_ADDR s390_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) { struct s390_prologue_data data; - CORE_ADDR skip_pc; + CORE_ADDR skip_pc, func_addr; + + if (find_pc_partial_function (pc, NULL, &func_addr, NULL)) + { + CORE_ADDR post_prologue_pc + = skip_prologue_using_sal (gdbarch, func_addr); + if (post_prologue_pc != 0) + return max (pc, post_prologue_pc); + } + skip_pc = s390_analyze_prologue (gdbarch, pc, (CORE_ADDR)-1, &data); return skip_pc ? skip_pc : pc; }