Here is a detailed guide to using the protected mode bootable debugger. Please note that the screenshots provided here are from an 386 emulator called bochs for convieniance sake.
Argument notation
[x] means that argument is optional
<x> means that argument is required
x can be in decimal like 15 or in hex (entered as 0xf)
l <startLogicalSector> [numSectors]
or
l <startCylinder> <startHead> <startPhysicalSector> [numSectors]
Loads a program from a 1.44 inch floppy (in A:) .The size of code is <numSectors> (or 1 if not specified) sectors. Each sector is 512 bytes in size.The starting sector can be specified logically (<startLogicalSector>) or in terms of physical disk geometry as shown above . Please note that <startCylinder> ranges from 0 to 79, <startHead> from 0 to 1 ,<startPhysicalSector> from 1 to 18.
The program is allocated four segments to start with :
code (cs) : 64k ,readonly
data (ds) : 64k ,rw
stack(ss) : 64k ,rw
extdata (es) : 256k ,rw
(Above four segments are created in the ldt)
New segments can be created using the 'roseg' command detailed later. Example :
to load a program starting from sector 2 , having a size of 600 bytes (hence two sectors long).
>l 2 2 (Screenshot goes here)
i : The program shall break when the eip equals the offset value, hence it would just break before the instr cs:<offset> . r : The program shall break just before the instr where it tries to read the memory location ds:<offset> w : Same as above , but will break when the program tries to write something to the above specified location.
Please note that a maximum of four break points are only currently supported, this is because only four break points are supported in 386.
Guide to some of the nifty features :
Shortcomings