* RFA: Display signed/factored offsets in readelf
@ 2005-04-19 21:05 Daniel Jacobowitz
2005-04-20 9:30 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-04-19 21:05 UTC (permalink / raw)
To: binutils
While butchering some existing CFI annotations, I discovered that readelf
was missing a couple of multiplications by data_factor. OK?
BTW, the GAS cfi annotations don't work "right" with delay slots. Try this
on a mips assembler:
.cfi_startproc
.set noreorder
jr $31
addiu $29, $29, 8
.cfi_adjust_cfa_offset 8
.set reorder
.cfi_endproc
The CFI directive will come out at the beginning of the delay slot. Doesn't
make much practical difference, so I'm not going to track it down right now.
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
* readelf.c (display_debug_frames): Use data factor for
DW_CFA_def_cfa_sf and DW_CFA_def_cfa_offset_sf.
Index: binutils/binutils/readelf.c
===================================================================
--- binutils.orig/binutils/readelf.c 2005-04-12 16:39:11.000000000 -0400
+++ binutils/binutils/readelf.c 2005-04-19 16:50:16.922546591 -0400
@@ -10709,6 +10709,7 @@ display_debug_frames (Elf_Internal_Shdr
case DW_CFA_def_cfa_sf:
fc->cfa_reg = LEB ();
fc->cfa_offset = SLEB ();
+ fc->cfa_offset = fc->cfa_offset * fc->data_factor;
fc->cfa_exp = 0;
if (! do_debug_frames_interp)
printf (" DW_CFA_def_cfa_sf: r%d ofs %d\n",
@@ -10717,6 +10718,7 @@ display_debug_frames (Elf_Internal_Shdr
case DW_CFA_def_cfa_offset_sf:
fc->cfa_offset = SLEB ();
+ fc->cfa_offset = fc->cfa_offset * fc->data_factor;
if (! do_debug_frames_interp)
printf (" DW_CFA_def_cfa_offset_sf: %d\n", fc->cfa_offset);
break;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFA: Display signed/factored offsets in readelf
2005-04-19 21:05 RFA: Display signed/factored offsets in readelf Daniel Jacobowitz
@ 2005-04-20 9:30 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2005-04-20 9:30 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: binutils
Hi Daniel,
> While butchering some existing CFI annotations, I discovered that readelf
> was missing a couple of multiplications by data_factor. OK?
> 005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
>
> * readelf.c (display_debug_frames): Use data factor for
> DW_CFA_def_cfa_sf and DW_CFA_def_cfa_offset_sf.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-20 9:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-19 21:05 RFA: Display signed/factored offsets in readelf Daniel Jacobowitz
2005-04-20 9:30 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).