This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] (ARM Cortex-M) FPU and PSP aware exception frame unwinder

I submitted it as a bug to the GNU ARM Embedded initially, see here for details:

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.

James-Adam Renquinha Henri, Ing. jr
Ingenieur d'application

Attachment: patch
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]