[Bug backtrace/33495] [gdb/backtrace] Use sframe info in backtrace

indu.bhagat at oracle dot com sourceware-bugzilla@sourceware.org
Thu Dec 11 18:49:04 GMT 2025


https://sourceware.org/bugzilla/show_bug.cgi?id=33495

--- Comment #2 from Indu Bhagat <indu.bhagat at oracle dot com> ---
(In reply to Tom Tromey from comment #1)
> I have no objection to it if someone wants to try, but:
> 
> 1. It should still be possible to build with --disable-sframe,
>    see bug #30588.
> 
> 2. sframe-api.h says:
> 
> /* Find the SFrame Frame Row Entry which contains the PC.  Returns
>    SFRAME_ERR if failure.  */
> 
> extern int
> sframe_find_fre (sframe_decoder_ctx *ctx, int32_t pc,
> 		 sframe_frame_row_entry *frep);
> 
> 
> which seems very weird both due to the use of a signed type
> and also a 32-bit type for the PC.

The "PC" name is confusing, perhaps pc_offset would have been more appropriate.
 This lookup pc is actually the (IP - sframe_vaddr), i.e., an offset from the
start vaddr of the SFrame section.  In SFrame V2, this offset is then compared
against the 'int32_t sfde_func_start_address' field of
sframe_func_desc_entry_v2.

In SFrame V3, this offset will be widended to int64_t.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list