Bureaucrats, cc_docs_admin, cc_staff
337
edits
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
= Quickstart guide = | = Quickstart guide = | ||
Using PGDBG usually consists of two steps: | |||
# '''Compilation''': Compile the code with the debugging enabled | |||
# '''Execution and analysis''': Execute the code and analyze the results | |||
Both steps can be accomplished in either command-line mode or graphical mode. | |||
== Environment modules == <!--T:3--> | == Environment modules == <!--T:3--> | ||
Line 17: | Line 22: | ||
{{Command|module load pgi/17.3}} | {{Command|module load pgi/17.3}} | ||
== | == Compiling your code == | ||
To be able to debug with pgdbg you first need to compile your code with debugging information enabled. With the pgdbg you do so by adding a debugging flag "-g": | To be able to debug with pgdbg you first need to compile your code with debugging information enabled. With the pgdbg you do so by adding a debugging flag "-g": | ||
{{Command|pgcc -g program.c -o program}} | {{Command|pgcc -g program.c -o program}} | ||
== | == Executing your code == | ||
Once your code is compiled with the proper options, you execute it: | Once your code is compiled with the proper options, you execute it: | ||
{{Command|pgdbg program arg1 arg2}} | {{Command|pgdbg program arg1 arg2}} | ||
== Command-line mode == | |||
If you have set the X11 forwarding then the pgdbg will start in the graphical mode in a pop-up window. If you don't have X11 forwarding, you can run pgdbg in a text mode by adding an extra option "-text" : | If you have set the X11 forwarding then the pgdbg will start in the graphical mode in a pop-up window. If you don't have X11 forwarding, you can run pgdbg in a text mode by adding an extra option "-text" : |