Hello,
Was wondering if someone could shed some light on a problem I have. I cannot hit breakpoints in my native dylib when debugging on Mac OS X. I searched the C::B forums but did not find a solution.
More Info: I am using C::B SVN6336 on Mac OS X 10.6.4.
I am developing a native dylib that is called by a mono C# application via a C++/CLI managed code wrapper.
The managed Mono app is developed using MonoDevelop.
The C++/CLI bridge code is developed using Microsoft’s tool chain.
The native dylib is developed using C::B on the Mac.
Everything works fine but I need to debug from the standpoint of the Mac dylib.
In the C::B IDE, I have the workspace of the dylib opened.
Via Project->Set program’s arguments, I have specified the following:
Host application: /usr/X11/bin/xterm
Program arguments: -T Debugging –e mono MyMonoTestApp.exe
When I start debugging, an X term window gets displayed, the mono test app executes and writes to the xterm output window fine.
The break points I set inside the dylib never get hit by gdb. I see I have a symbol load problem and that is why the breakpoint is not getting set.
I am not sure how to solve this.
Here is debugger window output from C::B that is the result of running the external Mono test app from within the IDE. I then terminate it from within the IDE once I know my BPs have been missed:
DYLD_LIBRARY_PATH=.:
Command-line: /usr/bin/gdb -nx -fullname -quiet -args /usr/X11/bin/xterm
Working dir : /Development/VOIPMediaEngine/sip/Win32UA_DLL/
> set prompt >>>>>>cb_gdb:
Reading symbols for shared libraries .......... done
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.3.50-20050815 (Apple version gdb-1469) (Wed May 5 04:36:56 UTC 2010)
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 "x86_64-apple-darwin".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set disassembly-flavor intel
>>>>>>cb_gdb:
> catch throw
>>>>>>cb_gdb:
> source /Applications/AppNew/CodeBlocks.app/Contents/Resources/share/codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> cd ../../BinaryImages/DebugMac32
>>>>>>cb_gdb:
> directory /Development/VOIPMediaEngine/sip/Win32UA_DLL/
>>>>>>cb_gdb:
> directory /Development/VOIPMediaEngine/
>>>>>>cb_gdb:
> set args -T Debugging -e mono VoipMediaEngineConsoleTestMono.exe
>>>>>>cb_gdb:
> handle SIGXCPU SIG33 SIG35 SIGPWR nostop noprint
>>>>>>cb_gdb:
> break "/Development/VOIPMediaEngine/SubModules/PortPackage/PortPackage.cpp:273"
No symbol table is loaded. Use the "file" command.
Breakpoint 1 ("/Development/VOIPMediaEngine/SubModules/PortPackage/PortPackage.cpp:273) pending.
>>>>>>cb_gdb:
> run
Reading symbols for shared libraries .+++++++++..........
.
.
.
....
..
...
..
...
..
.
.
..
..
... done
Catchpoint 2 (throw)
Program received signal SIGINT, Interrupt.
0x00007fff85d96dce in select$DARWIN_EXTSN ()
>>>>>>cb_gdb:
> info registers
rax 0x4 4
rbx 0x0 0
rcx 0x7fff5fbff738 140734799804216
rdx 0x10005bd00 4295343360
rsi 0x10005bd80 4295343488
rdi 0x5 5
rbp 0x7fff5fbff7b0 0x7fff5fbff7b0
rsp 0x7fff5fbff738 0x7fff5fbff738
r8 0x0 0
r9 0x0 0
r10 0x0 0
r11 0x246 582
r12 0x10083d200 4303606272
r13 0x10005bd80 4295343488
r14 0x10083d378 4303606648
r15 0x0 0
rip 0x7fff85d96dce 0x7fff85d96dce <select$DARWIN_EXTSN+10>
eflags 0x247 583
cs 0x2f 47
ss 0x0 0
ds 0x0 0
es 0x0 0
fs 0x10 16
gs 0x48 72
>>>>>>cb_gdb:
> bt 30
#0 0x00007fff85d96dce in select$DARWIN_EXTSN ()
#1 0x0000000100011589 in VTparse ()
#2 0x00000001000117b8 in VTRun ()
#3 0x000000010001e239 in main ()
>>>>>>cb_gdb:
> quit
Thanks,
edwin