CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Debugging - How to access codes of schemes by using GDB?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 30, 2013, 00:33
Default Debugging - How to access codes of schemes by using GDB?
  #1
Member
 
Geon-Hong Kim
Join Date: Feb 2010
Location: Ulsan, Republic of Korea
Posts: 36
Rep Power: 16
Geon-Hong is on a distinguished road
Dear Foamers,

Recently I've tried to debug the limiter of OF-2.2. I use GDB as a debugging tool.

What I want to do is monitor values in NVDVTVDV.H file, but I cannot reach to this class via GDB since this class is handled by temporary object handler(tmp<...>).

After I ran gdb and loaded interFoam, I tried to set a break point in the class as,

Code:
 
(gdb) b NVDVTVDV.H:130
No source file named NVDVTVDV.H.
Make breakpoint pending on future shared library load? (y or [n])
I've got the above error message.

I don't know what the pending works in GDB nor how to set a break point in the code.

Anyone who solved this?
Geon-Hong is offline   Reply With Quote

Old   October 1, 2013, 20:05
Default Resolved
  #2
Member
 
Geon-Hong Kim
Join Date: Feb 2010
Location: Ulsan, Republic of Korea
Posts: 36
Rep Power: 16
Geon-Hong is on a distinguished road
Never mind.

I solved the problem by setting DEBUG switch on when I compile the source codes.

Now I can access the source codes in the library.
Geon-Hong is offline   Reply With Quote

Reply

Tags
breakpoint, debug, gdb, pending


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it worth it? Jason Bardis Main CFD Forum 47 July 27, 2011 04:52
time stepping schemes for compressible DNS/LES shyamdsundar Main CFD Forum 0 January 14, 2010 23:15
A strange error when debugging fvcgradU using GDB mattijs OpenFOAM Running, Solving & CFD 0 August 14, 2008 04:16
OpenFOAM14 for Mac OSX Darwin 104 gschaider OpenFOAM Installation 118 July 20, 2008 05:19
Including a new utility in OF 13 alondono OpenFOAM Running, Solving & CFD 7 April 11, 2008 09:17


All times are GMT -4. The time now is 23:11.