📄 td_rdme.txt
字号:
[VideoOptions]
ForceRepaint=Yes
This can be done through the Turbo Debugger Video Configuration
utility (TDWINI.EXE).
16. Debugging window messages
-----------------------------
1) If you set up View|Windows Messages to display messages for
more than one procedure or handle or both, do not log all
messages. Instead, log specific messages for each procedure or
handle. If you log all messages, the system might hang, in
which case you will have to reboot to continue. This behavior
is due to the large number of messages being transferred
between Windows and Turbo Debugger.
2) When setting a break on the Mouse class of messages, note that
a "mouse down" message must be followed by a "mouse up" message
before the keyboard will become active again. When you return
to the application, you might have to press the mouse button
several times (or press the <ALT> key) to get Windows to receive a
"mouse up" message. You'll know Windows has received the message
when you see it in the bottom pane of the Windows Message window
after the program breaks.
17. Debugging Delphi applications
---------------------------------
Stepping into Delphi's dynamic methods
- - - - - - - - - - - - - - - - - - - -
By default, single-stepping through a program skips over dynamic methods; Turbo
Debugger does not step into them. This is because TDW normally determines all the
single-step points when the program is first loaded, at which time dynamic methods
are not yet defined.
However, by following these steps, you can change the way TDW determines stop
points, which makes it possible to step into dynamic methods:
1) Choose View|Execution History.
2) Invoke the Execution History SpeedMenu, either by clicking the right mouse
button or by pressing Alt+F10.
3) Toggle the "Full history" option from No to Yes.
You should now be able to step into dynamic methods created by Delphi.
WREMOTE and Delphi exception handling
- - - - - - - - - - - - - - - - - - - - -
Exception handling in a Delphi application is not visible from WREMOTE. To debug
Delphi exception handling code, you must use Turbo Debugger locally.
18. WREMOTE under Windows NT
----------------------------
There is a new command line switch you can use with TDW and WREMOTE which
facilitates remote network debugging under NT. Use the -raX command-line switch to
tell TDW or WREMOTE which LAN adapter port is to be used by NetBios. The adapter
number must match the following registry key:
HKEY_LOCAL_MACHINE
Software
Microsoft
RPC
NetBios
ncacn_nb_nb0: xxx
For example, if the value of the ncacn_nb_nb key is 0x2, then you must use
command-line switch -ra2. The default value for the -ra switch is 0 (zero).
Remember: Network remote debugging is only supported if you have installed the
NetBios network protocol.
19. Debugging under Win32s
--------------------------
TD32 no longer supports Win32s debugging.
20. Answers to common questions
-------------------------------
Following is a list of the most commonly asked questions about Turbo debugger:
1) Are there any syntactic or parsing differences between Turbo
Debugger's C expression evaluation and Turbo C++ for Windows'?
You can't pass constant-string arguments when evaluating
functions.
OK: myfunc(123) myfunc(string_variable)
BAD: myfunc("constant")
2) What should I be aware of when I am debugging multilanguage
programs with Turbo Debugger?
Turbo Debugger's default source language is "Source," which
means it chooses the expression language based on the current
source module. This can cause some confusion if your program
has source modules written in different languages (like C
and assembler). Since you are actually entering a language
expression any time Turbo Debugger prompts you for a value
or an address, this can cause some unexpected results:
a. Even if you are in a CPU window or a Dump window, you
must still enter addresses in the source language,
despite the fact that the window is displaying in hex.
For example, to display the contents of memory address
1234:5678, you must type one of the following
expressions, depending on your current source language:
C 0x1234:0x5678
Pascal $1234:$5678
Assembler 1234H:5678H
b. When your current language is assembler, you must be
careful when entering hex numbers, since they are
interpreted EXACTLY as they would be in an assembler
source file. This means that if you want to enter a
number that starts with one of the hex digits A - F, you
must first precede the letter with a 0 so Turbo Debugger
knows you are entering a number. Likewise, if your number
ends in B or D (indicating a binary or decimal number), you
must add an H to indicate that you really want a hex number:
OK: 0aaaa 123dh 89abh
BAD: aaaa 123d 89ab
3) Why does the text "Cannot be changed" come up when I do an
assignment in the Data/Evaluate/Modify "New value" pane?
If you use the Data/Evaluate/Modify command (Ctrl-F4) to
change a variable by direct assignment, the "New value" pane
will say "Cannot be changed." This doesn't mean the
assignment didn't take effect. What it does mean is that the
assignment expression as a whole is not a memory-referencing
expression whose value you can change by moving to the
bottom pane. Here are some examples of direct assignment
expressions:
C x = 4
Pascal ratio := 1.234
Assembler wval = 4 shl 2
If you had typed just "x," "ratio," or "wval" into the top
pane, then you would be able to move to the bottom pane and
enter a new value. The direct assignment method using the
"=" or ":=" assignment operator is quicker and more
convenient if you don't care about examining the value of
the variable before modifying it.
4) What could happen when global breakpoints are set on local
variables?
When you set global breakpoints using local variables, make
sure the breakpoints are cleared before you exit the
procedure or function that the variables are defined in. The
best way to do this is to put a breakpoint on the last line
of the procedure or function. If you do not clear the
breakpoints, your program will break unexpectedly and may
even hang on some machines because the breakpoints are being
set in memory that is not currently being used by the
procedure or function.
5) Why is execution slower when tracing (F7) than when stepping
(F8) through my programs?
TDW can do reverse execution, which means that when you are
tracing through your program, Turbo Debugger could be saving all
the information about each source line you trace over. TD only
saves this information in the Module window if you have chosen
View|Execution History and toggled the Full History local menu
command to 'Yes'.
If you want faster execution you can step over (F8) the instruction
or toggle the Full History option to 'No' in the Execution History
window. (Although reverse execution is always available in the
CPU view, you must toggle this option to 'Yes' for it to work
in the Module view. The default setting in the Module view is 'No'.)
6) What are some of the syntactic and parsing differences between
Turbo Debugger's built-in assembler and the standalone Turbo Assembler?
A discussion follows this short example assembler program:
.model small
.data
abc struc
mem1 dd ?
mem2 db ?
mem3 db " "
abc ends
align 16
a abc <1,2,"xyz">
msg1 db "testing 1 2 3", 0
msg2 db "hello world", 0
nmptr dw msg1
fmptr dd msg1,msg2
nfmptr dw fmptr
xx dw seg a
.code
push cs
pop ds
mov bx,offset a
mov bx,nmptr
les si,fmptr
mov ah,4ch
int 21h
end
Because the assembler expression parser does not accept all legal
TASM instruction operands, Turbo Debugger assembler expressions
can be more general than those of TASM and can use multiple levels
of memory-referencing, much like C and Pascal. However, there are
a few constructs that you may be used to that you'll have to
specify differently for the Turbo Debugger assembler expression
parser to accept them:
a. Size overrides should always appear inside the
brackets; PTR is optional after the size. Also, when
referring to a structure, you must use the name of the
structure, not the name of the variable:
OK: [byte ptr bx] [dword si] [abc bx]
BAD: byte ptr[bx] [struc abc bx] [a bx]
b. You must specify a structure name when accessing the
members of a structure with a register pointer.
OK: [abc ptr bx].mem1 [abc bx].mem3 + 1
BAD: [bx].mem1
c. You can't use multiple instances of brackets ([]) unless they
are adjacent, and you can only follow a bracketed expression
with a dot and a structure member name or another bracketed
expression:
OK: 4[bx][si] [abc bx].mem2
BAD: [bx]4[si] [bx]+4
d. If you use a register as part of a memory expression
and you don't specify a size, WORD is assumed:
[bx] is the same as [word bx]
e. You can use any register you want between brackets ([]),
not just the combinations of BX, BP, SI, and DI allowed in
instruction operands. For example,
[ax+bx]
[bx+sp]
f. You can use multiple levels of brackets to follow chains of
pointers. For example,
[byte [[nfmptr]+4]]
g. Be careful with using registers to access memory locations.
You might get unexpected results if your segment
registers are not set up properly. If you don't
explicitly specify a segment register, Turbo Debugger
uses the DS register to reference memory.
h. When you do specify a segment register, make sure you
follow the same rule for size overrides: put it
INSIDE the brackets, as follows:
OK: [byte es:di] [es:fmptr]
BAD: es:[byte di]
i. Use the OFFSET operator to get the address of a
variable or structure. Turbo Debugger automatically
supplies the brackets around a variable name if you just type
the variable name alone.
a contents of structure a
[a] contents of structure a
offset a address of structure a
j. You can use the type overrides and the format control
count to examine any area of memory displayed as you wish.
[byte es:bx],10 10 bytes pointed to by es:bx
[dword ds:si],4 4 dwords pointed to by ds:si
This is very useful when specifying watch expressions.
k. Sometimes you use a word memory location or register to
point to a paragraph in memory that contains a data
structure. Access the structure with expressions like
[abc [xx]:0].mem1
[abc es:0].mem3
/********************************* END OF FILE ************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -