Where is "Debug a Macro" for CMAC support?

Home Forums Multi-Edit Support Where is "Debug a Macro" for CMAC support?

This topic contains 8 replies, has 3 voices, and was last updated by  Clay Martin 4 days, 5 hours ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #22684

    HerbJones
    Participant

    I see “Debug settings” in the dragdown menu in Me2008, but I do not see “Debug a macro” for CMAC support.

    Can you someone tell me how do I debug a macro?

    Thanks in advance.

    #22686

    Clay Martin
    Keymaster

    Hi,
    Simple debugging can be done with Make_Message to allow you to see a value during execution.

    Some other debug stuff was setup by the old developers. It was not well documented. I am not that familiar with it. You may get some incite by looking at the file in the Src directory under the install directory called TDbg.sh.

    Thanks,
    Clay

    #23696

    HerbJones
    Participant

    I may not have asked this question properly. In ME for DOS, to debug a CMAC macro, you could single step through your macro. To do so, you had to compile by selecting “Debug CMAC Compile (-M Switch)”. This created a .map file instead of a .mac file under the C:\ME\MAC folder.

    In ME, you could then select “Debug a Macro” in the menu, and you could then single step through your macro, one line at a time.

    With ME2008, under the compile menu, I see the option to do a “CMacWin -M Debug Compile” – which compiles fine, and tells me that the feature exists. However, there isn’t an option to actually run the macro in debug mode. When I drag down the “Macro” section, the only options are Run, Load, and Debug Settings (the “Debug a Macro” selection is missing).

    How do I single step through my Macro once I have “Debug Compiled” it ?

    Thanks for your help

    #25171

    Reid Sweatman
    Participant

    I’m many years out of the loop, but back when, I wrote a rather complete article for the Newsletter detailing exactly how the debug features in TTDBG (the additions written by Michel Vodika) worked. That article doesn’t appear to be on this version of the Forum, and I may not have a local copy anymore, but maybe Clay knows where to get it. If so, it may have Deley listed as author; that apparently happened when he took over editing things for MESI, as most things I’d done were changed to make him the official author at that time. You’ll know you’ve got the right article if the embedded screen shots use a pale cyan background and the code shown uses a peculiar box comment style that I favor.
    As for single-step debugging, I don’t believe a Windows debugger was ever written, so, unfortunately, you can’t do that.

    #25172

    Clay Martin
    Keymaster

    Hi,
    We lost a lot of content when the old web site, wiki, etc was replaced.

    There was some debugging stuff setup by the old developers, its not well documented but you can look over the CMac code in dbg.s.

    Other than that it looks like leaving a trail of breadcrumbs ( Make_Message) is the best option.

    If part of the problem might be indicated by the values of the global variables this old piece of code of mine might help:
    //****************************************************************//
    //*** Utility Macro GlobVar debug ***//
    //****************************************************************//
    int GlobVar ( ) trans
    {
    /***list the global vars and their values to a empty file(that you opened)***/
    int retval;
    str gname =first_global(retval);
    do {
    if ( retval == 1) {
    text(gname + ” = ” +str(global_int(gname)) ) ;
    eol;
    cr;
    }
    else {
    text(gname + ” = ” +global_str(gname)) ;
    cr;
    }
    gname = next_global(retval);
    } while (gname != ” );

    }

    #25182

    Reid Sweatman
    Participant

    I’ve located a capture I did of the article I mentioned. I can upload it or e-mail it to whoever wants it. I’m still digging for my original source, but this will do as well for info. Believe me, it’s a lot easier to read than the source file comments. Let me know.

    #25183

    Reid Sweatman
    Participant

    Okay, I’ve also found my original files, but they’re not small. Word Doc about 1.6 MB. Except that the pictures are much cleaner, it’s the same info as the web capture I mentioned above.

    #25184

    Clay Martin
    Keymaster

    Hi Reid,
    Hate to say it, but this “forum” has no way to attach content. The best I can do is convert to PDF and post on one of my servers, then place a link here. I do appreciate the effort you have made to find the old files.
    Clay

    #25205

    Clay Martin
    Keymaster

    Hi All,
    Below it a link to Reid Sweatman’s excellent article on using the builtin CMac debug facility. I will also place a link in its own post.
    http://martinworks.com/CMACdebug.pdf

    Thanks,
    Clay

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.