Re: Creating and using dwarf information for ARMv7-A exception handlers

Basile Starynkevitch <[email protected]> Thu, 27 Nov 2025 09:41:33 +0100
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On Thu, 2025-11-27 at 09:13 +0100, [email protected] wrote:
> Le 2025-11-26 11:05, Basile Starynkevitch a écrit :
> > On Wed, 2025-11-26 at 11:00 +0100, jh--- via Gdb wrote:
> > > Hi,
> > > 
> > > I am working on an embedded target with a Cortex-A9 CPU. There is a
> > > debug tool based on Eclipse and gdb 10.2.
> > > I would like (if it is possible) to have a complete stack trace when 
> > > my
> > > code is in the SVC handler.
> > 
> > 
> > Did you consider using (in your code, not in GDB)
> > https://github.com/ianlancetaylor/libbacktrace
> 
> Hi,
> 
> Thank you for you answer.
> Is gdb using libbacktrace to perform the call stack unwind?


Perhaps it does, but it is irrelevant since the address space of your debugger process is not the
the address space of your software application. I am assuming you do use some operating system.

For your information, the GCC compiler is using libbacktrace, to show its call trace on fatal compilation errors
(in theory they don't happen).

If you compile your code using GCC (it is probably invoked by Eclipse) you do use libbacktrace indirectly.

If you are developing some code running on a bare metal CPU, you still could (with additional efforts) 
link libbacktrace inside it to show the call stack.

My RefPerSys project is using it (on Linux).

Regards.

NB: We probably are both French, so you could email me privately in French. See https://arxiv.org/abs/1109.0779
and https://frama-c.com/

-- 

Basile STARYNKEVITCH                    basile AT starynkevitch DOT net
8 rue de la Faïencerie                       http://starynkevitch.net/Basile/  
92340 Bourg-la-Reine                         https://github.com/bstarynk
France                                https://github.com/RefPerSys/RefPerSys
                  https://orcid.org/0000-0003-0908-5250