From patchwork Thu Apr 10 16:30:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Langlois X-Patchwork-Id: 491 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id 6A9B636073B for ; Thu, 10 Apr 2014 09:30:48 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14314964) id 0F650112719A; Thu, 10 Apr 2014 09:30:48 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id E305F112F215 for ; Thu, 10 Apr 2014 09:30:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; q=dns; s=default; b=CZE 3jNnBtrW48uMtVG5emmar+Gr9K0s1zWXiSOZ2/t38on6ZVlJzoQdafCzgmx9DGGo pXm9rc27Ednzn4tuDG+m/MRDR+bujaAs7jKObj12Y7Pt2mhdqxJekxcTKyibRNl0 mBfu9ddFbHqhfhB57efnpk15UvvtzS/3SIEyGPpw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; s=default; bh=xzWMF8G0a Um/Ku+GeNVy2iHoz9Q=; b=sQMd5Cavit2mqiHiieAAcJd+JSGEP6XRRg5JaGavd 1VP0qgysW/btOrheCuwPp6Q3QOT6U0pBW6/JOpcaihDSi6tEDn7b9az+i517t1Jg wKJoyotLTvJusq+icMTI1JANSYygkaEr1BE1xMTnaFfehSPehJRWzBY19RKoY4Lx IM= Received: (qmail 26122 invoked by alias); 10 Apr 2014 16:30:46 -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 26111 invoked by uid 89); 10 Apr 2014 16:30:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-wg0-f42.google.com Received: from mail-wg0-f42.google.com (HELO mail-wg0-f42.google.com) (74.125.82.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 10 Apr 2014 16:30:42 +0000 Received: by mail-wg0-f42.google.com with SMTP id y10so4143718wgg.25 for ; Thu, 10 Apr 2014 09:30:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=3tkqWsjA680Qq6hFuwIyL0bWrwJAUqFvA079s4xx/yc=; b=e1p5l6tVzxWm+KYhcGfSLgwsJ+OLph6Fx0oRNcxa3GNMevW+RQrzp/eKcH0UBiC0S6 nam6Iw32VC77skLswQgDOzUbGHi03HHS+4ifDvhnc8/+ACdT0JabXXrx7jCW9K/xFYCQ 2iZn4FaiP2vxYNVaZZqtO36YgRkVQw9bz17IAYPAWEaf/2tfK3kyXMCCPgoSVLkfjCeN bFAtBNTWak3VGjOsU9j/sZv8673aKdFeIbkrJwMjvG32l7ibTd47A6At34RmsjwdJDSW 5xWAETfg8lxlQck55uz4HFQLG95rN0m8LA/skXgKiC0P9BXZYhQ3gm9IWuHl0Viw8kwe JKiQ== X-Gm-Message-State: ALoCoQmC//ucZLhg61Bv01fNRslr4n5w0uXzFcxaBeqUcn4Ts6rGBZ2O0zem1Y4JumEWPQQEw1/m X-Received: by 10.194.92.228 with SMTP id cp4mr1932106wjb.81.1397147439102; Thu, 10 Apr 2014 09:30:39 -0700 (PDT) Received: from [192.168.0.134] (cust64-dsl91-135-5.idnet.net. [91.135.5.64]) by mx.google.com with ESMTPSA id d6sm11983717wiz.4.2014.04.10.09.30.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 09:30:38 -0700 (PDT) Message-ID: <5346C72D.70601@embecosm.com> Date: Thu, 10 Apr 2014 17:30:37 +0100 From: Pierre Langlois User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [PATCH] Backport AVR fixes X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in Hi all, Would it be OK to backport these two commits to gdb-7.7-branch for the next 7.7.1 release? https://sourceware.org/ml/gdb-patches/2014-04/msg00097.html https://sourceware.org/ml/gdb-patches/2014-03/msg00425.html I am not yet familiar with the process of backporting patches in GDB, let me know if I am doing this correctly. For instance, should I break this into several commits? Best, Pierre 2014-04-08 Pierre Langlois * avr-tdep.c (struct gdbarch_tdep): Mention avrxmega in the comment. (avr_gdbarch_init): Add xmega architectures given by bfd_architecture when setting the size of call_length. (avr_scan_prologue): Accept push r1 instruction for small stack allocation. * MAINTAINERS (Write After Approval): Add "Pierre Langlois". --- gdb/MAINTAINERS | 1 + gdb/avr-tdep.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS index ffd310b..c0297c1 100644 --- a/gdb/MAINTAINERS +++ b/gdb/MAINTAINERS @@ -546,6 +546,7 @@ Jim Kingdon kingdon@panix.com Paul Koning paul_koning@dell.com Jan Kratochvil jan.kratochvil@redhat.com Maxim Kuvyrkov maxim@kugelworks.com +Pierre Langlois pierre.langlois@embecosm.com Jonathan Larmour jifl@ecoscentric.com Jeff Law law@redhat.com Justin Lebar justin.lebar@gmail.com diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index cb330ea..1be9e7d 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -179,7 +179,7 @@ struct avr_unwind_cache struct gdbarch_tdep { /* Number of bytes stored to the stack by call instructions. - 2 bytes for avr1-5, 3 bytes for avr6. */ + 2 bytes for avr1-5 and avrxmega1-5, 3 bytes for avr6 and avrxmega6-7. */ int call_length; /* Type for void. */ @@ -719,7 +719,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end, info->size += gdbarch_tdep (gdbarch)->call_length; vpc += 2; } - else if (insn == 0x920f) /* push r0 */ + else if (insn == 0x920f || insn == 0x921f) /* push r0 or push r1 */ { info->size += 1; vpc += 2; @@ -1355,14 +1355,21 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) switch (info.bfd_arch_info->mach) { case bfd_mach_avr1: + case bfd_mach_avrxmega1: case bfd_mach_avr2: + case bfd_mach_avrxmega2: case bfd_mach_avr3: + case bfd_mach_avrxmega3: case bfd_mach_avr4: + case bfd_mach_avrxmega4: case bfd_mach_avr5: + case bfd_mach_avrxmega5: default: call_length = 2; break; case bfd_mach_avr6: + case bfd_mach_avrxmega6: + case bfd_mach_avrxmega7: call_length = 3; break; }