GP2C-DBG(1)
π GP2C-DBG π
okay so bestie, welcome to the GP to C debugger driver β that's the whole name, and it lives in the PARI manual page family, section 1, iykyk. this is the lil tool that lets you poke at your GP scripts with a real actual C debugger. no cap. π¦
β¨ NAME β¨
gp2c-dbg β the GP to C debugger driver π
πΈ DESCRIPTION πΈ
so here's the two whole vibes of this thing:
gp2c-dbg [gp2c options] [file.gp]
it compiles file.gp with gp2c, then throws open a debugger session of gp where all the functions from file.gp are already loaded in. the [gp2c options] get passed straight on through to gp2c. simple as that. β¨
gp2c-dbg file.c
this one compiles file.c and opens a debugger session of gp with the functions of file.c loaded up. but heads up β file.c must have suitable GP;install() lines, or this whole situation is not giving what it needs to give. π
π USAGE π
the way that there is literally no debugger for the GP language π so gp2c-dbg is the workaround β it lets you debug your GP scripts using the C debugger instead. iconic problem-solving honestly.
and listen: to catch PARI errors, you can set a break point on the function "pari_err". do it. it's the move. π₯
β οΈ one big note bestie: your functions will not be loaded untilgphas read the.runfile. so don't come at it confused when nothing's there yet. patience, queen. π
π¦ FILES π¦
file.gp.cβ the C output thatgp2cproduces. the whole point. πfile.gp.soβ the GP loadable module.file.gp.runβ the commands that load the module. once a module is compiled, you can load it inside agpsession just by running this script. so handy fr fr. β¨
π ENVIRONMENT π
GP2Cβ path to thegp2ccompiler. default:/usr/bin/gp2cGP_DBGβ path to thegpcalculator. default:/usr/bin/gpGP2C_DBGβ command to start the debugger. default:"gdb --args"
π COPYING π
Copyright 2000-2018 The PARI Group π
GP2C is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. and ngl there is absolutely no warranty for GP2C. none. zero. nada. π
π SEE ALSO π
The GP2C manual, gp2c-run(1), gp2c(1), gp(1), gdb(1) β go read them, they're all in the same friend group π«Ά
okay that's the whole page, bestie!! this was the GP to C compiler driver situation, and this version is dated November 2001 πΈ slay, go debug something iconic, periodt. π β¨
π¦ where this page comes from
- debian bookworm: pari-gp2c 0.0.13-1
- debian trixie: pari-gp2c 0.0.14-1
- ubuntu jammy: pari-gp2c 0.0.12-2
- ubuntu noble: pari-gp2c 0.0.13-1
- ubuntu questing: pari-gp2c 0.0.14-1
- ubuntu resolute: pari-gp2c 0.0.14pl1-1
- ubuntu stonking: pari-gp2c 0.0.14pl1-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms