-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Organize gdb/llvm files a bit better
Also adds a README.md for gdb.
- Loading branch information
Showing
9 changed files
with
52 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
source tools/gdb/pretty_printers/utils/static_vector_pp.py | ||
source tools/gdb/devilution_gdb/__init__.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
script topsrcdir = topsrcdir if "topsrcdir" in locals() else os.getcwd() | ||
script sys.path.append(os.path.join(topsrcdir, "tools/lldbutils")) | ||
script import lldbutils | ||
script lldbutils.init() | ||
script sys.path.append(os.path.join(topsrcdir, "tools/lldb")) | ||
script import devilution_lldb | ||
script devilution_lldb.init() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# gdb debugging enhancements | ||
|
||
Requires gdb v14.1+. | ||
|
||
The code in this directory is imported via `.gdbinit`. | ||
|
||
Working directory `.gdb` is not loaded by default. | ||
|
||
You can run gdb with `-iex 'add-auto-load-safe-path .'` to load it. | ||
|
||
For example: | ||
|
||
```bash | ||
gdb -iex 'add-auto-load-safe-path .' build/devilutionx | ||
``` | ||
|
||
If you're using VS Code with CMake, you can instead add the following to your `.vscode/settings.json`: | ||
|
||
```json | ||
"cmake.debugConfig": { | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
}, | ||
{ | ||
"description": "Load gdb enhancements", | ||
"text": "source ${workspaceFolder}/tools/gdb/devilution_gdb/__init__.py", | ||
"ignoreFailures": false | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import sys | ||
import pathlib | ||
|
||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent.parent)) | ||
|
||
import devilution_gdb.pretty_printers.utils.static_vector_pp as _ |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import lldb | ||
|
||
import devilution_lldb.pretty_printers.utils.static_vector_pp | ||
|
||
|
||
def init(): | ||
devilution_lldb.pretty_printers.utils.static_vector_pp.init(lldb.debugger) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.