VOGONS


Bug in debugger

Topic actions

First post, by jal

User metadata
Rank Oldbie
Rank
Oldbie

I'm currently using the DOSBox debugger (v0.72) under Linux (Ubuntu), and besides some small annoyances (like, F10 and F11 being keys the terminal window uses, which I have to manually disable every time etc.), I found the MEMDUMP function to be not working. MEMDUMPBIN works fine, btw. When I use MEMDUMP, it seems the debugger is not paying attention to the 'len' parameter, instead creating a huuuuuuge file (I killed the process at 150Mb, it was still writing although all kinds of errors appeared on the screen).

I looked at the code, and the bug is that num is declared unsigned, but every iteration 16 is subtracted. So if num is not a multiple of 16, num becomes below zero, but since it is unsigned... I doubt anyone ever used this function, or somebody should've noticed????

Some other annoyance: the file is created uppercase (I don't like that on Linux), and the count is also in hex (why is the number of bytes in hex?).

I could create a patch if I knew how to, but I don't sorry.

JAL

Reply 1 of 4, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Usually only full segments are dumped 😀

Thanks for reporting this.

Reply 2 of 4, by jal

User metadata
Rank Oldbie
Rank
Oldbie
wd wrote:

Usually only full segments are dumped 😀
Thanks for reporting this.

You're welcome 😀. I was debugging an old DOS game (I'm trying to create a remake) and had to dump some specific structures to disk, so I used the exact size (which happened to not be a multiple of 16).

JAL

Reply 3 of 4, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Text dump should be fixed now, maybe you can check if it does what you want.

Reply 4 of 4, by jal

User metadata
Rank Oldbie
Rank
Oldbie
wd wrote:

Text dump should be fixed now, maybe you can check if it does what you want.

From what I can see, it works now as it should, I'll test it tonight. Thanks.

EDIT: Ok, it works, as I expected. Got right size and all 😀.

JAL