Re: [Inkscape-devel] Debugging inkscape
Whoops that was supposed to be a message to inkscape-devel.
On 6/9/07, Bill Baxter <wbaxter@...400...> wrote:
Let me back up with a more basic question: how do I debug inkscape? The build make by buildtool.exe doesn't seem to have debug symbols.
Still looking for info on this. I guess I need to add "-g" somewhere in build.xml?
fprintfs are scattered through the code making me thing those should work, but I found this INKSCAPE_DEBUG_LOG env var, but that doesn't seem to make fprintf stderr output work. Maybe I need to build inkscape as a console app? Where do I set that?
I found the answer to this one -- need to add a "-mconsole" flag after "-mwindows" in build.xml.
--bb
Bill Baxter wrote:
On 6/9/07, Bill Baxter <wbaxter@...400...> wrote:
Let me back up with a more basic question: how do I debug inkscape? The build make by buildtool.exe doesn't seem to have debug symbols.
Still looking for info on this. I guess I need to add "-g" somewhere in build.xml?
I think around line 249: <flags> -Wall -O3 -mms-bitfields </flags>
Change -O3 to -g. If I remember correctly , building will become *very* slow. I'd advice against using -g. A lot of the function names are still present in the normal builds (use "file inkscape.exe inkscape.dbg" in gdb), if you need detailed stepping, I usually recompile with a g_message("%d",i++) every line :) It is much much quicker.
fprintfs are scattered through the code making me thing
those should
work, but I found this INKSCAPE_DEBUG_LOG env var, but that doesn't seem to make fprintf stderr output work. Maybe I need to build inkscape as a console app? Where do
I set that?
I found the answer to this one -- need to add a "-mconsole" flag after "-mwindows" in build.xml.
See here: http://wiki.inkscape.org/wiki/index.php/FAQ#I.27m_on_Windows.2C_and_command_...
Cheers, Johan
J.B.C.Engelen@...1578... wrote:
Bill Baxter wrote:
On 6/9/07, Bill Baxter <wbaxter@...400...> wrote:
Let me back up with a more basic question: how do I debug inkscape? The build make by buildtool.exe doesn't seem to have debug symbols.
Still looking for info on this. I guess I need to add "-g" cpu somewhere in build.xml?
I think around line 249: <flags> -Wall -O3 -mms-bitfields </flags>
Change -O3 to -g. If I remember correctly , building will become *very* slow. I'd advice against using -g. A lot of the function names are still present in the normal builds (use "file inkscape.exe inkscape.dbg" in gdb), if you need detailed stepping, I usually recompile with a g_message("%d",i++) every line :) It is much much quicker.
Yes, that is the correct place. <flags> corresponds to CFLAGS.
Yes, -g can take all of your cpu and memory to complete. I would suggest that if you can narrow your debugging to one or two source files, remove the .o's for just those files, add -g, and compile and link. Then the debug information will be generated for just those and not everything.
I agree that g_message() and g_warning() are better than using the console. With those two, you can get the output redirected to the Messages dialog.
bob
participants (3)
-
unknown@example.com
-
Bill Baxter
-
Bob Jamison