diff options
author | Peter Zhu <[email protected]> | 2024-11-27 10:24:47 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-11-27 12:12:23 -0500 |
commit | 0af2eafc590d863568e8203312f415142608d48c () | |
tree | ffd161152c2fd0ec815a6d9e4887c9728616f727 /addr2line.c | |
parent | 3354324c6e2cfe8d313c06ee4832a5285682110e (diff) |
Fix C level backtrace info on macOS clang 16
macOS clang 16 generates DWARF5, which have Mach-O section names that are limited to 16 characters, which causes sections with long names to be truncated and not match above. See: https://wiki.dwarfstd.org/Best_Practices.md#Mach-2d-O
Notes: Merged: https://.com/ruby/ruby/pull/12182
-rw-r--r-- | addr2line.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -2426,7 +2426,17 @@ found_mach_header: for (int j=0; j < DWARF_SECTION_COUNT; j++) { struct dwarf_section *s = obj_dwarf_section_at(obj, j); - if (strcmp(sect->sectname, debug_section_names[j]) != 0) continue; s->ptr = file + sect->offset; |