diff --git a/lib/std/os/linux/linux.c3 b/lib/std/os/linux/linux.c3 index 353b92d8d..f4cc0749e 100644 --- a/lib/std/os/linux/linux.c3 +++ b/lib/std/os/linux/linux.c3 @@ -144,7 +144,7 @@ fn Backtrace! backtrace_load_element(void* addr, Allocator* allocator = mem::hea void* obj_address = addr - (uptr)info.dli_fbase + (uptr)elf_module_image_base(info.dli_fname.str_view())!; ZString obj_path = info.dli_fname; ZString sname = info.dli_sname ? info.dli_sname : (ZString)"???"; - String s = process::execute_stdout_to_buffer(buf, { "addr2line", "-p", "-i", "-C", "-f", "-e", obj_path.str_view(), string::tformat("0x%x", obj_address) })!; + String s = process::execute_stdout_to_buffer(buf, { "addr2line", "-p", "-i", "-C", "-f", "-e", obj_path.str_view(), string::tformat("0x%x", obj_address - 1) })!; String[] parts = s.tsplit(" at "); if (parts.len != 2) { diff --git a/lib/std/os/macos/darwin.c3 b/lib/std/os/macos/darwin.c3 index d8f6fb302..d619e6c5f 100644 --- a/lib/std/os/macos/darwin.c3 +++ b/lib/std/os/macos/darwin.c3 @@ -105,7 +105,7 @@ fn Backtrace! backtrace_load_element(String execpath, void* buffer, void* load_a String s = process::execute_stdout_to_buffer(buf[:1024], { "atos", "-o", execpath, "-arch", env::AARCH64 ? "arm64" : "x86_64", "-l", string::tformat("%p", load_address), - string::tformat("%p", buffer), + string::tformat("%p", buffer - 1), "-fullPath" })!; String[] parts = s.tsplit(" "); if (parts.len == 4) diff --git a/src/compiler/llvm_codegen_expr.c b/src/compiler/llvm_codegen_expr.c index 5dbc92387..63846a033 100644 --- a/src/compiler/llvm_codegen_expr.c +++ b/src/compiler/llvm_codegen_expr.c @@ -5723,7 +5723,7 @@ INLINE void llvm_emit_call_invocation(GenContext *c, BEValue *result_value, // 10. Create the actual call (remember to emit a loc, because we might have shifted loc emitting the params) - if (c->debug.builder) llvm_emit_debug_location(c, span); + EMIT_SPAN(c, span); llvm_emit_raw_call(c, result_value, prototype, func_type, func, arg_values, arg_count, inline_flag, error_var, sret_return, &synthetic_return_param); diff --git a/src/version.h b/src/version.h index b0cb2d45b..4008805b9 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define COMPILER_VERSION "0.4.702" +#define COMPILER_VERSION "0.4.703"