mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix emit location.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define COMPILER_VERSION "0.4.702"
|
||||
#define COMPILER_VERSION "0.4.703"
|
||||
|
||||
Reference in New Issue
Block a user