Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 45f340f

Browse files
authored
Merge pull request #2278 from JinShil/fix_18068_again
Fix Issue 18068 - No file names and line numbers in stack trace - Again
2 parents be13242 + 4ffb551 commit 45f340f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/rt/backtrace/elf.d

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,8 @@ struct Image
100100
return 0;
101101

102102
obj.set = true;
103-
// search for the executable code segment
104-
foreach (const ref phdr; info.dlpi_phdr[0 .. info.dlpi_phnum])
105-
{
106-
if (phdr.p_type == PT_LOAD && phdr.p_flags & PF_X)
107-
{
108-
obj.begin = info.dlpi_addr + phdr.p_vaddr;
109-
return 0;
110-
}
111-
}
112-
// fall back to the base address of the object file
103+
104+
// use the base address of the object file
113105
obj.begin = info.dlpi_addr;
114106
return 0;
115107
}

0 commit comments

Comments
 (0)