PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

What is the right way to use pgdbg?

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
qsc



Joined: 14 Jun 2007
Posts: 1

PostPosted: Fri Jun 15, 2007 1:01 pm    Post subject: What is the right way to use pgdbg? Reply with quote

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.
Back to top
View user's profile
hongyon2



Joined: 02 Oct 2006
Posts: 40

PostPosted: Mon Jun 25, 2007 9:06 am    Post subject: Reply with quote

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
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group