qsc
Joined: 14 Jun 2007 Posts: 1
|
Posted: Fri Jun 15, 2007 1:01 pm Post subject: What is the right way to use pgdbg? |
|
|
I know this is not a good question to ask, but that is the question that I kept asking when I read the PGI documentation to learn how to use the debugger. The documentation is detailed, I think. But, frankly speaking, it is not an ideal one for a beginner who doesn't have experience with any kind of debugger.
I don't expect the question above to be answered here. So let me change to two other specific ones. I am trying to use the command line interface.
1. In the course of debugging, can we put several commands together in a script file, and then execute the file, instead of keying the commands every time? If yes, then how? Note that I am not talking about the debugger initialization file.
2. Is there any way to recall a command in history and execute it? I tried the arrow keys, they don't work. |
|
hongyon2
Joined: 02 Oct 2006 Posts: 22
|
Posted: Mon Jun 25, 2007 9:06 am Post subject: |
|
|
qsc,
1) You can put commands in a file and either pass it as an argument with option -s when you invoke pgdbg or you can call it using command script in pgdbg.
Example:
1.1) pgdbg -s mycmds a.out # pass as argument
1.2) pgdbg> script mycmds # execute command in file mycmds
2) Type history to list the previous commands you enter and type !<history number> to repeat the command in history list. Note that this only works with the command you type in. It will not work with commands you put in a file in (1) above. By default the history should be on. If not, you can type in pgdbg:
pgdbg> pgienv history on
to make sure it is on.
Hongyon |
|