-
Notifications
You must be signed in to change notification settings - Fork 10
Using GALA
GALA does not yet have any releases. The only way to download it is to clone the GALA git repo as follows:
git clone https://github.com/sivachandra/gala.git
In the rest of this page, we will call the full path to the GALA git repo on your disk as <path_to_gala>.
There is no real installation step required for GALA. Since GALA is an adapter which provides a Python package named gdb in LLDB Python, an easy way to install it such that one can import the gdb package using import gdb in LLDB Python scripts it to add the following lines to your .lldbinit file:
script import sys
script import sys.path.append(<path_to_gala>)
script import gdb.printing # See below for why this is required
With this, using the package gdb in LLDB scripts is as simple as adding the following import statement in your LLDB script:
import gdb
Since this package is imported by default in GDB, to mirror the same behavior in LLDB, you can optionally add the following line to your .lldbinit file:
script import gdb
With GALA installed as laid out above, GDB pretty-printers should work in LLDB as is. If you have noticed, we are importing the module gdb.printing by default (as a statement importing it has been added in the .lldbinit file). This is done so because LLDB requires that the contents of this module be visible globally and not just within a script which uses the module.