On Thursday 09 October 2003 11:42, Richard Hart wrote:
> To all:

<snip>

> Most of the usual debugger functions ("Find", "Set Breakpoint", etc.)
> didn't present too much of a problem.  But, the "Single Step" exececution
> function is a big hurdle.  It  s h o u l d  of course, cause the program to
> run exactly one MI instruction and then stop at the next instruction.  If a
> branch instruction is encountered, such as "CmpBla(b)  FieldA, FieldB / Eq
> (Equal-Branch-Point);", the program should stop at Equal-Branch-Point if
> the branch is in fact taken.  This is what I cannot figure out how to do!
>
> My stab at "emulating" this function was to set a breakpoint at the NEXT
> sequential MI instruction from the instruction at which the program is
> currently stopped, then let the program continue to run (and stop at the
> next instruction).  This of course works fine when the instruction stream
> is in fact executed perfectly in sequence, but of course that is often not
> the case, program branching being the "MI way" to support an IF/ELSE
> construct.
>
> SO:  I hope I have explained the little problem clearly.  Does anyone know
> how IBM does this, for example in the (OPM) "Start Source Debugger"
> (STRISDB) product.  It obviously is possible.  I thought about setting
> breakpoints for ALL instructions in the program.  That would be overkill
> worthy of a politician (not saying which flavor)!
>
> Thanks,
>
> Rich Hart

I think IBM does it using event monitors.  Events are similar to exceptions, 
and there are MI instructions to manipulate them, like "Monitor Event," Wait On 
Event," "Retrieve Event Data," etc.  

There's an event called "Instruction reference" that's signalled for every MI 
instruction executed, so a debugger could monitor for that.

Unfortunately, the event MI instructions are "blocked," meaning you can't 
(normally) compile them in an MI pgm, and they aren't documented in the MI 
manual (but they were in the S/38 Functional Reference Manual).  So events 
probably won't do you much good :-(

--Dave

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.