[llvm-bugs] [Bug 36540] New: "error: this file does not represent a loadable dylib" when loading libsosplugin.so plugin from Python
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Feb 27 07:29:09 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36540
Bug ID: 36540
Summary: "error: this file does not represent a loadable dylib"
when loading libsosplugin.so plugin from Python
Product: lldb
Version: 4.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: evgeny at loop54.com
CC: llvm-bugs at lists.llvm.org
I'm trying to run the following Python script on Ubuntu 16.04.4 x64:
import lldb
import sys
pid = int(sys.argv[1])
print("Attaching to process %d using %s" % (pid,
lldb.SBDebugger.GetVersionString()))
debugger = lldb.SBDebugger.Create()
target = debugger.CreateTarget('')
error = lldb.SBError()
process = target.AttachToProcessWithID(debugger.GetListener(), pid, error)
if not error.Success():
raise Exception("Failed to attach")
sos_path = "/opt/dotnet/shared/Microsoft.NETCore.App/2.0.5/libsosplugin.so"
debugger.HandleCommand("plugin load %s" % sos_path)
It gives an error:
$ python loadsostest.py 2036
Attaching to process 2036 using lldb version 4.0.0
error: this file does not represent a loadable dylib
However, I can load the same plugin successfully from the command line:
lldb-4.0 -o "plugin load
/opt/dotnet/shared/Microsoft.NETCore.App/2.0.5/libsosplugin.so" -p 2036
(lldb) process attach --pid 2036
Process 2036 stopped
...
Executable module set to "/opt/dotnet/dotnet".
Architecture set to: x86_64-pc-linux.
(lldb) plugin load
/opt/dotnet/shared/Microsoft.NETCore.App/2.0.5/libsosplugin.so
LLDB version: 'lldb version 4.0.0'(lldb)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180227/542f7f79/attachment.html>
More information about the llvm-bugs
mailing list