Page 1 of 1
Ms dos debuger in what situations...
Posted: 06 Dec 2012 19:45
by RogerSmith
hi all , i have here a thing with the debuger... I came out with this comand echo d 0 1000 | debug c:\testefile.exe>c:\redirectedoutput.txt
The thing is some times, most of the times it give me a slight diferent output to the same file... any one have a clue why it change some hex values from debug to debug session. ?
i even get every time diferent debug results when i open one comand line window and do "debug command" and open a second window and "debug comand"
Im no debug expert...i try to find in google the answer but no luck for me.
any sugestion to make a debug of a file to 2 diferents logs the same values?
Regards
Re: Ms dos debuger in what situations...
Posted: 06 Dec 2012 20:06
by Aacini
This depends on the size of the file being debugged and the size of the memory block you display. If you display any memory after the loaded file, it contains random information that, of course, is different from session to session.
For example, this is a partial debug of my ColorShow.exe program:
Code: Select all
>debug color.exe
-d
1794:0000 0E 1F BA 0E 00 B4 09 CD-21 B8 01 4C CD 21 54 68 ........!..L.!Th
1794:0010 69 73 20 70 72 6F 67 72-61 6D 20 63 61 6E 6E 6F is program canno
1794:0020 74 20 62 65 20 72 75 6E-20 69 6E 20 44 4F 53 20 t be run in DOS
1794:0030 6D 6F 64 65 2E 0D 0D 0A-24 00 00 00 00 00 00 00 mode....$.......
1794:0040 55 49 FA 72 11 28 94 21-11 28 94 21 11 28 94 21 UI.r.(.!.(.!.(.!
1794:0050 9F 37 87 21 1A 28 94 21-ED 08 86 21 13 28 94 21 .7.!.(.!...!.(.!
1794:0060 52 69 63 68 11 28 94 21-00 00 00 00 00 00 00 00 Rich.(.!........
1794:0070 00 00 00 00 00 00 00 00-50 45 00 00 4C 01 03 00 ........PE..L...
-d
1794:0080 05 60 FF 4F 00 00 00 00-00 00 00 00 E0 00 0F 01 .`.O............
1794:0090 0B 01 05 0C 00 06 00 00-00 04 00 00 00 00 00 00 ................
1794:00A0 00 10 00 00 00 10 00 00-00 20 00 00 00 00 40 00 ......... ....@.
1794:00B0 00 10 00 00 00 02 00 00-04 00 00 00 00 00 00 00 ................
1794:00C0 04 00 00 00 00 00 00 00-00 40 00 00 00 04 00 00 .........@......
1794:00D0 00 00 00 00 03 00 00 00-00 00 10 00 00 10 00 00 ................
1794:00E0 00 00 10 00 00 10 00 00-00 00 00 00 10 00 00 00 ................
1794:00F0 00 00 00 00 00 00 00 00-24 20 00 00 28 00 00 00 ........$ ..(...
-r
AX=0000 BX=0000 CX=0C00 DX=0000 SP=00B8 BP=0000 SI=0000 DI=0000
DS=1784 ES=1784 SS=1794 CS=1794 IP=0000 NV UP EI PL NZ NA PO NC
1794:0000 0E PUSH CS
-q
In this case, any memory after 0C00 (as CX register indicate) will be different each time DEBUG COLOR.EXE command is executed.
Another possibility is the presence of an uninitialized data segment (like the stack!) that, as its name imply, is a block of memory that the loader reserve, but not initialize. Again, in this case the content of such block is different each time.
Antonio
PS - I hope you are NOT talking about the address of the Segment registers (like CS=1794 in this case) that, of course, WILL be different in each session depending on the memory usage at that moment...
Re: Ms dos debuger in what situations...
Posted: 08 Dec 2012 12:52
by RogerSmith
hi thanks for your reply and sorry my delay
i have handle the situation giving up of my propose, but for instances it seem that debuger create a temp file in the temp folder if the the buger is fastly shutdown like taskkill and not q or close botton that temp file will remain in the temp folder and the next debug to the same file will show slight bit diferent results wen redirecting output to a txt file, i got some good results deleting the temp file but...i just give up of my propose.
regards