home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_GEN
/
FSDB091A.ZIP
/
MANUAL
< prev
next >
Wrap
Text File
|
1994-03-14
|
14KB
|
360 lines
-------------------------------------------------------------------------
Sally Full Screen Debugger version 0,91 beta
-------------------------------------------------------------------------
1. Introduction
This is the user's manual for Sally Full Screen Debugger, a new user
interface to the old djgpp debugger. The interface was inspired by
Borland's Turbo Debugger, the very best debugger that I have ever seen.
Too bad it doesn't work for 32 bit programs.
The debugger and this manual are copyright 1994 by Morten Welinder
(terra@diku.dk) and are distributed under the terms of the GNU General
Public License as specified in the files "fullscr.c" and "copying". You
should have received a copy of the GNU General Public License together with
the debugger.
The debugger comes with no warranty what-so-ever and you use it at your own
risk or not at all. If, however, you should discover `bugs' in the program,
I'd like to hear about it. I can be reached by email as "terra@diku.dk"
and by snail-mail as
Morten Welinder
Borups Alle 249b, 3tv
DK-2400 Koebenhavn NV
DENMARK
Other kinds of feedback is also welcome, be it proposals for extensions,
manual improvements, or donations.
1.1 Hardware
The debugger has been tested under the following conditions only, but I
expect no problems in other environments except as noted below:
* Cpu: 486 (i.e., with fpu)
* Colour Vga screen, text mode.
* Vcpi mode of the extender.
I expect no problems when used with the 387 emulator, but without that or a
fpu you should not call up the npx window. I don't know whether it will
work under Dpmi.
I have no problems with speed, even on large programs like Gnu Emacs, but
some of the redisplay routines are quite greedy. A few caches might help,
but I don't feel like doing it right now. The way it works now, I'm sure
that consistency is enforced.
1.2 Display modes
The debugger works with all text modes having at least 80 columns and 25
rows. The more columns and rows you've got, the more you see. The
debugger automatically adjusts itself to maximize the useful information on
the screen. Graphics mode does not work -- a little work in get_screen()
and put_screen() could fix that, but it might be slow.
The debugger works with both mono and colour displays, but it certainly
looks best with colour.
Unlike the original djgpp debugger, this debugger accesses the video
hardware without ever going through Dos. Therefore it does not depend on
the Ansi.Sys driver for colours. You should not use the topline display
together with this debugger -- it's ugly because go32 does not provide
a way for the debugger to turn it off while the debugger screen is being
displayed.
1.3 Installation
To install the debugger, go through the following steps
1. Backup the files in `djgpp\go32\ed', and the binaries
in `djgpp\bin' (the files `edebug32' and `ed32-dpm').
2. Go to the djgpp\go32\ed directory.
3. Unzip the archive files.
4. Compile the debugger: "make" or "gmake" or whatever your
make utility is called.
5. Copy the new debugger executeables to the binary directory:
"copy edebug32 ..\..\bin" then "copy ed32-dpm ..\..\bin"
You can now use the new debugger in the same way as you used to use the old
one, i.e., if you want to execute "myprog 42 a:\out" under the debugger,
you do
go32 -d edebug32 myprog 42 a:\out
if you use the non-dpmi version, or
go32 -d ed32-dpm myprog 42 a:\out
if you are debugging under dpmi. [Which you would be if you are running
under Windows or OS/2 -- see also the section about known problems below.]
1.4 Known Problems
A mysterious problem has been reported with operation under dpmi (OS/2 to
be precise). The problem does not seem to be in the debugger, but in
go32. Reportedly, it manifests itself by the debugger not working at all.
The problem can be *circumvented* by changing the library source file
"djgpp\libsrc\c\sys\read.s" line #25 to "ja old_way". The library must
be recompiled.
Data read breakpoints will be triggered by the debugger itself causing
termination. This is a bug in go32. Actually the same is true for data
write breakpoints, but this is rarely a problem.
2. Key Bindings
This section describes the meaning of keys, which are classified either as
"global" if the work no matter what the focus is, or "local" if they only
work in some special pane. Some keys have been assigned aliases; these
aliases are not shown in the key descriptions here.
In version 0,90 beta of the debugger, the cursor keys on the key pad did
not work. This should now be fixed.
2.1 Global Keys
The following keys are defined no matter where the current focus is.
Tab Go to next pane (clockwise).
BackTab Go to previous pane.
Alt-C Put the code pane in upper left part of the screen.
Alt-E Evaluate expression.
Alt-I Put the info pane in upper left part of the screen.
Alt-N Put the npx pane in upper left part of the screen.
Alt-S Put the stack pane in upper left part of the screen.
Alt-W Put the whereis pane in upper left part of the screen.
Alt-X Exit. Your program's exit code (atexit functions) is
*not* run so you might get trouble if you have installed
hardware interrupt handlers.
Alt-F5 Show user program screen. Press any key to redisplay the
debugger screen.
F7 Single step program.
F8 Single step program, but step over calls. As a special
exception, F8 means "goto `_main'" if it is used before
any instruction is executed.
F9 Run or continue program.
2.2 Code Pane Keys
The following keys work when focus is in the code pane. The code pane is
selected by default and can be reselected with Alt-C. All instructions are
displayed in Intel syntax, i.e., as `instr dst,src' as opposed to the
syntax that is used by Gnu Assembler (`instr src,dst').
Up One instruction backwards (only 99% perfect).
Down One instruction forwards.
PgUp A screenful (paneful? :-) of instructions backwards.
PgDn A screenful of instructions forwards.
Ctrl-Left Start instruction display one byte earlier. This is
useful in the rare case where backward instruction scroll
gets out of syncronization.
Ctrl-Right Start instruction display one byte later.
Ctrl-G Go to (i.e., display the instruction at) specified
address.
Ctrl-N Set eip to instruction under cursor. Be careful with
this function -- it assumes that the stack is in the
same situation before and after, and that the same set
of variables are in the same registers.
Ctrl-O Go to origin, i.e., current eip.
F2 Set/reset breakpoint. Any number can be set at any time.
F4 Set temporary breakpoint at cursor and run. Usually this
means that the program will stop at the specified
location, but it might also hit another breakpoint.
When a code breakpoint is triggered, it is a "fault" using the Intel
terminology. This means that the instruction is not carried through.
Instructions affected by code breakpoints are shown highlighted.
I have corrected a number of bugs in the disassembly tables; the
disassembly of instructions "jc", "jc", "jnc", "jnc", "setc", "setnc",
"aad", and "aam" are now correct. (No, I have not been drinking -- there
are two "jc" and "jnc" instructions; figure it out yourself.) See the file
"unassmbl.c" for further details.
2.3 Register Pane Keys
The following keys work when focus is in the register pane. The register
pane is always displayed.
Up/Down What you expect.
Other Enter new value for register.
Note that you cannot change the flags register to an arbitrary 32-bit
value; all non-user bits are masked.
2.4 Flag Pane Keys
The following keys work when focus is in the flag pane. The flag pane is
always displayed. Only user flags are present in this pane, partly
because there is not enough room, and partly because a user-level program
cannot reliably detect other flags and therefore should not depend on
their values.
Up/Down What you expect.
Space Toggle flag.
S Set flag.
R Reset flag.
2.5 Breakpoint Pane Keys
The following keys work when focus is in the breakpoint pane. The
breakpoint pane is always displayed.
Up/Down What you expect.
Delete Reset breakpoint.
Return Go to breakpoint.
2.6 Data Pane Keys
The following keys work when focus is in the data pane. The data pane is
always displayed.
When a data breakpoint is triggered, it is a "trap" using the Intel
terminology. This means that the instruction that triggeres the breakpoint
will be completed first, and that eip will be left after that instruction.
Bytes affected by data breakpoints are shown highlighted. There can be
only four data breakpoints active at any one time, but the display will not
reflect this; if you set more than four then they simply will not be
triggered, ever.
Due to a bug/feature in the current version of go32, data breakpoints as
set with F2/Alt-F2 will trigger on debugger access and crash your program.
(A breakpoint is actually first activated when the next instruction is
executed; then it stays activated until another instruction is executed
without that breakpoint set.) Data read breakpoints are thus not very
useful at this moment. Hopefully, the next release of go32 will fix this.
Up/Down What you expect.
Left/Right What you expect.
PgUp/PgDn What you expect.
Ctrl-Left Start data display one byte earlier.
Ctrl-Right Start data display one byte later.
Ctrl-B Display data as bytes.
Ctrl-C Go to the the current instruction.
Ctrl-G Go to specified address.
Ctrl-L Display data as 32 bit words (`longs').
Ctrl-S Go to the stack.
Ctrl-W Display data as 16 bit words.
F2 Set data write breakpoint at focus. The data size used
is the same as currently selected.
Alt-F2 Set data read/write breakpoint at focus. The data size
used is the same as currently selected.
Other Enter new byte values separated by commas. String in
double quotes imply a terminating '\0', strings in
single quotes do not.
For the time being at least, all data displayed in the data pane is
unsigned.
2.7 Npx Pane Keys
The following keys work when focus is in the npx pane. The npx pane is not
displayed by default, but can be called up with Alt-N. The npx pane should
not be called up if no floating point processor or emulator is present.
Up/Down What you expect.
Ctrl-E Empty register.
Ctrl-Z Zero register.
Ctrl-N Negate register.
Other Enter new value for register.
2.8 Stack Pane Keys
The following keys work when focus is in the stack pane. The stack pane
is not displayed by default, but can be called up with Alt-S.
Up/Down What you expect.
Return Go to code and active the code pane.
2.9 Info Pane Keys
No special keys are recognized in the info pane. The info pane is not
displayed by default, but can be called up with Alt-I.
2.10 Whereis Pane Keys
The following keys work when focus is in the whereis pane. The whereis
pane is not displayed by default, but can be called up with Alt-W. When
it is first called up it will be empty.
Up/Down What you expect.
PgUp/PgDn What you expect.
Return Go to the highlighted symbol, either in the code pane
(text based symbols) or in the data pane (data or bss
based symbols).
Other Enter search expression. Wildcards "*" and "?" are
recognized. To list all symbols, you thus enter "*".
If ten or more symbols match, the number of matches is
displayed.
You might fear that entering a wildcard search expression like "*" would
give you more symbols that the debugger can handle. Don't worry! Symbols
are stored in virtual memory, and not even Gnu Emacs 19.22's nearly 3000
symbols cause any kind of trouble.
3. To Do
I ought to do this one day, but did not feel like it right now
* Alt-? to swap in the source in place of the disassembly.
* Handle screen mode switch gracefully.
* Handle graphics modes.
* F4/F8/F9 should step over breakpoint at cursor like F7 does.
* Conditional breakpoints.
* Improve precision of npx display.
* Enhance expression evaluator.
* Debug logs.
* Restart capability.
* On-line help.
* Ctrl-Break catch.
3.1 Scary Codes
These codes ought to be explained. Nobody did.
Local Variables: ***
mode: text ***
fill-column: 75 ***
End: ***