[Lldb-commits] Fix and continue implementation

Filipe Cabecinhas filcab+lldb-dev at gmail.com
Thu Aug 18 14:13:53 PDT 2011


Hi,

I've implemented part of a fix-and-continue solution for lldb. As of right
now, it works if you want to substitute functions from external libraries,
by loading an additional copy of that library on the project's address
space.
The library must have a completely new name from the previously loaded
libraries (otherwise, dlopen won't load it).

We can make lldb copy the libraries to a temp folder and assign to them
unique names, for example, or make the user responsible for that. At least I
don't know of other ways to load the "same" library twice in the process.

What's still not there:
- Dealing with libraries' variables (global, static, etc), even if it's just
by copying the old values;
- Aborting if too much has changed (this would require some clang
integration), like class/struct layouts, etc;
- Making it work on ARM (normally we should only need to implement the two
ABI functions;
- Making sure there is enough space for a trampoline (Right now, the
ProcessFix command doesn't check for space);

Other features:
- Update only some uses of the libraries (like Greg's idea of only changing
the GOT of some of the modules).

Please let me know what you think of this and maybe provide some feedback.

Thanks,

  Filipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20110818/b2730ea4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-and-continue.patch
Type: application/octet-stream
Size: 16958 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20110818/b2730ea4/attachment.obj>


More information about the lldb-commits mailing list