[metroliner:~/Manta/build-leopard] abe% gdb python
GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries ... done
(gdb) r ../SwigInterface/runwxmanta.py
Starting program: /usr/bin/python ../SwigInterface/runwxmanta.py
Reading symbols for shared libraries ++. done
Program received signal SIGTRAP, Trace/breakpoint trap.
0x8fe01010 in __dyld__dyld_start ()
(gdb) c
Continuing.
Reading symbols for shared libraries . done
Reading symbols for shared libraries
Reading symbols for shared libraries .. done
^C
Program received signal SIGINT, Interrupt.
0x924b14a6 in mach_msg_trap ()
(gdb) b RTRT.cc:736
Breakpoint 1 at 0x2258d66: file /Users/abe/Manta/Engine/Control/ RTRT.cc, line 736.
Breakpoint 2 at 0x335a682: file /Users/abe/Manta/Engine/Control/ RTRT.cc, line 736.
warning: Multiple breakpoints were set.
Use the "delete" command to delete unwanted breakpoints.
(gdb) R
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/bin/python ../SwigInterface/runwxmanta.py
;
Program received signal SIGTRAP, Trace/breakpoint trap.
0x8fe01010 in __dyld__dyld_start ()
(gdb) c
Continuing.
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
[Switching to process 4296 thread 0x5103]
Breakpoint 2, Manta::RTRT::internalRenderLoop (this=0x95a600, proc=0, lateComerFlag=false) at /Users/abe/Manta/Engine/Control/ RTRT.cc:736
736 barrier1.wait(workersRendering);
(gdb)
gdb isn't good about stopping in breakpoints by function name. Set
them using file:linenumber notation ( MyFile.cc:230 ).
Try adding "gdb --args" in front of the command used to run manta.
After gdb starts you can execute "run".
Another alternative is to see what the process number is and use the
"attach <PID>" after starting a plain gdb.
James
On Tue, Jun 17, 2008 at 10:19 AM, Li-Ta Lo
< >
wrote:
Hi,
What is the correct way to debug C++ code while running Manta as
a python script? I tried use "gdb /usr/bin/python" and
"b Manta:Somefunction". The breakpoint is reached but the program
is not stopped.
Ollie
Archive powered by MHonArc 2.6.16.