Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tristan Gingold <gingold@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: James-Adam Renquinha Henri <arenquinha@cimeq.qc.ca>,
	gdb-patches@sourceware.org,
	Christopher Friedt <chrisfriedt@gmail.com>
Subject: Re: [PATCH] (ARM Cortex-M) FPU and PSP aware exception frame unwinder
Date: Thu, 14 Apr 2016 06:34:00 -0000	[thread overview]
Message-ID: <C52395DC-8725-47F6-96DE-4DA0A9FDFD4F@adacore.com> (raw)
In-Reply-To: <570C1D85.1060706@redhat.com>


> On 11 Apr 2016, at 23:56, Pedro Alves <palves@redhat.com> wrote:
> 
> Hi,
> 
> [Adding a few folks who either worked on or expressed
> interest in this before.]
> 
> On 04/07/2016 11:07 PM, James-Adam Renquinha Henri wrote:
>> I submitted it as a bug to the GNU ARM Embedded initially, see here for
>> details: https://bugs.launchpad.net/gcc-arm-embedded/+bug/1566054
>> 
>> Basically, this patch allow gdb to unwind properly an extended stack
>> frame, that is an exception frame with FPU state stacked. Additionally,
>> because all Cortex-M variants have 2 stack pointers, the Main Stack
>> Pointer (MSP) and the Process Stack Pointer (PSP), the code in the patch
>> also check which stack was used prior to the exception. That way,
>> backtraces work beautifully.
>> 
>> In my original submission, I mentioned a known issue that I didn't try
>> to fix *yet*, because that would involve a lot more work, and the impact
>> is relatively minor: for a given outer frame, some FPU registers may not
>> be reported correctly. I hope you don't mind too much. I consider the
>> current patch still useful, because at least backtraces work, and it's
>> an annoyance not to be able to get them.
>> 
> 
> Thanks for the patch.  However, we should really add new target
> descriptions/features that describe these registers to gdb
> instead of looking them up by name.  Please see:
> 
> https://sourceware.org/ml/gdb-patches/2015-12/msg00273.html
> 
> And see more in this earlier attempt at getting the unwinder working:
> 
> https://sourceware.org/ml/gdb-patches/2014-09/msg00649.html
> 
> Tristan also wrote yet another patch for the same, as mentioned at:
> 
>  https://sourceware.org/ml/gdb-patches/2015-12/msg00281.html
> 
> Tristan, did you ever manage to post that?

Not yet.  But I have tested it with two different probes.

> Lots of duplicated effort.  :-/  :-(

Indeed.  But we know that the common part is correct!

Tristan.


  reply	other threads:[~2016-04-14  6:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 22:07 James-Adam Renquinha Henri
2016-04-11 21:03 ` Luis Machado
2016-04-20 16:23   ` James-Adam Renquinha Henri
2016-04-20 16:27     ` Luis Machado
2016-04-11 21:56 ` Pedro Alves
2016-04-14  6:34   ` Tristan Gingold [this message]
2016-04-20 23:14     ` James-Adam Renquinha Henri
2016-04-22 14:17       ` 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=C52395DC-8725-47F6-96DE-4DA0A9FDFD4F@adacore.com \
    --to=gingold@adacore.com \
    --cc=arenquinha@cimeq.qc.ca \
    --cc=chrisfriedt@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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