mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
disasm: Demangle symbols
This commit is contained in:
parent
4076619655
commit
6b5e4cdfbc
1 changed files with 3 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AK/Debug.h>
|
#include <AK/Debug.h>
|
||||||
|
#include <AK/Demangle.h>
|
||||||
#include <AK/OwnPtr.h>
|
#include <AK/OwnPtr.h>
|
||||||
#include <AK/QuickSort.h>
|
#include <AK/QuickSort.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
@ -117,14 +118,14 @@ ErrorOr<int> serenity_main(Main::Arguments args)
|
||||||
while (current_symbol + 1 < symbols.end() && !(current_symbol + 1)->contains(virtual_offset) && (current_symbol + 1)->address() <= virtual_offset) {
|
while (current_symbol + 1 < symbols.end() && !(current_symbol + 1)->contains(virtual_offset) && (current_symbol + 1)->address() <= virtual_offset) {
|
||||||
++current_symbol;
|
++current_symbol;
|
||||||
if (!is_first_symbol)
|
if (!is_first_symbol)
|
||||||
outln("\n({} ({:p}-{:p}))\n", current_symbol->name, current_symbol->address(), current_symbol->address_end());
|
outln("\n({} ({:p}-{:p}))\n", demangle(current_symbol->name), current_symbol->address(), current_symbol->address_end());
|
||||||
}
|
}
|
||||||
while (current_symbol + 1 < symbols.end() && (current_symbol + 1)->contains(virtual_offset)) {
|
while (current_symbol + 1 < symbols.end() && (current_symbol + 1)->contains(virtual_offset)) {
|
||||||
if (!is_first_symbol && !current_instruction_is_in_symbol)
|
if (!is_first_symbol && !current_instruction_is_in_symbol)
|
||||||
outln();
|
outln();
|
||||||
++current_symbol;
|
++current_symbol;
|
||||||
current_instruction_is_in_symbol = true;
|
current_instruction_is_in_symbol = true;
|
||||||
outln("{:08x} <{}>:", current_symbol->address(), current_symbol->name);
|
outln("{} ({:p}-{:p}):", demangle(current_symbol->name), current_symbol->address(), current_symbol->address_end());
|
||||||
}
|
}
|
||||||
|
|
||||||
is_first_symbol = false;
|
is_first_symbol = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue