diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-06-23 21:47:19 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-24 09:27:13 +0200 |
commit | c9a8dfa1bf14e73bb91c53678754caa12e266785 (patch) | |
tree | 57422f50540dd62ebe59eae4780191938ba8613c /Userland/Libraries/LibDebug | |
parent | f2d6cac692a761deca8ef1151d04cb243c696eeb (diff) | |
download | serenity-c9a8dfa1bf14e73bb91c53678754caa12e266785.zip |
Userland: Add more TODO()s for arch-specific code
This enables building more of the userspace applications for x86_64.
Diffstat (limited to 'Userland/Libraries/LibDebug')
-rw-r--r-- | Userland/Libraries/LibDebug/DebugSession.cpp | 5 | ||||
-rw-r--r-- | Userland/Libraries/LibDebug/Dwarf/Expression.cpp | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/Userland/Libraries/LibDebug/DebugSession.cpp b/Userland/Libraries/LibDebug/DebugSession.cpp index 361280b695..c874f5a12c 100644 --- a/Userland/Libraries/LibDebug/DebugSession.cpp +++ b/Userland/Libraries/LibDebug/DebugSession.cpp @@ -9,6 +9,7 @@ #include <AK/JsonValue.h> #include <AK/LexicalPath.h> #include <AK/Optional.h> +#include <AK/Platform.h> #include <LibCore/File.h> #include <LibRegex/Regex.h> #include <stdlib.h> @@ -336,7 +337,11 @@ void* DebugSession::single_step() regs = get_registers(); regs.eflags &= ~(TRAP_FLAG); set_registers(regs); +#if ARCH(I386) return (void*)regs.eip; +#else + TODO(); +#endif } void DebugSession::detach() diff --git a/Userland/Libraries/LibDebug/Dwarf/Expression.cpp b/Userland/Libraries/LibDebug/Dwarf/Expression.cpp index 14fe9df93b..7a50913d94 100644 --- a/Userland/Libraries/LibDebug/Dwarf/Expression.cpp +++ b/Userland/Libraries/LibDebug/Dwarf/Expression.cpp @@ -12,7 +12,7 @@ namespace Debug::Dwarf::Expression { -Value evaluate(ReadonlyBytes bytes, PtraceRegisters const& regs) +Value evaluate(ReadonlyBytes bytes, [[maybe_unused]] PtraceRegisters const& regs) { InputMemoryStream stream(bytes); @@ -21,6 +21,7 @@ Value evaluate(ReadonlyBytes bytes, 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); @@ -32,6 +33,7 @@ Value evaluate(ReadonlyBytes bytes, PtraceRegisters const& regs) stream.read_LEB128_signed(offset); return Value { Type::UnsignedIntetger, regs.ebp + 2 * sizeof(size_t) + offset }; } +#endif default: dbgln("DWARF expr addr: {}", (const void*)bytes.data()); |