Closed nneonneo closed 1 year ago
After implementing it, it seems it doesn't affect objdump, actually, and GDB seems to use the low bit of PC to decide what mode to use. Not sure if this will be as useful as I thought it would be.
Additionally, due to a bug in libdwarf, implementing this bloats the line number table considerably: DW_LNS_set_isa
is generated for every instruction because the library doesn't implement the prev_line check correctly.
Closing as WONTFIX for now.
Currently,
objdump
on an exported Thumb binary shows all ARM code. ISA state is encoded in the line number table using the specialDW_LNS_set_isa
opcode. We can get the ISA mode from Ghidra's Tmode context register, and apply this opcode by using theisa
argument todwarf_add_line_entry_c
.