From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3925 invoked by alias); 18 Jan 2013 09:25:58 -0000 Received: (qmail 3908 invoked by uid 22791); 18 Jan 2013 09:25:57 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,TW_EG X-Spam-Check-By: sourceware.org Received: from usmamail.tilera.com (HELO USMAMAIL.TILERA.COM) (12.216.194.151) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Jan 2013 09:25:50 +0000 Received: from localhost.localdomain (124.207.145.166) by USMAExch2.tad.internal.tilera.com (10.3.0.33) with Microsoft SMTP Server (TLS) id 14.0.694.0; Fri, 18 Jan 2013 04:25:49 -0500 Message-ID: <50F91516.6010204@tilera.com> Date: Fri, 18 Jan 2013 09:25:00 -0000 From: Jiong Wang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: CC: Walter Lee Subject: [RFC/TileGX 2/6] simplify the handling of skip prologue for plt stub Content-Type: multipart/mixed; boundary="------------000301050104090200010008" 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 X-SW-Source: 2013-01/txt/msg00406.txt.bz2 --------------000301050104090200010008 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 290 for tilegx, when skip prologue, if the start_pc is a plt stub address, then stop to go further, just return the start_pc. gdb/ChangeLog: * tilegx-tdep.c (tilegx_skip_prologue): simplify the handling for plt stub. please review. --- Regards, Jiong Tilera Corporation. --------------000301050104090200010008 Content-Type: text/x-patch; name="0003-fix-plt-stub-issue.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0003-fix-plt-stub-issue.patch" Content-length: 575 --- gdb/tilegx-tdep.c | 4 ++++ 1 files changed, 4 insertions(+) diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c index 2f1d824..6432edb 100644 --- a/gdb/tilegx-tdep.c +++ b/gdb/tilegx-tdep.c @@ -746,6 +746,10 @@ tilegx_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) return sal.end; } + /* for plt stub, just return the start pc */ + if (in_plt_section (pc, NULL)) + return pc; + /* Otherwise, try to skip prologue the hard way. */ return tilegx_analyze_prologue (gdbarch, pc, pc + 8 * TILEGX_BUNDLE_SIZE_IN_BYTES, -- 1.7.10.3 --------------000301050104090200010008--