Way to make register variable visible by gdb

Jim Wilson jimw@sifive.com
Fri Aug 13 20:28:13 GMT 2021


On Wed, Aug 11, 2021 at 3:50 PM Yuri Karlsbrun via Gcc-help <
gcc-help@gcc.gnu.org> wrote:

> By default gcc register variables are missing from symbol table, and not
> visible by gdb. Is there a way to save information about register variables
> in the object file, and make it visible by gdb?
>

A small testcase to reproduce would be useful to understand what you are
talking about.  Are you using register or asm("register")?  Is this a local
or global?  What target are you compiling for?  What compiler options are
you using?  What debug info format are you using?  Dwarf, stabs?  Why do
you think the debug info is missing?  Can you show some gdb output?  If you
are using stabs, then that is probably why it is failing for you.  Use
dwarf instead.

JIm


More information about the Gcc-help mailing list