From 4ffb551929eae45bb80fc14f8a12aa6348f65fc0 Mon Sep 17 00:00:00 2001 From: JinShil Date: Fri, 17 Aug 2018 22:13:13 +0900 Subject: [PATCH] Fix Issue 18068 - No file names and line numbers in stack trace - Again --- src/rt/backtrace/elf.d | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/rt/backtrace/elf.d b/src/rt/backtrace/elf.d index e2385c4ba3..fe8faa7f84 100644 --- a/src/rt/backtrace/elf.d +++ b/src/rt/backtrace/elf.d @@ -100,16 +100,8 @@ struct Image return 0; obj.set = true; - // search for the executable code segment - foreach (const ref phdr; info.dlpi_phdr[0 .. info.dlpi_phnum]) - { - if (phdr.p_type == PT_LOAD && phdr.p_flags & PF_X) - { - obj.begin = info.dlpi_addr + phdr.p_vaddr; - return 0; - } - } - // fall back to the base address of the object file + + // use the base address of the object file obj.begin = info.dlpi_addr; return 0; }