Debugging a core dump with LLDB on FreeBSD
Just yesterday it occurred again to me. I was in need to debug a core dump of one of my daemon programs on FreeBSD. So, what again were the command line options? A quick web search did not give a conclusive answer, only some hints. And of course, after some trials and errors, I got it. Here comes now how, and as well how to make use of the GUI feature of LLDB for examination of the variables at the point in time of the crash.
The executable must have been compiled with the options
2. Invoking LLDB
The actual command for LLDB loading the core dump and linking it to the sources in order to allow symbolic debugging is:
This command shall be issued from inside the sources’ base directory. The last argument is the name of the executable to be examined, i.e. that one which has been compiled using
(lldb) target create "CyControl" --core "CyControl.core" Core file '/root/install/CyControl.devel/CyControl.core' (x86_64) was loaded. (lldb)
Now all the commands or its equivalents known from GDB like
This gives me the whole story all in one view, and I marked the culprits with orange ovals.
Stupid me. I subtracted
Copyright © Dr. Rolf Jansen - 2019-08-22 08:27:24
Discussion on Twitter: 1164543713026170880