summaryrefslogtreecommitdiff
path: root/Userland/Applications/Debugger/main.cpp
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-10-04 02:56:45 +0300
committerAndreas Kling <kling@serenityos.org>2022-12-28 11:53:41 +0100
commite11dcd21c13526a3fe941219b4436d0ab83cf06c (patch)
tree13f89367bda3b786ad34b4849250451b3b7a6c87 /Userland/Applications/Debugger/main.cpp
parentc191daa337d9a0dae0d934bff1d56d754584d849 (diff)
downloadserenity-e11dcd21c13526a3fe941219b4436d0ab83cf06c.zip
Applications: Remove i686 support
Diffstat (limited to 'Userland/Applications/Debugger/main.cpp')
-rw-r--r--Userland/Applications/Debugger/main.cpp30
1 files changed, 2 insertions, 28 deletions
diff --git a/Userland/Applications/Debugger/main.cpp b/Userland/Applications/Debugger/main.cpp
index 1eba7028ad..56374ae4e3 100644
--- a/Userland/Applications/Debugger/main.cpp
+++ b/Userland/Applications/Debugger/main.cpp
@@ -39,11 +39,7 @@ static void handle_sigint(int)
static void handle_print_registers(PtraceRegisters const& regs)
{
-#if ARCH(I386)
- outln("eax={:p} ebx={:p} ecx={:p} edx={:p}", regs.eax, regs.ebx, regs.ecx, regs.edx);
- outln("esp={:p} ebp={:p} esi={:p} edi={:p}", regs.esp, regs.ebp, regs.esi, regs.edi);
- outln("eip={:p} eflags={:p}", regs.eip, regs.eflags);
-#elif ARCH(X86_64)
+#if ARCH(X86_64)
outln("rax={:p} rbx={:p} rcx={:p} rdx={:p}", regs.rax, regs.rbx, regs.rcx, regs.rdx);
outln("rsp={:p} rbp={:p} rsi={:p} rdi={:p}", regs.rsp, regs.rbp, regs.rsi, regs.rdi);
outln("r8 ={:p} r9 ={:p} r10={:p} r11={:p}", regs.r8, regs.r9, regs.r10, regs.r11);
@@ -97,28 +93,8 @@ static bool handle_disassemble_command(DeprecatedString const& command, FlatPtr
static bool handle_backtrace_command(PtraceRegisters const& regs)
{
-#if ARCH(I386)
- auto ebp_val = regs.ebp;
- auto eip_val = regs.eip;
- outln("Backtrace:");
- while (g_debug_session->peek(eip_val).has_value() && g_debug_session->peek(ebp_val).has_value()) {
- auto eip_symbol = g_debug_session->symbolicate(eip_val);
- auto source_position = g_debug_session->get_source_position(eip_val);
- DeprecatedString symbol_location = (eip_symbol.has_value() && eip_symbol->symbol != "") ? eip_symbol->symbol : "???";
- if (source_position.has_value()) {
- outln("{:p} in {} ({}:{})", eip_val, symbol_location, source_position->file_path, source_position->line_number);
- } else {
- outln("{:p} in {}", eip_val, symbol_location);
- }
- auto next_eip = g_debug_session->peek(ebp_val + 4);
- auto next_ebp = g_debug_session->peek(ebp_val);
- eip_val = (u32)next_eip.value();
- ebp_val = (u32)next_ebp.value();
- }
-#else
(void)regs;
TODO();
-#endif
return true;
}
@@ -249,9 +225,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
VERIFY(optional_regs.has_value());
const PtraceRegisters& regs = optional_regs.value();
-#if ARCH(I386)
- const FlatPtr ip = regs.eip;
-#elif ARCH(X86_64)
+#if ARCH(X86_64)
const FlatPtr ip = regs.rip;
#elif ARCH(AARCH64)
const FlatPtr ip = 0; // FIXME