mirror of
https://github.com/radareorg/radare2.git
synced 2026-04-16 23:05:40 +02:00
82 lines
1.9 KiB
Plaintext
82 lines
1.9 KiB
Plaintext
NAME=fnj shows demangled symbols
|
|
FILE=bins/elf/demangle-test-cpp
|
|
ARGS=-e bin.types=true
|
|
CMDS=<<EOF
|
|
aaa
|
|
fj~{} > $fj
|
|
$fj~__throw_length_error_char_const_
|
|
fnj~{} > $fnj
|
|
$fnj~__throw_length_error_char_const_
|
|
""js a=r2.cmdj("fj").filter((x)=>x.name.indexOf("throw") !== -1);console.log(JSON.stringify(a,null, 2))
|
|
EOF
|
|
EXPECT=<<EOF
|
|
"name": "sym.imp.std::__throw_length_error_char_const_",
|
|
"name": "reloc.std::__throw_length_error_char_const_",
|
|
"name": "method.std.__throw_length_error_char_const_",
|
|
"name": "sym.imp.std::__throw_length_error_char_const_",
|
|
"name": "reloc.std::__throw_length_error_char_const_",
|
|
"name": "method.std.__throw_length_error_char_const_",
|
|
[
|
|
{
|
|
"name": "sym.imp.std::__throw_bad_alloc__",
|
|
"realname": "std::__throw_bad_alloc()",
|
|
"size": 6,
|
|
"addr": 4144
|
|
},
|
|
{
|
|
"name": "sym.imp.std::__throw_length_error_char_const_",
|
|
"realname": "std::__throw_length_error(char const*)",
|
|
"size": 6,
|
|
"addr": 4176
|
|
},
|
|
{
|
|
"name": "sym.imp.__cxa_rethrow",
|
|
"realname": "__cxa_rethrow",
|
|
"size": 6,
|
|
"addr": 4240
|
|
},
|
|
{
|
|
"name": "reloc.std::__throw_bad_alloc__",
|
|
"realname": "std::__throw_bad_alloc()",
|
|
"size": 8,
|
|
"addr": 16408
|
|
},
|
|
{
|
|
"name": "method.std.__throw_bad_alloc__",
|
|
"size": 1,
|
|
"addr": 16408
|
|
},
|
|
{
|
|
"name": "reloc.std::__throw_length_error_char_const_",
|
|
"realname": "std::__throw_length_error(char const*)",
|
|
"size": 8,
|
|
"addr": 16424
|
|
},
|
|
{
|
|
"name": "method.std.__throw_length_error_char_const_",
|
|
"size": 1,
|
|
"addr": 16424
|
|
},
|
|
{
|
|
"name": "reloc.__cxa_rethrow",
|
|
"size": 8,
|
|
"addr": 16456
|
|
}
|
|
]
|
|
EOF
|
|
RUN
|
|
|
|
NAME=fn.j fnj.
|
|
FILE=bins/elf/demangle-test-cpp
|
|
CMDS=<<EOF
|
|
fn.j
|
|
fnj.
|
|
EOF
|
|
EXPECT=<<EOF
|
|
[{"name":"entry0","realname":"entry0","addr":4304,"size":1},{"name":"section..text","realname":"section..text","addr":4304,"size":3717},{"name":"sym._start","realname":"_start","addr":4304,"size":47}]
|
|
entry0
|
|
section..text
|
|
sym._start
|
|
EOF
|
|
RUN
|