Page MenuHomeFreeBSD

readelf: Add RISC-V DWARF register aliases
ClosedPublic

Authored by mhorne on Jun 27 2019, 1:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 8, 7:16 PM
Unknown Object (File)
Wed, Jun 24, 6:48 AM
Unknown Object (File)
Sat, Jun 20, 4:09 AM
Unknown Object (File)
Thu, Jun 18, 2:52 AM
Unknown Object (File)
Jun 17 2026, 2:44 AM
Unknown Object (File)
Jun 11 2026, 2:02 AM
Unknown Object (File)
May 22 2026, 6:23 PM
Unknown Object (File)
May 22 2026, 4:21 PM
Subscribers

Details

Summary

This allows DWARF debugging output to display the common register
mneumonics, such as ra, sp, or t0.

DWARF registers 0-31 are mapped to the 32 general purpose registers,
and are immediately followed by the 32 floating point registers.

Test Plan

Sample output from readelf -wf:

0000b138 0000002c 0000ac68 FDE cie=0000ac68 pc=000465fe..00046656
  DW_CFA_advance_loc: 6 to 00046604
  DW_CFA_def_cfa_offset: 32
  DW_CFA_advance_loc: 8 to 0004660c
  DW_CFA_offset: r8 (s0) at cfa-16
  DW_CFA_offset: r9 (s1) at cfa-24
  DW_CFA_offset: r18 (s2) at cfa-32
  DW_CFA_offset: r1 (ra) at cfa-8
  DW_CFA_advance_loc1: 60 to 00046648
  DW_CFA_restore: r1 (ra)
  DW_CFA_advance_loc: 2 to 0004664a
  DW_CFA_restore: r18 (s2)
  DW_CFA_advance_loc: 6 to 00046650
  DW_CFA_restore: r8 (s0)
  DW_CFA_advance_loc: 2 to 00046652
  DW_CFA_restore: r9 (s1)
  DW_CFA_advance_loc: 2 to 00046654
  DW_CFA_def_cfa_offset: 0

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable