From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42387 invoked by alias); 20 Aug 2015 07:38:14 -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 41765 invoked by uid 89); 20 Aug 2015 07:38:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ob0-f177.google.com Received: from mail-ob0-f177.google.com (HELO mail-ob0-f177.google.com) (209.85.214.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 20 Aug 2015 07:38:12 +0000 Received: by obbhe7 with SMTP id he7so25469614obb.0 for ; Thu, 20 Aug 2015 00:38:10 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.255.200 with SMTP id as8mr1528197obd.30.1440056290644; Thu, 20 Aug 2015 00:38:10 -0700 (PDT) Received: by 10.76.10.196 with HTTP; Thu, 20 Aug 2015 00:38:10 -0700 (PDT) In-Reply-To: <1433628336-24058-1-git-send-email-jcmvbkbc@gmail.com> References: <1433628336-24058-1-git-send-email-jcmvbkbc@gmail.com> Date: Thu, 20 Aug 2015 07:38:00 -0000 Message-ID: Subject: Re: [PATCH] xtensa: initialize call_abi in xtensa_tdep From: Max Filippov To: gdb-patches@sourceware.org Cc: Maxim Grigoriev , Woody LaRue , Marc Gauthier , Max Filippov Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-08/txt/msg00534.txt.bz2 On Sun, Jun 7, 2015 at 1:05 AM, Max Filippov wrote: > Use XSHAL_ABI value provided by xtensa-config.h to correctly initialize > xtensa_tdep.call_abi > This fixes calls to functions from GDB that otherwise fail with the > following assertion in call0 configuration: > > gdb/regcache.c:602: internal-error: regcache_raw_read: Assertion > `regnum >= 0 && regnum < regcache->descr->nr_raw_registers' failed. > > gdb/ > * xtensa-tdep.h (XTENSA_GDBARCH_TDEP_INSTANTIATE): Initialize > call_abi using XSHAL_ABI macro. > --- > gdb/xtensa-tdep.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h > index adacaf8..3b6ea66 100644 > --- a/gdb/xtensa-tdep.h > +++ b/gdb/xtensa-tdep.h > @@ -246,7 +246,8 @@ struct gdbarch_tdep > .spill_location = -1, \ > .spill_size = (spillsz), \ > .unused = 0, \ > - .call_abi = 0, \ > + .call_abi = (XSHAL_ABI == XTHAL_ABI_CALL0) ? \ > + CallAbiCall0Only : CallAbiDefault, \ > .debug_interrupt_level = XCHAL_DEBUGLEVEL, \ > .icache_line_bytes = XCHAL_ICACHE_LINESIZE, \ > .dcache_line_bytes = XCHAL_DCACHE_LINESIZE, \ > -- Ping? -- Thanks. -- Max