Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org, Maxim Grigoriev <maxim2405@gmail.com>,
		Woody LaRue <larue@cadence.com>,
	Marc Gauthier <marc@cadence.com>
Subject: Re: [PATCH v2] xtensa: initialize call_abi in xtensa_tdep
Date: Thu, 20 Aug 2015 13:37:00 -0000	[thread overview]
Message-ID: <CAMo8BfK3AKap6eSV0j4hL1MypgH=D81jK1DAMEapKsUSOB3Jfw@mail.gmail.com> (raw)
In-Reply-To: <20150820130736.GF4571@adacore.com>

On Thu, Aug 20, 2015 at 4:07 PM, Joel Brobecker <brobecker@adacore.com> wrote:
> On Thu, Aug 20, 2015 at 03:52:40PM +0300, 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.
>
> I think you missed or ignored one comment about the fact that
> the code I am seeing in current xtensa-tdep.h is not what your patch
> says.

Sorry, I'm not sure what you mean. I've changed call_abi initialization
in the macro XTENSA_GDBARCH_TDEP_INSTANTIATE in file
gdb/xtensa-tdep.h from 'call_abi = 0' to 'call_abi = (XSHAL_ABI == ...',
which I wrote to the changelog.

> So it seems to me you are sending a patch that doesn't seem
> to be applying to master.

You're right, I haven't rebased v2 to the current master and now it indeed
does not apply. I'll send fixed v3.

> I would also be beneficial to explore what I was trying to explain
> regarding the fact that determining the proper ABI should be done
> on the fly, rather than hardcoded. This is particularly true with
> the fact that changing the hardcoded values involves adapting
> the contents of a file, which is not user-friendly, and nearly
> impossible for anyone but a knowledgeable GDB contributor.

Actually it's as simple as unpacking a tarball to the source directory,
and we have it automated in the environments that build toolchains,
like the Buildroot or the crosstool-NG.

The idea behind this is the following: Xtensa core is configurable, a lot
of its properties may be changed. Nobody even try to test all possible
combinations of configuration options and nobody really cares how many
Xtensa core configurations exist, people that generate Xtensa core
only care about their particular core. When they generate it they get
all the files that need to be changed in the toolchain, they apply them
and they get the toolchain for their particular core.

-- 
Thanks.
-- Max


  parent reply	other threads:[~2015-08-20 13:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20 12:53 Max Filippov
2015-08-20 13:07 ` Joel Brobecker
2015-08-20 13:14   ` [RFC] " Joel Brobecker
2015-08-20 13:44     ` Max Filippov
2015-08-20 13:37   ` Max Filippov [this message]
2015-08-20 14:13     ` Pedro Alves
2015-08-20 20:30       ` Marc Gauthier
2015-08-21  9:49         ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMo8BfK3AKap6eSV0j4hL1MypgH=D81jK1DAMEapKsUSOB3Jfw@mail.gmail.com' \
    --to=jcmvbkbc@gmail.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=larue@cadence.com \
    --cc=marc@cadence.com \
    --cc=maxim2405@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox