LibDebug: Remove i686 support
This commit is contained in:
parent
a4c87fac56
commit
1d26b46884
Notes:
sideshowbarker
2024-07-17 02:31:42 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/1d26b46884 Pull-request: https://github.com/SerenityOS/serenity/pull/15467 Issue: https://github.com/SerenityOS/serenity/issues/15444 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/fuel-pcbox
4 changed files with 6 additions and 33 deletions
|
@ -167,9 +167,7 @@ NonnullOwnPtrVector<DebugInfo::VariableInfo> DebugInfo::get_variables_in_current
|
|||
// TODO: We can store the scopes in a better data structure
|
||||
for (auto const& scope : m_scopes) {
|
||||
FlatPtr ip;
|
||||
#if ARCH(I386)
|
||||
ip = regs.eip;
|
||||
#elif ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
ip = regs.rip;
|
||||
#elif ARCH(AARCH64)
|
||||
TODO_AARCH64();
|
||||
|
|
|
@ -343,12 +343,8 @@ FlatPtr DebugSession::single_step()
|
|||
// After the debuggee has stopped, we clear the TRAP flag.
|
||||
|
||||
auto regs = get_registers();
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
constexpr u32 TRAP_FLAG = 0x100;
|
||||
#endif
|
||||
#if ARCH(I386)
|
||||
regs.eflags |= TRAP_FLAG;
|
||||
#elif ARCH(X86_64)
|
||||
regs.rflags |= TRAP_FLAG;
|
||||
#elif ARCH(AARCH64)
|
||||
TODO_AARCH64();
|
||||
|
@ -365,9 +361,7 @@ FlatPtr DebugSession::single_step()
|
|||
}
|
||||
|
||||
regs = get_registers();
|
||||
#if ARCH(I386)
|
||||
regs.eflags &= ~(TRAP_FLAG);
|
||||
#elif ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
regs.rflags &= ~(TRAP_FLAG);
|
||||
#elif ARCH(AARCH64)
|
||||
TODO_AARCH64();
|
||||
|
|
|
@ -184,9 +184,7 @@ void DebugSession::run(DesiredInitialDebugeeState initial_debugee_state, Callbac
|
|||
|
||||
auto regs = get_registers();
|
||||
|
||||
#if ARCH(I386)
|
||||
FlatPtr current_instruction = regs.eip;
|
||||
#elif ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
FlatPtr current_instruction = regs.rip;
|
||||
#elif ARCH(AARCH64)
|
||||
FlatPtr current_instruction;
|
||||
|
@ -210,9 +208,7 @@ void DebugSession::run(DesiredInitialDebugeeState initial_debugee_state, Callbac
|
|||
auto required_ebp = watchpoint.value().ebp;
|
||||
auto found_ebp = false;
|
||||
|
||||
#if ARCH(I386)
|
||||
FlatPtr current_ebp = regs.ebp;
|
||||
#elif ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
FlatPtr current_ebp = regs.rbp;
|
||||
#elif ARCH(AARCH64)
|
||||
FlatPtr current_ebp;
|
||||
|
@ -261,9 +257,7 @@ void DebugSession::run(DesiredInitialDebugeeState initial_debugee_state, Callbac
|
|||
// 2. We restore the original first byte of the instruction,
|
||||
// because it was patched with INT3.
|
||||
auto breakpoint_addr = bit_cast<FlatPtr>(current_breakpoint.value().address);
|
||||
#if ARCH(I386)
|
||||
regs.eip = breakpoint_addr;
|
||||
#elif ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
regs.rip = breakpoint_addr;
|
||||
#elif ARCH(AARCH64)
|
||||
(void)breakpoint_addr;
|
||||
|
|
|
@ -21,19 +21,6 @@ Value evaluate(ReadonlyBytes bytes, [[maybe_unused]] PtraceRegisters const& regs
|
|||
stream >> opcode;
|
||||
|
||||
switch (static_cast<Operations>(opcode)) {
|
||||
#if ARCH(I386)
|
||||
case Operations::RegEbp: {
|
||||
ssize_t offset = 0;
|
||||
stream.read_LEB128_signed(offset);
|
||||
return Value { Type::UnsignedInteger, { regs.ebp + offset } };
|
||||
}
|
||||
|
||||
case Operations::FbReg: {
|
||||
ssize_t offset = 0;
|
||||
stream.read_LEB128_signed(offset);
|
||||
return Value { Type::UnsignedInteger, { regs.ebp + 2 * sizeof(size_t) + offset } };
|
||||
}
|
||||
#endif
|
||||
|
||||
default:
|
||||
dbgln("DWARF expr addr: {:p}", bytes.data());
|
||||
|
|
Loading…
Add table
Reference in a new issue