Embed gdb pretty-printing script directly into Kakoune binary
This will get stripped correctly, and should make debugging easier.
This commit is contained in:
parent
1b469f4c00
commit
ebc9f7703b
|
@ -1,11 +1,2 @@
|
||||||
set print pretty
|
set print pretty
|
||||||
break Kakoune::on_assert_failed
|
break Kakoune::on_assert_failed
|
||||||
|
|
||||||
python
|
|
||||||
sys.path.insert(0, '../gdb/')
|
|
||||||
import gdb.printing
|
|
||||||
import kakoune
|
|
||||||
gdb.printing.register_pretty_printer(
|
|
||||||
gdb.current_objfile(),
|
|
||||||
kakoune.build_pretty_printer())
|
|
||||||
end
|
|
||||||
|
|
12
src/main.cc
12
src/main.cc
|
@ -1139,3 +1139,15 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
asm(R"(
|
||||||
|
.pushsection ".debug_gdb_scripts", "MS",@progbits,1
|
||||||
|
.byte 4
|
||||||
|
.ascii "kakoune-inline-gdb.py\n"
|
||||||
|
.ascii "import os.path\n"
|
||||||
|
.ascii "sys.path.insert(0, os.path.dirname(gdb.current_objfile().filename) + '/../share/kak/gdb/')\n"
|
||||||
|
.ascii "import gdb.printing\n"
|
||||||
|
.ascii "import kakoune\n"
|
||||||
|
.ascii "gdb.printing.register_pretty_printer(gdb.current_objfile(), kakoune.build_pretty_printer())\n"
|
||||||
|
.popsection
|
||||||
|
)");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user