Jump to content

Help With Debugging Please.


Recommended Posts

I'm not that well versed in Linux debugging, so forgive me if this is trite, but....

I've compiled my SOP with the -g option,

I'm running gdb through emacs (M-x gdb)

I start gdb with gdb houdini

but when I try to set a breakpoint in emacs (with Cntl-X SPC), I get:

No source file named SOP_Whatever.C

if I try to run gdb from the command line, and set a breakpoint like so:

break SOP_Whatever::cookMySop

I get:

Can't find member of namespace, class, struct, or union named "SOP_Whatever::cookMySop"

Any suggestions? Again, I don't really know my way through gdb, so I suppose I could be mising an easy startup option or something of the sort...

FYI: I'm running RH7.3, gdb 5.5-2, with Houdini 6.5.100

[edit]

I've tried creating a hip file with the SOP dropped but not cooked so I could load it up, set the breakpoint, then cook, but when I give gdb the command run -foreground debug.hip, I just get back Program exited normally.

[/edit]

Thanks.

Link to comment
Share on other sites

got it.

the method in the edit above works, but you have to specify the full path the the .hip file. (at least, that's how I got it working.

so, for reference:

compile with -g

create a hip file with the SOP dropped but not cooked.

at a command line, run gdb houdini -or- "M-x gdb" in emacs

at the gdb prompt, type:

run -foreground /path/to/mydebug.hip

houdini should then launch with the sop dropped, but not cooked, now you can set a breakpoint like:

break SOP_Watever::cookMySop -or- "Cntl-X SPC" on the line in emacs.

now cook the SOP

and step from there

any other debugging tips?

Link to comment
Share on other sites

I usually just use UT_DBGOUT from UT_Debug.h on Linux. :) UT_ASSERT from UT_Assert.h is also good. For HDK users, you would likely need to do something like this in your .C files:

.. include all other headers first ...
#ifdef HDK_DEBUG
  #define UT_DEBUG
  #define UT_ASSERT_LEVEL 2
#endif
#include <UT/UT_Debug.h>
#include <UT/UT_Assert.h>

And then do a -DHDK_DEBUG in your own compile options where you add -g.

Link to comment
Share on other sites

  • 2 years later...

SO I haven't had to debug HDK in a while. Has something changed? I tried my own method above & it no longer works. When I try, I get a bunch of this:

Starting program: /opt/hfs8.2/bin/houdini -forground /xxx/users/briank/dev/HDK/xxx/qtest_new.hip

warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

[Thread debugging using libthread_db enabled]

Error while reading shared library symbols:

Cannot find new threads: generic error

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

(no debugging symbols found)

Cannot find user-level thread for LWP 25645: generic error

(gdb)

This is houdini 8.2 (yes, I know there's a new one, but we're using 8 for this production).

Any ideas?

Link to comment
Share on other sites

  • 4 months later...
This might be silly, but did you really intend to misspell -foreground?

Hrm... missed this response when I posted, so in the interest of completeness, yes... it was a typo. :P

... though I'm now getting a houdini error message: "-foreground load failed: No such file or directory". ???

... or in H9, I get "-fullname load filed. No such file or directory"

Edited by BrianK
Link to comment
Share on other sites

  • 1 month later...
Guest xionmark
Er, it doesn't look like you're correctly following the instructions in post #2 to me....


I've followed the instructions above and haven't had any luck though it worked in the past (H8)

Anyone else using gdb successfully with H9.1?

  Edited by xionmark
Link to comment
Share on other sites

  • 6 years later...

Ok guys, bringing back this old thread to life :)

Need help with debugging. I'm on Mac OSX 10.9 and trying to debug with GDB (installed with homebrew).

1) Compile with -g flag

2) Run gdb: gdb /Applications/Houdini\ 13.0.401/Houdini\ FX.app/Contents/MacOS/houdini

3) Run houdini: run -foreground

    Here is the first question: Why i can't halt houdini process with CTRL+C to set breakpoints? I've google a lot of similar questions with no answers.

4) Run my hscript command, houdini crashed.

5) I see the stack trace:

#0  0x000000011437f62c in UT_Array<double>::array() () from /Users/alex/houdini13.0/dso/bake_cmd.dylib
#1  0x000000011437ab5c in CL_Track::getData() () from /Users/alex/houdini13.0/dso/bake_cmd.dylib
#2  0x00000001143791f9 in addTrackAndSetData(CL_Clip*, long, TrackName&, UT_Vector3T<float> const&) () from /Users/alex/houdini13.0/dso/bake_cmd.dylib
#3  0x0000000114379c2f in bake_cmd(CMD_Args&) () from /Users/alex/houdini13.0/dso/bake_cmd.dylib

6)  I found that my problem line is 81:Trying to set breakpoint : 

(gdb) break bake_cmd.cpp:81
Cannot access memory at address 0x1070(gdb) 
(gdb) info locals
No symbol table info available.
(gdb) info source
Current source file is bake_cmd.cpp
Compilation directory is /Users/alex/sandbox/animax/bake_cmd/bake_cmd
Located in /Users/alex/sandbox/animax/bake_cmd/bake_cmd/bake_cmd.cpp
Contains 207 lines.
Source language is c++.
Compiled with DWARF 2 debugging format.
Does not include preprocessor macro info.

I'm stuck  :(

Link to comment
Share on other sites

On OSX, Houdini is built with clang, not gcc. Try just attaching to Houdini after it's started up with XCode.

Hi Edward. Yes, i know, but gdb should be able to debug clang binaries, at least google says so :). And i don't like xCode.  I use Vim + Makefile. 

Can Apple's LLDB be used at command line to debug houdini plugins?

Link to comment
Share on other sites

I'm not sure that there's anything special per se at the Side Effects pipeline. The build system is built on GNU Make (for all platforms), we use subversion for the central repo (git or mercurial for private branches depending on preference). Debuggers/editors/OSes run the gamut depending on the developer. Me, I stick to Windows because despite it being much slower for building, I can't live without a real debugger like Visual Studio. For editing, I still use gvim.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...