[PATCH] binutils: dwarf: fix display of large cfa_offset

Jan Beulich jbeulich@suse.com
Mon Aug 18 10:31:42 GMT 2025


On 16.08.2025 10:14, Indu Bhagat via Binutils wrote:
> @@ -9071,7 +9072,8 @@ frame_display_row (Frame_Chunk *fc, int *need_col_headers, unsigned int *max_reg
>    if (fc->cfa_exp)
>      strcpy (tmp, "exp");
>    else
> -    sprintf (tmp, "%s%+d", regname (fc->cfa_reg, 1), (int) fc->cfa_offset);
> +    sprintf (tmp, (fc->cfa_ofs_signed_p ? "%s%" PRId64 : "%s+%" PRIu64),
> +	     regname (fc->cfa_reg, 1), fc->cfa_offset);

"signed" doesn't necessarily mean "negative", so the + format modifier that
was there needs restoring in the middle operand of the ternary operator. Okay
with that adjustment.

Jan


More information about the Binutils mailing list