---
name: "gp2c-dbg"
section: "1"
platform: "linux"
package: "pari-gp2c"
version: "0.0.14-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gp2c-dbg"
---

# gp2c-dbg(1)

The GP to C debugger driver

## NAME

GP2C-DBG - The GP to C debugger driver

## DESCRIPTION

gp2c-dbg *\[gp2c options\] \[file.gp\]*

Compile *file.gp* with **gp2c** and launch a debugger session of gp where the functions of *file.gp* are loaded. \[gp2c options\] are passed to **gp2c**.

gp2c-dbg *file.c*

Compile *file.c* and launch a debugger session of **gp** where the functions of *file.c* are loaded. The file *file.c* must have suitable *GP;install()* lines.

## USAGE

Since there is no debugger for the GP language, **gp2c-dbg** allows to debug GP scripts with the C debugger. To catch **PARI** errors, you can set a break point on the function "pari\_err".  Note that your functions will not be loaded until **gp** read the .run file.

## FILES

*file.gp.c* The C output of **gp2c**.

- *file.gp.so*

  The GP loadable module.

- *file.gp.run*

  The  commands to load the module. Once a module is compiled, you can load it inside a **gp** session by running this script.

## ENVIRONMENT

- *GP2C*

  Path to the gp2c compiler, default: /usr/bin/gp2c

- *GP\_DBG*

  Path to the gp calculator, default: /usr/bin/gp

- *GP2C\_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.  There is absolutely no warranty for GP2C.

## SEE ALSO

The GP2C manual, *[gp2c-run(1)](/gp2c-run/1.md),* *[gp2c(1)](/gp2c/1.md),* *[gp(1)](/gp/1.md),* *[gdb(1)](/gdb/1.md)*
