cesena / ghidra2dwarf

🐉 Export ghidra decompiled code to dwarf sections inside ELF binary
MIT License
179 stars 17 forks source link

Typedefs not exported #4

Closed io12 closed 3 years ago

io12 commented 3 years ago

This tool doesn't export typedef information, which breaks GEF.

It causes problems because of this behavior:

(gdb)  p *(uint64_t *) 0x7fffffffe080
$1 = uint64_t

Using unsigned long instead of uint64_t has the expected behavior:

(gdb)  p *(unsigned long *) 0x7fffffffe080
$2 = 0x1

It should be printing the value, but it's printing the type instead. Probably gdb is doing this because, without typedef information, it thinks uint64_t is some kind of void-like opaque type.

The error this causes in GEF is:

[!] Command 'dereference' failed to execute properly, reason: Cannot convert value to long.
NextLight commented 3 years ago

@io12 please let me know if this fixes your issue.

io12 commented 3 years ago

It seems to fix the issue. Thanks!