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

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

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 30, 2013, 00:33
Default Debugging - How to access codes of schemes by using GDB?
  #1
New Member
 
Geon-Hong Kim
Join Date: Feb 2010
Location: Ulsan, Republic of Korea
Posts: 27
Rep Power: 7
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
New Member
 
Geon-Hong Kim
Join Date: Feb 2010
Location: Ulsan, Republic of Korea
Posts: 27
Rep Power: 7
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

Thread Tools
Display Modes

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 On
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 15, 2010 00: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 07:57.