<tt><font size=2>Hello Everyone,<br>
<br>
I started looking into the LLDB with the intention of adding custom commands
for my SW debugging purpose. For a better Understanding let me explain
what I intend to do. I have an source file generated automatically from
a Model with certain anotations added as comments in the code. This code
will would be compiled and in error cases debugged. When debugging I may
have to set breakpoints at certain statements in the code based on the
anotations incerted by the code generator. This is done by specifying the
source file and the line number. I Use CLANG to get the line number and
source file for the comments. <br>
<br>
I would like to have custom commands for this and internally map the to
already existing commands  e.g. "breakpoint set -f -l".
I found some examples for python, and for c++ I only found the example
"lldb/examples/plugins/commands/fooplugin.cpp" for writing C++
plugin (dynLib) shipped with the LLDB source. In this example adding a
new commands was straight forward and in the DoExecute function, I call
the interpreter to handle a breakpoint command. I intend to use C++ rather
than Python.<br>
<br>
This works fine for a simple shared lib (Simple modification of the Example
provided in LLDB. In Do execute call interpreter to handle a breakpoint
command). However if I add other C++ sources which does XML parsing, CLANG
RecursiveASTVisitor etc to the Library, creating the shared library with
eclipse is sucessful. I can link the created library to an application
and it works well. However when I load this in lldb with the command ==>
plugin load  "/home/bkebianyor/eclipse-workspace/Model_LLDB_Debugger/Debug/libModel_LLDB_Debugger.so",
I get the error message: "error: this file does not represent a loadable
dylib".<br>
<br>
<br>
#Loading the shared lib that is linked just to the liblldb.so - SUCESSFUL<br>
(lldb) <br>
(lldb) plugin load  /home/bkebianyor/eclipse-workspace/DynLib/Debug/libDynLib.so<br>
(lldb)<br>
<br>
#Loading the shared lib that is linked just to the liblldb.so + libxerces-c-3.2.so
- FAILS<br>
<br>
(lldb) plugin load  "/home/bkebianyor/eclipse-workspace/Model_LLDB_Debugger/Debug/libModel_LLDB_Debugger.so"<br>
error: this file does not represent a loadable dylib<br>
<br>
I have searched for this error on google, but could not find out how to
resolve this error. Most answers pointed to a mismatch of the lldb version
in the shared lib to be loaded and that linked to lldb, but that is not
my case. I am using lldb-5.0.2 and LLVM/CLANG 5.0.2 toolcahin on Linux
16.04.1-Ubuntu and Eclipse IDE. LLVM was built with SHARED_LIBS set to
ON.<br>
<br>
Would be grateful for an answer.<br>
<br>
<br>
Thanks and Regards,<br>
<br>
Bewoayia<br>
</font></tt>
<br><tt><font size=2>-------------</font></tt>
<br><tt><font size=2>Dipl.- Ing. Bewoayia Kebianyor<br>
Researcher - Hardware/Software Design Methodology Group<br>
<br>
OFFIS e.V. - Institut für Informatik<br>
FuE Bereich Verkehr | R&D Division Transportation<br>
Escherweg 2 - 26121 Oldenburg - Germany<br>
Phone/Fax.: +49 441 9722 237/-278<br>
E-Mail: bewoayia.kebianyor@offis.de<br>
URL: </font></tt><a href=http://www.offis.de/><tt><font size=2>http://www.offis.de</font></tt></a><tt><font size=2><br>
<br>
Registergericht: Amtsgericht Oldenburg VR 1956<br>
Vorstand: Prof. Dr.-Ing. Wolfgang H. Nebel (Vorsitzender), Prof. Dr. techn.
Susanne Boll-Westermann, Prof. Dr. Werner Damm, Prof. Dr.-Ing. Axel Hahn,
Prof. Dr.-Ing. Andreas Hein, Prof. Dr. Sebastian Lehnhoff<br>
</font></tt>