-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Hi,
ida-syms2elf supports exporting function names, label, etc. I was able to import the symbols in gdb which is really cool. Would it be possible to add local types as well? Eg in GDB, it is then possible to import them using "add-symbol-file", the same method I use to import function names, label, etc.
For example, if we have the following type:
// sample.h
struct sample {
int i;
struct sample *less;
struct sample *more;
};
In GDB, we don't have the type by default:
(gdb) p (struct sample *)0x7fffffffd6b0
No struct type named sample.
After importing the file containing the local types, we would be able to print the structure elements:
(gdb) add-symbol-file sample.o 0
add symbol table from file "sample.o" at
.text_addr = 0x0
(gdb) p (struct sample *)0x7fffffffd6b0
$1 = (struct sample *) 0x7fffffffd6b0
(gdb) p *$1
$2 = {i = 42, less = 0x7fffffffd6b0, more = 0x7fffffffd6b0}
Regards
saidelike
[1] http://stackoverflow.com/questions/7272558/can-we-define-a-new-data-type-in-a-gdb-session
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels