Skip to content

Commit e5cc00b

Browse files
committed
Fixup symbolication script to handle PIE executables.
1 parent 78938d8 commit e5cc00b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

utils/symbolicate-linux-fatal

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,10 @@ def create_lldb_target(binary, memmap):
5858
lldb_target = lldb_debugger.CreateTargetWithFileAndArch(
5959
binary, lldb.LLDB_ARCH_DEFAULT)
6060
module = lldb_target.GetModuleAtIndex(0)
61-
# lldb seems to treat main binary differently, slide offset must be zero
62-
lldb_target.SetModuleLoadAddress(module, 0)
6361
for dynlib_path in memmap:
64-
if binary not in dynlib_path:
65-
module = lldb_target.AddModule(
66-
dynlib_path, lldb.LLDB_ARCH_DEFAULT, None, None)
67-
lldb_target.SetModuleLoadAddress(module, memmap[dynlib_path])
62+
module = lldb_target.AddModule(
63+
dynlib_path, lldb.LLDB_ARCH_DEFAULT, None, None)
64+
lldb_target.SetModuleLoadAddress(module, memmap[dynlib_path])
6865
return lldb_target
6966

7067

0 commit comments

Comments
 (0)