diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-08-02 12:00:08 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-08-02 14:14:59 -0700 |
| commit | 975c185b92a7d470ea705b28f46a8004bdda3c60 (patch) | |
| tree | cb0d037c9a2f38b348ae10b621db417e2f941fa1 /lib/std/debug/Dwarf/expression.zig | |
| parent | 48d584e3a33a76ef4ea643905a11d311e9ed8bbf (diff) | |
| download | zig-975c185b92a7d470ea705b28f46a8004bdda3c60.tar.gz zig-975c185b92a7d470ea705b28f46a8004bdda3c60.zip | |
fix compilation on powerpc GNU systems
...which have a ucontext_t but not a PC register. The current stack
unwinding implementation does not yet support this architecture.
Also fix name of `std.debug.SelfInfo.openSelf` to remove redundancy.
Also removed this hook into root providing an "openSelfDebugInfo"
function. Sorry, this debugging code is not of sufficient quality to
offer a plugin API right now.
Diffstat (limited to 'lib/std/debug/Dwarf/expression.zig')
| -rw-r--r-- | lib/std/debug/Dwarf/expression.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/debug/Dwarf/expression.zig b/lib/std/debug/Dwarf/expression.zig index 7a3a4ed740..5fab56de6e 100644 --- a/lib/std/debug/Dwarf/expression.zig +++ b/lib/std/debug/Dwarf/expression.zig @@ -1190,11 +1190,11 @@ test "DWARF expressions" { mem.writeInt(usize, reg_bytes[0..@sizeOf(usize)], 0xee, native_endian); (try abi.regValueNative(&thread_context, abi.fpRegNum(native_arch, reg_context), reg_context)).* = 1; (try abi.regValueNative(&thread_context, abi.spRegNum(native_arch, reg_context), reg_context)).* = 2; - (try abi.regValueNative(&thread_context, abi.ipRegNum(native_arch), reg_context)).* = 3; + (try abi.regValueNative(&thread_context, abi.ipRegNum(native_arch).?, reg_context)).* = 3; try b.writeBreg(writer, abi.fpRegNum(native_arch, reg_context), @as(usize, 100)); try b.writeBreg(writer, abi.spRegNum(native_arch, reg_context), @as(usize, 200)); - try b.writeBregx(writer, abi.ipRegNum(native_arch), @as(usize, 300)); + try b.writeBregx(writer, abi.ipRegNum(native_arch).?, @as(usize, 300)); try b.writeRegvalType(writer, @as(u8, 0), @as(usize, 400)); _ = try stack_machine.run(program.items, allocator, context, 0); |
