This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: cortex-m xml register descriptions for m-system
- From: Tristan Gingold <gingold at adacore dot com>
- To: Christopher Friedt <chrisfriedt at gmail dot com>
- Cc: Pedro Alves <palves at redhat dot com>, Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Thu, 17 Dec 2015 09:31:56 +0100
- Subject: Re: cortex-m xml register descriptions for m-system
- Authentication-results: sourceware.org; auth=none
- References: <CAF4BF-RuPwFWfDa2Sp7MzYjF8bo1K3xb=jMThSpK4T7gTe+whQ at mail dot gmail dot com> <566F108D dot 1000401 at redhat dot com> <CAF4BF-TUH0V4=YY07u9n3q=dMecbjMr9cOrEm=2BDXeP3HrDQQ at mail dot gmail dot com> <566F5B1A dot 8040703 at redhat dot com> <CAF4BF-Tk0yEgjpf=ujaLJbrFtkp_ujKYv4rpjtqTBdYXMYFQ4A at mail dot gmail dot com> <F678ABCB-7AD9-48F2-AC4B-713542287C4A at adacore dot com> <CAF4BF-RhPPpW3FhXadbGqxafxmLyyHAwGPokpupnUZqVucYyfw at mail dot gmail dot com>
> On 16 Dec 2015, at 18:12, Christopher Friedt <chrisfriedt@gmail.com> wrote:
>
> On Wed, Dec 16, 2015 at 8:51 AM, Tristan Gingold <gingold@adacore.com> wrote:
>>
>>> On 15 Dec 2015, at 16:35, Christopher Friedt <chrisfriedt@gmail.com> wrote:
>>>
>>> Just so we can have consensus, please indicate what you think is the
>>> best solution - Pedro, Yao, & Tristan.
>>>
>>> Based on Tristan's feedback as well, it confirms that these registers
>>> are necessary for DWARF handling.
>>
>> Not sure about that. To my understanding, DWARF doesnât need to refer
>> to psp or msp.
>
> Wait... just yesterday you wrote:
>
> "I do think so too.
>
> I have just written a patch so that gdb unwinds correctly on cortex-m
> exceptions, and this of course requires that gdb knows about at least
> psp."
>
> Maybe I'm confused. I presumed DWARF was involved in unwinding to some
> extent, but if its purely just used for debugging, it might not
> require PSP / MSP at all.
No, for unwinding through HW exceptions, dwarf is not used and couldnât
be use: there is no code at the return addresses.
PSP is required because that can be previous stack before the exception.
> In any case PSP / MSP are most definitely used in unwinding.
I think that only PSP and SP are required (of course SP could be MSP).
Tristan.