Remove asm.demangle (#6460)

This commit is contained in:
Khairul Azhar Kasmiran 2026-06-04 06:17:33 +08:00 committed by GitHub
parent c7dc9f4341
commit 0374f28e03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 30 additions and 29 deletions

View file

@ -3286,7 +3286,6 @@ RZ_API int rz_core_config_init(RzCore *core) {
update_asmbits_options(core, n);
SETBPREF("asm.functions", "true", "Show functions in disassembly");
SETBPREF("asm.xrefs", "true", "Show xrefs in disassembly");
SETBPREF("asm.demangle", "true", "Show demangled symbols in disasm");
SETBPREF("asm.describe", "false", "Show opcode description");
SETPREF("asm.highlight", "", "Highlight current line");
SETBPREF("asm.marks", "true", "Show marks before the disassembly");

View file

@ -670,7 +670,6 @@ RZ_API int rz_main_rizin(int argc, const char **argv) {
break;
case 'M':
rz_config_set(r->config, "bin.demangle", "false");
rz_config_set(r->config, "asm.demangle", "false");
break;
case 'n':
if (load_bin == LOAD_BIN_ALL) { // "-n"

View file

@ -544,7 +544,7 @@ RUN
NAME=flag-func_sig order
FILE=bins/elf/abcde-qt32
CMDS=<<EOF
e asm.demangle=true
e asm.flags.real=true
e asm.bytes=false
e asm.sub.names=false
e asm.sub.jmp=false

View file

@ -216,7 +216,7 @@ FILE=bins/elf/abcde-qt32
CMDS=<<EOF
e asm.var=false
e asm.bytes=false
e asm.demangle=true
e asm.flags.real=true
(pd_calls; pd 1 @ 0x0804921a; pd 1 @ 0x08049249; pd 1 @ 0x08049278)
e asm.cmt.right=true
.(pd_calls)
@ -228,37 +228,40 @@ e asm.cmt.right=true
aa
.(pd_calls)
echo
e asm.demangle=false
e asm.flags.real=false
.(pd_calls)
echo ---
s sym.__x86.get_pc_thunk.bx
e asm.demangle=true
e asm.flags.real=true
pd 1
echo
agf
echo
e asm.demangle=false
e asm.flags.real=false
pd 1
echo
s 0x08049390
e asm.demangle=true
e asm.flags.real=true
pd 1
echo
e asm.demangle=false
e asm.flags.real=false
pd 1
EOF
EXPECT=<<EOF
0x0804921a call sym.__x86.get_pc_thunk.si
0x08049249 call method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::
0x08049278 call method.QLabel.QLabel_QString_const___QWidget___QFlags_Qt::WindowType
0x0804921a call __x86.get_pc_thunk.si ; sym.__x86.get_pc_thunk.si
0x08049249 call QFlags<Qt::WindowType>::QFlags(int QFlags<Qt::WindowType>::Private::*) ; method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::
0x08049278 call imp.QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>) ; method.QLabel.QLabel_QString_const___QWidget___QFlags_Qt::WindowType
0x0804921a call sym.__x86.get_pc_thunk.si
0x08049249 call method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::
0x08049278 call method.QLabel.QLabel_QString_const___QWidget___QFlags_Qt::WindowType
; sym.__x86.get_pc_thunk.si
0x0804921a call __x86.get_pc_thunk.si
; method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::
0x08049249 call QFlags<Qt::WindowType>::QFlags(int QFlags<Qt::WindowType>::Private::*)
; method.QLabel.QLabel_QString_const___QWidget___QFlags_Qt::WindowType
0x08049278 call imp.QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>)
| 0x0804921a call sym.__x86.get_pc_thunk.si
| 0x08049249 call method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::
| 0x08049278 call method.QLabel.QLabel_QString_const___QWidget___QFlags_Qt::WindowType
| 0x0804921a call __x86.get_pc_thunk.si ; sym.__x86.get_pc_thunk.si
| 0x08049249 call QFlags<Qt::WindowType>::QFlags(int QFlags<Qt::WindowType>::Private::*) ; method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::
| 0x08049278 call imp.QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>) ; method.QLabel.QLabel_QString_const___QWidget___QFlags_Qt::WindowType
| 0x0804921a call sym.__x86.get_pc_thunk.si
| 0x08049249 call method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::
@ -269,16 +272,16 @@ EXPECT=<<EOF
; CALL XREF from method.QString.QString_char_const @ 0x804939d
; CALL XREF from method.QString._QString @ 0x80493e5
; CALL XREF from sym._fini @ 0x80495d4
/ sym.__x86.get_pc_thunk.bx();
/ __x86.get_pc_thunk.bx();
| 0x08049140 mov ebx, dword [esp]
.------------------------------.
| 0x8049140 |
| ; XREFS(5) |
| sym.__x86.get_pc_thunk.bx(); |
| mov ebx, dword [esp] |
| ret |
`------------------------------'
.--------------------------.
| 0x8049140 |
| ; XREFS(5) |
| __x86.get_pc_thunk.bx(); |
| mov ebx, dword [esp] |
| ret |
`--------------------------'
; CALL XREF from sym._init @ 0x8049008
; CALL XREF from method.QtPrivate::RefCount.deref @ 0x8049349
@ -302,10 +305,10 @@ CMDS=<<EOF
e asm.var=false
e asm.bytes=false
aaa
e asm.demangle=true
e asm.flags.real=true
pd 1 @ sym.imp._Unwind_Resume
echo
e asm.demangle=false
e asm.flags.real=false
pd 1 @ sym.imp._Unwind_Resume
EOF
EXPECT=<<EOF
@ -313,7 +316,7 @@ EXPECT=<<EOF
; CALL XREF from fcn.00001717 @ +0xbb
; CALL XREF from sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char__::basic_string_char___void__char___char___std::allocator_char__const @ +0x66
; CALL XREF from sym.void_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char__::_M_construct_char___char___char___std::forward_iterator_tag @ +0x116
/ sym.imp._Unwind_Resume();
/ _Unwind_Resume();
\ 0x00000f10 jmp dword [ebx+0x70]
; CALL XREF from main @ +0x222