Thread: Modern DEBUG?

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    10

    Modern DEBUG?

    I'm looking for some Debugger which works like MS DOS DEBUG (flags and register states after each instruction, memory dumping, ...), but for 32 bit processors and for Windows 5.
    Have you ever heard something about ... ?

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    SourceForge.net: XDEBUG - File and System Debbuger

    edit: Nevermind- that's not what I thought it was. Being able to read the mbr with java doesn't sound right to me... Try searching around though - that's probably all any of us can do for you. When it got let out that MS-DEBUG wouldn't be in Win7 there was lots of talk about alternatives. Someone on Slashdat mentioned "Open-Debug" but I can't find it - maybe they were kidding.

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    10
    Well, after all thank's sean. I will looking around, but Maybe MS DEBUG is the best .

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    You might even have more luck looking for the individual tools you need - like a hex editor, assembler, etc... I'm sure a decent Assembly debugger should give you the features you mentioned. These are just suggestions, though, in case no one else replied - I don't have much experience with that.

  5. #5
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    639
    The Debugging tools for Windows package comes with ntsd, which is a command line debugger. I think it's also included in XP by default.

    r to display registers
    p to single-step
    u to disassemble
    Ctrl-Break to break
    g to resume
    bp for breakpoint
    ba for memory breakpoint
    k for current thread stack

    The full list is in the left pane
    Last edited by adeyblue; 05-29-2009 at 03:37 PM.

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Why not WinDbg?
    It's not command-line per se, but it does work with you giving it commands (like command line) via its GUI, and it's a very good debugger at that, for those who do not want to use a graphical debugger.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    DEBUG is a 16-bit, real mode/VM86 debugger. None of the suggestions so far are even remotely like it.

    If you seriously want to work with 16-bit code and use an awful interface, why not install an old copy of DOS on a junky old Pentium?
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  8. #8
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I second the WinDbg suggestion.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  9. #9
    Registered User
    Join Date
    May 2009
    Posts
    10
    Ok, thanks a lot for all. I will try WinDbg.

  10. #10
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    I don't think WinDbg can debug a COM file, nor can it call 16-bit real mode interrupts. I don't see how it's a replacement for DEBUG.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  11. #11
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by brewbuck View Post
    I don't think WinDbg can debug a COM file, nor can it call 16-bit real mode interrupts. I don't see how it's a replacement for DEBUG.
    Correct, it doesn't support 16-bit mode.

    But the original post asked for:
    ... but for 32 bit processors and for Windows 5.
    WinDBG certainly DOES debug 32-bit code.

    If, on the other hand, the original poster wanted to debug 16-bit to 32-bit transitions, there is probably a need for hardware assisted debugging, since it's (nearly) impossible for a software solution to single/step or handle breakpoints when transitioning from 16 to 32 or 32 to 16 [or 32 to 64], as the transition changes so many things, including how/where the interrupt vector table is located (which in turn is involved in single-steps and breakpoints).

    In a modern AMD processor, it would probably be possible to write a virtual machine monitor (aka hypervisor) that handles the debugging of a virtual machine 16 to 32 and 32 to 64 bit code. However, Intel (at least about 1.5 years ago) did not support 16-bit VM's... And of course, it's still not possible to debug the VM code in a traditional debugger, so you'd better start with something that works. And you couldn't run this in a virtual machine, of course!

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary not built with debug info - why?
    By ulillillia in forum C Programming
    Replies: 15
    Last Post: 12-11-2008, 01:37 AM
  2. makefiles - debug & release?
    By cpjust in forum C Programming
    Replies: 6
    Last Post: 10-26-2007, 04:00 PM
  3. Debug --> Exceptions in Visual Studio 2005
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 08-10-2007, 02:12 AM
  4. Results in Debug and Release mode are different
    By jaro in forum C Programming
    Replies: 11
    Last Post: 05-27-2006, 11:08 AM
  5. Ask about Debug Assert Failed
    By ooosawaddee3 in forum C++ Programming
    Replies: 0
    Last Post: 04-24-2002, 11:07 PM