Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reverse debugging with lldb

I've read this tutorial, but I haven't found there anything about reverse debugging. Does lldb have some features like target record in gdb? If yes, where can I read about it?

like image 374
Pavel Davydov Avatar asked Aug 22 '13 07:08

Pavel Davydov


People also ask

Which is better LLDB or GDB?

In brief, LLDB and GDB are two debuggers. The main difference between LLDB and GDB is that in LLDB, the programmer can debug programs written in C, Objective C and C++ while, in GDB, the programmer can debug programs written in Ada, C, C++, Objective C, Pascal, FORTRAN and Go.

Is LLDB compatible with GDB?

The standard LLDB installation provides you with an extensive set of commands designed to be compatible with familiar GDB commands. In addition to using the standard configuration, you can easily customize LLDB to suit your needs. Both GDB and LLDB are of course excellent debuggers without doubt.

Can LLDB debug GCC?

In theory you should be able to debug a GCC-built program with lldb and an LLVM-built program with gdb. In both cases you should compile with -g .


2 Answers

Not yet. To date most of the work on lldb has been to complete the common set of debugger features; it is solid for i386, x86_64, and armv7 debugging on Mac systems. There are people woking on Linux and *BSD ports now - that's hugely important to making lldb usable for lots of people. There are lots of interesting features that can be added to lldb in the future as the core debugger facilities are mature -- genuine reverse execution is one, process recording & playback (what I gather target record does) is another.

like image 181
Jason Molenda Avatar answered Oct 03 '22 20:10

Jason Molenda


There is this work from last year: https://dev.to/vangelists/live-reverse-debugging-in-lldb-2nf0 https://github.com/vangelists/llvm-project

But looks like it's just a prototype and hasn't been upstreamed so far.

like image 30
Trass3r Avatar answered Oct 03 '22 20:10

Trass3r