[comp.sys.ibm.pc] Turbo Debugger QUESTION

kushner@ux3.lbl.gov (Gary Kushner) (02/12/89)

I'm having trouble doing something I think should be relatively easy.
 
When I'm debugging a C program under TD, and I break into it while it's
running, I have a near impossible time getting TD back on track with the
source code.  I always end up in the CPU window.  The trouble is, I've found
no easy way to get TD to execute code until it gets to the start of the next
source line.  I've even traced through the pseudo-code until I've gotten
myself back into known territory and STILL haven't gotten TD to allow me to
trace in the module window.  I've tried many things and won't go into them here,
since I assume the solution is a trivial oversight on my part.
 
I know recovering from an interrupt while in never-never land is not an easy
thing for a debbuger to do, but my inability with TD is all the more
frustrating because of the ease in which CV does it.  In CV, one just sets the
view to source (hit F3 twice) and executes the trace command.

Hope someone knows the answer,
Gary.

swh@hpsmtc1.HP.COM (Steve Harrold) (02/15/89)

Re: Breaking into TD

I've experienced this frustration also.  I'm especially flustered when
trying to get control back when I enter somnething to a stdin prompt from 
the application program.  Under Codeview, all you do is hit the SysReq key
after you finish typing in but before the Enter key is struck.  When
you do this, CV stops executing and pops you back to the source statement
that is doing the terminal I/O, and with a proper stack.

Any solutions will be greatly appreciated.

johnm@trsvax.UUCP (02/16/89)

My office mate (Don Thorp) has this suggestion for those with the TD problem:

If the only window available is a CPU window:
	1) Trace until you see a source line mixed in with the assembly.
	2) Move the cursor to that line and press F4 (the Here function).
	3) Close the CPU window and press F7 or F8.  A small source window
	will now open that you can do normal stepping in.
	4) Use the appropriate function on the Window menu to restore the
	sizes of all the windows.

If you already have a source window open:
	1) Close the CPU window.
	2) Arrow down to the next line that will be executed after the current
	one finishes and press F4 (the Here function).  This will align everything
	again and you can go from there.

I've had to do this very same thing when I'm debugging Zortech C++ code
because it's CV output seems to be perfectly ok as far as CV is concerned,
but put it through TDCONVRT and feed it to TD and it's a mess.

John Munsch

cal@data.UUCP (Cal Rasmussen) (02/21/89)

Try hitting Alt-F10 to bring up the local menu.  Then select (o)rigin.
This should position you at the location indicated by CS:IP.