As I posted on another forum, the steps I've historically taken to debug HDK is as follows:
compile with -g option
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 (or in emacs, houdini -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
… however, I'm now getting “-foreground load failed: No such file or directory” in H8 or “-fullname load filed. No such file or directory” in H9.
Is it still possible to debug with gdb? If so, any idea what's going wrong here?
HDK - how do you debug with gdb?
7582 3 1- BrianK
- Member
- 18 posts
- Joined: 7月 2005
- Offline
- Joe
- Member
- 483 posts
- Joined: 7月 2005
- Offline
Quick gdb hint: one easy way to get around needing to type -foreground is to do
set fork-follow-mode child
in gdb before starting Houdini.
However, that doesn't explain why you can't run houdini -foreground from gdb now. One thing I do notice is that you say -fullfile in your H9 example, and not -foreground; can you check your syntax?
set fork-follow-mode child
in gdb before starting Houdini.
However, that doesn't explain why you can't run houdini -foreground from gdb now. One thing I do notice is that you say -fullfile in your H9 example, and not -foreground; can you check your syntax?
- BrianK
- Member
- 18 posts
- Joined: 7月 2005
- Offline
JoeHmm… the syntax seems to be correct (well - it's consistent with what I posted above). I have had a little more luck by using “houdini-bin” under H9 rather than “houdini”, though it's still not working properly - not stopping at breakpoints, I get a message that says, “simple.hip load errors” with an “OK” button only.
Quick gdb hint: one easy way to get around needing to type -foreground is to do
set fork-follow-mode child
in gdb before starting Houdini.
However, that doesn't explain why you can't run houdini -foreground from gdb now. One thing I do notice is that you say -fullfile in your H9 example, and not -foreground; can you check your syntax?
For anyone else that uses gdb, is this the way you do it or is there another way?
software dude @ Asylum
- rvinluan
- スタッフ
- 1283 posts
- Joined: 7月 2005
- Offline
BrianK
compile with -g option
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 (or in emacs, houdini -foreground /path/to/mydebug.hip)
Hello,
I tested your steps with Houdini 8.2.339 and Houdini 9.1.144 and I was able to set a breakpoint and step through the code in gdb.
For H9, you should debug houdini-bin, not houdini. Also, if you find you're running into python errors on startup, you need to set the following environment variables before running “gdb houdini-bin”:
export LD_LIBRARY_PATH=“${HFS}/python/lib:${LD_LIBRARY_PATH}”
export PYTHONPATH=“${HFS}/houdini/scripts/python/ucs4:${PYTHONPATH}”
What H8 and H9 versions are you using? Also, what were the last Houdini versions you tried that worked with gdb? And can you still debug those versions?
Cheers,
Rob
-
- Quick Links