From: tigital <ti...@ma...> - 2003-06-06 03:48:41
|
On Wednesday, May 28, 2003, at 02:43 PM, Daniel A. Steffen wrote: > > On Thursday, May 29, 2003, at 03:39 Australia/Sydney, Jim Ingham wrote: > >> If pd uses the shared versions of Tcl & Tk, do the following: >> >> 1) Build versions of the Tcl.framework with the Development Build >> Style in PB. >> 2) Build a version of pd that links with this framework >> 3) Put both binaries, pd, & Tcl.framework in the same directory, say >> ~/PD >> 4) Do: >> >> $ setenv DYLD_FRAMEWORK_PATH ~/PD >> $ gdb ~/PD/pd >> .... >> (gdb) break Tcl_Init >> (gdb) run >> ... > > you can also do this from the projectbuilder GUI, e.g. by adding a > custom executable to Tcl.pbproj or to Wish.pbproj pointing to your pd > binary (or if you need a bundled app, you could just duplicate the > Wish target in Wish.pbproj and add your specific application sources). > This allows you to set breakpoints in the Tcl/Tk sources via the GUI > and use the GUI interface to gdb, and if you build pd with debug > symbols enabled, you should be able to deal the pd sources through the > debugger GUI as well. > > BTW, note that the makefiles by default build both an optimized and a > debug version of Tcl and Tk, so that you can use > setenv DYLD_IMAGE_SUFFIX _debug > (or the equivalent "Dynamic Runtime Library Variant" popup in the > projectbuilder executable settings) to switch to the debug library on > the fly without requiring a relink. (Note that this will also cause > any other linked frameworks to use their debug versions if they have > any, notably Carbon_debug, which may be undesirable) > Or you can just rename e.g. Tcl.framework/Tcl_debug to > Tcl.framework/Tcl ... ...ok, I tried using the "Dynamic Runtime Library Variant" popup set to debug, but I get the following crash reported in ???.crash.log: ********** Date/Time: 2003-06-05 23:06:45 -0400 OS Version: 10.2.6 (Build 6L60) Host: host100-null.null.bellsouth.net Command: Unknown PID: 2923 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_INVALID_ADDRESS (0x0001) at 0xbfffc8b8 Thread 0: #0 0x6212780c in select (bcmp.c:41) #1 0x0b0e06e0 in NotifierThreadProc (tkMacOSXNotify.c:1055) #2 0x62121d5c in _pthread_body (pthread.c:586) ...then, when I try to rename Tk.framework/Tk_debug to Tk.framework/Tk and run it, I don't seem to get any breakpoints! Here's an example of what is being spit out to console when a pd patch is loaded: .x1c9da0 map 1 ; pdtk_text_set .x1c9da0.c .x1c9da0.t1c6ba0 {0} .x1c9da0.c coords .x1c9da0.t1c6ba0R 754 6 787 6 791 10 791 19 754 19 754 6 .x1c9da0.c coords .x1c9da0.t1c6ba0o0 754 18 761 19 .x1c9da0.c coords .x1c9da0.t1c6ba0i0 754 6 761 8 .x1c9da0.c create line 754 6 787 6 791 10 791 19 754 19 754 6 -tags .x1c9da0.t1c6ba0R .x1c9da0.c create rectangle 754 18 761 19 -tags .x1c9da0.t1c6ba0o0 .x1c9da0.c create rectangle 754 6 761 8 -tags .x1c9da0.t1c6ba0i0 pdtk_text_new .x1c9da0.c .x1c9da0.t1c6ba0 755.000000 8.000000 {0} 12 black pdtk_text_set .x1c9da0.c .x1c9da0.t1c7ee0 {0} .x1c9da0.c coords .x1c9da0.t1c7ee0R 18 610 51 610 55 614 55 623 18 623 18 610 .x1c9da0.c coords .x1c9da0.t1c7ee0o0 18 622 25 623 .x1c9da0.c coords .x1c9da0.t1c7ee0i0 18 610 25 612 .x1c9da0.c create line 18 610 51 610 55 614 55 623 18 623 18 610 -tags .x1c9da0.t1c7ee0R .x1c9da0.c create rectangle 18 622 25 623 -tags .x1c9da0.t1c7ee0o0 .x1c9da0.c create rectangle 18 610 25 612 -tags .x1c9da0.t1c7ee0i0 pdtk_text_new .x1c9da0.c .x1c9da0.t1c7ee0 19.000000 612.000000 {0} 12 black pdtk_text_set .x1c9da0.c .x1c9da0.t1c7f60 {0} .x1c9da0.c coords .x1c9da0.t1c7f60R 19 16 52 16 56 20 56 29 19 29 19 16 .x1c9da0.c coords .x1c9da0.t1c7f60o0 19 28 26 29 .x1c9da0.c coords .x1c9da0.t1c7f60i0 19 16 26 18 .x1c9da0.c create line 19 16 52 16 56 20 56 29 19 29 19 16 -tags .x1c9da0.t1c7f60R .x1c9da0.c create rectangle 19 28 26 29 -tags .x1c9da0.t1c7f60o0 .x1c9da0.c create rectangle 19 16 26 18 -tags .x1c9da0.t1c7f60i0 pdtk_text_new .x1c9da0.c .x1c9da0.t1c7f60 20.000000 18.000000 {0} 12 black pdtk_text_set .x1c9da0.c .x1c9da0.t1c7fe0 {0} .x1c9da0.c coords .x1c9da0.t1c7fe0R 332 17 365 17 369 21 369 30 332 30 332 17 .x1c9da0.c coords .x1c9da0.t1c7fe0o0 332 29 339 30 .x1c9da0.c coords .x1c9da0.t1c7fe0i0 332 17 339 19 .x1c9da0.c create line 332 17 365 17 369 21 369 30 332 30 332 17 -tags .x1c9da0.t1c7fe0R .x1c9da0.c create rectangle 332 29 339 30 -tags .x1c9da0.t1c7fe0o0 .x1c9da0.c create rectangle 332 17 339 19 -tags .x1c9da0.t1c7fe0i0 pdtk_text_new .x1c9da0.c .x1c9da0.t1c7fe0 333.000000 19.000000 {0} 12 black pdtk_text_set .x1c9da0.c .x1c9da0.t1c8060 {0} .x1c9da0.c coords .x1c9da0.t1c8060R 332 270 365 270 369 274 369 283 332 283 332 270 .x1c9da0.c coords .x1c9da0.t1c8060o0 332 282 339 283 .x1c9da0.c coords .x1c9da0.t1c8060i0 332 270 339 272 .x1c9da0.c create line 332 270 365 270 369 274 369 283 332 283 332 270 -tags .x1c9da0.t1c8060R .x1c9da0.c create rectangle 332 282 339 283 -tags .x1c9da0.t1c8060o0 .x1c9da0.c create rectangle 332 270 339 272 -tags .x1c9da0.t1c8060i0 ...so I was assuming that a breakpoint somewhere in the "create" functions in tkText.c, tkTextDisp.c, tkCanvText.c, tkMacOSXDraw.c, or tkMacOSXFont.c would help, but it's not :-( ...frankly, I'm totally lost: any other pointers? l8r, jamie |