PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Setting breakpoints

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



Joined: 25 Oct 2007
Posts: 4

PostPosted: Thu Oct 25, 2007 12:57 pm    Post subject: Setting breakpoints Reply with quote

I wonder if anyone had any pointers to detailed information about setting breakpoints in C/C++ code, e.g.

- setting watch/breakpoints on data/routines within namespaces
- setting breakpoints in C++ classes, especially ctors/dtors
- setting breakpoints in all routines of a given (undecorated) name
- setting breakpoints in one routine, where duplicate (undecorated) names exist
- setting breakpoints in template functions

Cheers
Tim
Back to top
View user's profile
donb



Joined: 20 Jul 2004
Posts: 88
Location: The Portland Group, Inc.

PostPosted: Thu Oct 25, 2007 2:09 pm    Post subject: Reply with quote

Hi Tim,

We have been working on improvements to our C++ debugging support, but unfortunately it isn't yet complete. We plan to support most of what you have listed. Responses to specific inquiries follow:

- setting watch/breakpoints on data/routines within namespaces
Qualifying the names of routines and data by namespace is not yet supported.

- setting breakpoints in C++ classes, especially ctors/dtors
In 7.1, you can do this by qualifying the name with the class, e.g. for the constructor of class foo you would set the breakpoint on foo::foo. In the GUI you would just point to it and click in the events column.

- setting breakpoints in all routines of a given (undecorated) name
You currently have to do this one-by-one

- setting breakpoints in one routine, where duplicate (undecorated) names exist
The debugger will prompt you asking which member function you want to set the breakpoint in. I don't think it will currently disambiguate names outside of a single class, so you may want to qualify the routine name using the class name.

- setting breakpoints in template functions
We don't yet have support for setting a breakpoint on a template function by name. In many cases you can step into a template function and set breakpoints while you are in the scope of the function.

--Don[/quote]
Back to top
View user's profile
timp



Joined: 25 Oct 2007
Posts: 4

PostPosted: Thu Oct 25, 2007 3:18 pm    Post subject: Reply with quote

donb wrote:
Hi Tim,

Hi Don,

Thanks for your quick reply on this...

We have been working on improvements to our C++ debugging support, but unfortunately it isn't yet complete. We plan to support most of what you have listed. Responses to specific inquiries follow:

- setting watch/breakpoints on data/routines within namespaces
Qualifying the names of routines and data by namespace is not yet supported.
(tp) ok

- setting breakpoints in C++ classes, especially ctors/dtors
In 7.1, you can do this by qualifying the name with the class, e.g. for the constructor of class foo you would set the breakpoint on foo::foo. In the GUI you would just point to it and click in the events column.
(tp) Fair enough, any thoughts on support for compiler generated ctors/dtors ? I appreciate that can be quite nasty, especially if any optimisation is still present in the debug executable.. just curious (not something that we, or others i've spoken to, typically use)

- setting breakpoints in all routines of a given (undecorated) name
You currently have to do this one-by-one
(tp) ok, not generally much of an issue.. also ties in with stuff just below...

- setting breakpoints in one routine, where duplicate (undecorated) names exist
The debugger will prompt you asking which member function you want to set the breakpoint in. I don't think it will currently disambiguate names outside of a single class, so you may want to qualify the routine name using the class name.
(tp) Ah - that's good, cheers. One feature i've seen in a couple of places that is quite useful is to allow single, multiple (including all) selections in the GUI breakpoint widget.. from the GUI programming point of view it's generally a minor difference in the implementation between one and many anyway - just a thought if you guys are doing work in that area

- setting breakpoints in template functions
We don't yet have support for setting a breakpoint on a template function by name. In many cases you can step into a template function and set breakpoints while you are in the scope of the function.
(tp) this is a world of hurt - don't know many/any environments where this actually *is* supported in any sensible way... pity, from a programming point of view, but understandable in many ways.

Thanks for your time and advice Don

Tim

--Don
[/quote][/quote]
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