DOSBox debugger

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Re: DOSBox debugger

Postby k9wazere » 2009-6-16 @ 20:53

Thanks mate, that fixed both issues =)
k9wazere
Newbie
 
Posts: 2
Joined: 2009-6-16 @ 09:55

Re: DOSBox debugger

Postby doshea » 2009-6-19 @ 11:55

Hi Qbix,

Qbix wrote:hehe. I'll compile one day. :) creating that installer is most of the work though :)


What software are you using to generate the installer? It should be possible to make the installer generation a simple 'make' target, .bat file or something like that, assuming a suitable installer generator is used. I have used NSIS for this kind of thing before.

Regards,
David
Hacking F-15 Strike Eagle III and DOSBox's debugger
User avatar
doshea
Newbie
 
Posts: 10
Joined: 2009-5-22 @ 09:37
Location: Australia

Re: DOSBox debugger

Postby Calvero » 2009-6-27 @ 16:43


I can't use the BPM command in this version. Is it removed in DOSBox 0.73 or isn't this the heavydebug version?
Anyway, I want to use memory breakpoints that activate when the value of a memory location is changed, without having to compile DOSBox myself :).
Calvero
Member
 
Posts: 106
Joined: 2007-8-02 @ 13:30

Re: DOSBox debugger

Postby wd » 2009-6-27 @ 18:43

What do you type and what is reported in the debug window?
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: DOSBox debugger

Postby Calvero » 2009-6-28 @ 14:41

First, I type "?" to get a list of available commands. "BPM" is not in that list.
Then I type "bpm 1234:5678" and press Enter. All that happens is that "bpm 1234:5678" is changed into "BPM 1234:5678".
Calvero
Member
 
Posts: 106
Joined: 2007-8-02 @ 13:30

Re: DOSBox debugger

Postby Qbix » 2009-6-28 @ 18:03

hmm then I must have made a typo while configuring the debugger enabled build.

it should be fixed now. Redownload it please
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10375
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: DOSBox debugger

Postby Jag » 2009-11-05 @ 01:29

Hi, I am trying to use the dosbox debugger to have a bit poke around in an old game. I'm using the latest version posted in this thread. Two problems are occuring.

1) Memory breakpoints (linear - BPLM) seemed to not be working and after a while I realised that the breakpoints were being set 0x14 bytes before the address specified (and before the address shown in the data view and in output of MEMBUMPBIN). So to get them to work I need to type eg. BPLM CAFEBABE+14.

2) As you scroll up and down the code, the disassembly keeps changing. It's like the disassembler keeps changing it's mind about the alignment of instructions - if thats the right word. It makes no sense at all with core set to auto (presumably using the dynamic cpu) so I changed to normal as mentioned earlier in this thread. That made it much better and it seems to work properly if you just step through after hitting a bp. But I want to scroll up and look at the few instructions before the bp, and it gets messed up. :angry:

The target is running in 32-bit protected mode (DOS/4GW). Don't know if that's relevant to the BPLM problem. Haven't tried it in any other modes.
Running debug version of dosbox-0.73 on WinXP SP2.

Cheers :happy:
User avatar
Jag
Newbie
 
Posts: 1
Joined: 2009-11-04 @ 23:28
Location: Northumberland, England

BPM is only for writting acess?

Postby vander » 2010-2-06 @ 22:23

Hi, I download and tried the last debug version 0.73
While working with the debugger I got the impression only data changes are noted by the memory breakpoint. So it will not even note a writing of the same data as the one thats already stored on this memory location, right?
vander
Newbie
 
Posts: 4
Joined: 2010-2-05 @ 21:01

Re: DOSBox debugger

Postby Qbix » 2010-2-06 @ 22:32

correct
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10375
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: DOSBox debugger

Postby vander » 2010-2-06 @ 22:46

Hmm, any hint how to figure out which part of the code is reading from a specified adress? I wana try to run another debugger inside DosBox, maybe it works if here is not some kind of limitation that force touse real cpu hardware.
vander
Newbie
 
Posts: 4
Joined: 2010-2-05 @ 21:01

Re: DOSBox debugger

Postby wd » 2010-2-06 @ 23:02

What debugger?
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: DOSBox debugger

Postby vander » 2010-2-06 @ 23:18

I will just try some of the old ones, TD or ... I think I still have my old Symantec compiler cd somewhere arround. It had a dosdebugger too AFAIR.
My need is somth that detect memory reads, as I described before
vander
Newbie
 
Posts: 4
Joined: 2010-2-05 @ 21:01

Re: DOSBox debugger

Postby wd » 2010-2-07 @ 00:04

TR may work if it runs under dosbox, since it has some emulation capabilities.
Other stuff may not catch memory reads since that relies on debug registers
which are not emulated by dosbox.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: DOSBox debugger

Postby ninjalj » 2010-2-08 @ 00:56

If you want to set breakpoints on memory read, you could try updating the last patch at http://www.vogons.org/viewtopic.php?t=14468 to latest dosbox.
User avatar
ninjalj
Newbie
 
Posts: 21
Joined: 2004-12-16 @ 18:54

Re: DOSBox debugger

Postby vander » 2010-2-08 @ 17:53

The diff file has to be included in the source code and than compiled with the debugger feature I guess?
Seems to be a bit to complicated for me :dead:
vander
Newbie
 
Posts: 4
Joined: 2010-2-05 @ 21:01

Re: DOSBox debugger

Postby aqrit » 2010-2-12 @ 07:31

If you want to set breakpoints on memory read, you could try...

OllyDbg attached to the DOSBox process

described here:
http://gamehacking.com/forums/specific- ... e-use.html
aqrit
Member
 
Posts: 190
Joined: 2009-6-22 @ 19:53

Re: DOSBox debugger

Postby Qbix » 2010-2-12 @ 08:03

the only thing I see there is some bitching about command dosbox debugger could have.
very little code and not mention about ollydbg at all
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10375
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: DOSBox debugger

Postby aqrit » 2010-2-12 @ 18:27

Example: Hardware breakpoint with OllyDbg v1.10


Determine the Host(win32) address for the memory value of intrest
and add the bHardware_Breakpoint stuff to the DEBUG_HeavyIsBreakpoint() function

Open DOSBox.exe in Olly.
Symbols (dosbox.pdb) should load automatically, if in the same directory.

Set a "hardware breakpoint on read/write" at "host" address With Olly.
When the hardware breakpoint triggers, set bHardware_Breakpoint to 01 with OllyDbg, using the "Memory" Window.
(If the dosbox.pdb file is loaded Olly will know the address of the label bHardware_Breakpoint )

Disable the hardware breakpoint and resume execution of dosbox

The dosbox debugger should now be one instruction beyond the code that accessed the memory location.


Glad you liked it Qbix :kiss:
I wrote it specifically to anwser the break on memory read question
IMO it contains info that people need to know to use a hardware breakpoint
aqrit
Member
 
Posts: 190
Joined: 2009-6-22 @ 19:53

Re: DOSBox debugger

Postby southdy » 2010-8-05 @ 08:04

Where can I get a binary DOSBox 0.74 heavy debug version?
Many thanks!
southdy
Newbie
 
Posts: 1
Joined: 2010-8-05 @ 07:55

Re: DOSBox debugger

Postby Jamesapp » 2010-12-14 @ 01:06

Hello,
I wondered if I could get some advice on dosbox debugger?

Can I install a debugger if I already have dosbox installed? Or do I have to reinstall dosbox somehow with debugger support?

I used a version of ms-dos where at the command prompt I could write debug and enter a environment on my computer with a -prompt.
Jamesapp
Newbie
 
Posts: 21
Joined: 2010-12-12 @ 22:35

PreviousNext

Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 1 guest