-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable cross-directory ccache (#1539)
* Add support for cross-directory ccaching * Add gdb alias for ffdb * Update proj * Change from fdebug-prefix-map to ffile-prefix-map to fix __FILE__ issues * Remove unnecessary stuff from ffdb nix file * Remove commented-out code
- Loading branch information
Showing
8 changed files
with
61 additions
and
180 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ lib | ||
, stdenv | ||
, makeWrapper | ||
, gdb | ||
, python3 | ||
, proj | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "ffdb"; | ||
version = "0.1"; | ||
|
||
pythonPath = with python3.pkgs; makePythonPath [ | ||
proj | ||
]; | ||
|
||
dontBuild = true; | ||
|
||
nativeBuildInputs = [ makeWrapper ]; | ||
|
||
src = ./.; | ||
|
||
installPhase = '' | ||
mkdir -p $out/share/ffdb | ||
cp ffdb.py $out/share/ffdb | ||
makeWrapper ${gdb}/bin/gdb $out/bin/gdb \ | ||
--add-flags "-q -x $out/share/ffdb/ffdb.py" \ | ||
--set NIX_PYTHONPATH ${pythonPath} \ | ||
--prefix PATH : ${lib.makeBinPath [ | ||
python3 | ||
]} | ||
cp $out/bin/gdb $out/bin/ffdb | ||
''; | ||
|
||
nativeCheckInputs = [ | ||
gdb | ||
python3 | ||
proj | ||
]; | ||
} |
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 @@ | ||
from proj.config_file import get_config_root | ||
from pathlib import Path | ||
import gdb | ||
|
||
gdb.execute(f'directory {get_config_root(Path.cwd())}') | ||
gdb.prompt_hook = lambda x: '(ffdb) ' | ||
gdb.execute('set history save on') |
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,3 +1,6 @@ | ||
# gdb history | ||
.gdb_history | ||
|
||
# dtgen files | ||
*.dtg.cc | ||
*.dtg.h | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
This file was deleted.
Oops, something went wrong.