BrianK Posted June 1, 2005 Share Posted June 1, 2005 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. Quote Link to comment Share on other sites More sharing options...
BrianK Posted June 1, 2005 Author Share Posted June 1, 2005 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? Quote Link to comment Share on other sites More sharing options...
edward Posted June 2, 2005 Share Posted June 2, 2005 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. Quote Link to comment Share on other sites More sharing options...
BrianK Posted September 28, 2007 Author Share Posted September 28, 2007 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? Quote Link to comment Share on other sites More sharing options...
Jason Posted September 28, 2007 Share Posted September 28, 2007 Starting program: /opt/hfs8.2/bin/houdini -forground /xxx/users/briank/dev/HDK/xxx/qtest_new.hip This might be silly, but did you really intend to misspell -foreground? Quote Link to comment Share on other sites More sharing options...
BrianK Posted February 5, 2008 Author Share Posted February 5, 2008 (edited) 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. ... 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 February 5, 2008 by BrianK Quote Link to comment Share on other sites More sharing options...
edward Posted February 6, 2008 Share Posted February 6, 2008 Er, it doesn't look like you're correctly following the instructions in post #2 to me.... Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted March 7, 2008 Share Posted March 7, 2008 (edited) 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 October 6, 2014 by xionmark Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted October 6, 2014 Share Posted October 6, 2014 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 Quote Link to comment Share on other sites More sharing options...
edward Posted October 6, 2014 Share Posted October 6, 2014 On OSX, Houdini is built with clang, not gcc. Try just attaching to Houdini after it's started up with XCode. Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted October 7, 2014 Share Posted October 7, 2014 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? Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted October 7, 2014 Share Posted October 7, 2014 Can Apple's LLDB be used at command line to debug houdini plugins? Yes! It works like a charm! Edward, can you please tell a little bit about development pipeline at SideEffects? How it's organised? What tools are used? Very interesting. Quote Link to comment Share on other sites More sharing options...
edward Posted October 7, 2014 Share Posted October 7, 2014 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.