diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-03 15:19:59 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-03 15:19:59 -0400 |
| commit | 8d173710fe8cfd96bd54f9dd1cf0eccacfdd6e73 (patch) | |
| tree | e93cf2ad599ed1378366303d1162a60fec5090db /src/stdlib/stdlib.c | |
| parent | cedae3039c8d67568b5ac35833c10cbfc1c7cb23 (diff) | |
Deprecate heap_strf
Diffstat (limited to 'src/stdlib/stdlib.c')
| -rw-r--r-- | src/stdlib/stdlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/stdlib.c b/src/stdlib/stdlib.c index 80c53b68..8d3a8081 100644 --- a/src/stdlib/stdlib.c +++ b/src/stdlib/stdlib.c @@ -491,7 +491,7 @@ public void print_stack_trace(FILE *out, int start, int stop) char *paren = strings[i] + strcspn(strings[i], "("); char *addr_end = paren + 1 + strcspn(paren + 1, ")"); ptrdiff_t offset = strtol(paren + 1, &addr_end, 16) - 1; - const char *cmd = heap_strf("addr2line -e %.*s -is +0x%x", strcspn(filename, "("), filename, offset); + const char *cmd = String("addr2line -e ", string_slice(filename, strcspn(filename, "(")), " -is +", hex((uint64_t)offset)); FILE *fp = popen(cmd, "r"); OptionalText_t fn_name = get_function_name(stack[i]); const char *src_filename = NULL; |
