Open makslevental opened 3 years ago
Hi, thanks for your interest in the project! No dumb questions here :)
I'd be happy to learn more about your use case and help any way I can.
lldb-eval
is supposed to be used as a library and it requires lldb
to work (it links against liblldb.so|dll
). You don't need to rebuild lldb
or lldb-server
, they don't know anything about lldb-eval
.
Typically lldb-eval
would be used like this:
liblldb.so|dll
to start a debugging session (e.g. launch a program, run until the breakpoint, etc).lldb-eval.so|dll
to evaluate expressions in the context of the debug session.tools/exec is a sample application for testing that basically implements the flow described above.
It would be possible to write a dynamic plugin for LLDB for evaluating expressions using lldb-eval
, however nobody asked for that yet :)
Which OS are you using? I've tested lldb-eval
on Linux (Ubuntu) and Windows, not sure if there are any problems on macos. The command in your example should work, however it says "Can't find the breakpoint location", which suggests something fails very early in the process (link).
I've got it built (which wasn't completely straightforward)
Can you elaborate which steps were problematic? I can imagine building LLDB from scratch can be challenging, but would like to know about other difficulties as well.
Hi, in this particular example the issue could be the way your shell processes arguments.
tools/exec
should only take a single argument "(1 + 2) * 42 / 4"
, however, your shell interprets this as a list of arguments (1
, +
, 2)
, followed by the content of working dir (multiplication operator *
treated as expansion operation).
Maybe your shell passes multi-word arguments in a different way or there are multiple levels of escaping somehow? E.g. what happens if you try to pass the argument as '(1 + 2) * 42 / 4'
or "\"(1 + 2) * 42 / 4\""
?
sorry if this is a dumb question but how exactly do i use
lldb-eval
in tandem with lldb? I've got it built (which wasn't completely straightforward) but e.g.so it necessitates being run within the context of
lldb
even for this.does one need to rebuild
lldb
,lldb-server
linking againstliblldb-eval.so
or something like that?