HP 3000 Manuals

B DEBUG command [ MPE Debug/Stack Dump Reference Manual ] MPE/iX 5.0 Documentation


MPE Debug/Stack Dump Reference Manual

B 
DEBUG command 

Establishes one or more breakpoints within a program.

SYNTAX 

        [G]
     B [[P]  segment] offset [:[@] [ count]],...
                                   [ cond ]

     or

     B@


NOTE B@ causes all breakpoints belonging to the current process to be displayed.
Privileged Mode To set a breakpoint to debug system segmented library, use prefix S as follows: B[S segment.] offset [:[@][ count]] [ cond ] To set a breakpoint in absolute code segment (CST), use prefix A as follows: B[A segment.] offset [:[@][ count]] [ cond ] To set breakpoints in processes other than your own, use the pin number of a desired process as follows: B[ pin.[ segtype] segment.] offset [ :[@][ count]][,...] [ cond ] where segtype is one of the prefixes G, P, S or A. B[pin.]@ causes all breakpoints belonging to the specified process to be displayed.
CAUTION Do not set breakpoints on any branch instruction. Doing so may corrupt your code.
PARAMETERS G or P To establish breakpoints in the group or account segmented library, use the prefix G for group or P for account before the segment parameter. If omitted, breakpoints are established in the currently executing program. (Optional parameter.) segment The logical code segment to contain the breakpoint. If omitted, the currently executing segment contains the breakpoint. (Optional parameter.) offset The relative offset of the breakpoint from the start of the segment. (Required parame- ter.) A register may be specified if preceded by $. :@ Makes breakpoint permanent until program terminates or breakpoint cleared by explicit C command. If omitted, and if count is omitted, the breakpoint is cleared (deleted) after first execution. (Optional parameter.) B 20:@ Break each time location 20 is executed. :count An expression specifying when the breakpoint is executed. When count is reached, the breakpoint is executed and, if @ is not specified, deleted. (Optional parameter.) If omitted, breakpoint is executed the first time it is reached. B 20:3 Break the third time location 20 is executed. When @ and count are combined, the breakpoint is conditionally permanent, that is, the breakpoint will break, but not delete after count executions. B 20:@ 3 Break every third time location 20 is executed. :cond An expression specifying a condition upon which the breakpoint is executed. This condition takes the form {expression } {expression } {modbase[offset]} relop {modbase[offset]} where: expression is a value; modbase is one of the stack relative modification bases DB, DL, Q, S; offset is the offset relative to the modify base which specifies the memory location desired (if omitted, offset is 0); relop is one of the operators =, >, <, < =, < >. At least one of the operands in the conditon must be of the form modbase[offset] . When the condition is true, the breakpoint is executed and, if @ is not specified, deleted. (Optional parameter.) If cond is omitted, breakpoint is executed the first time it is reached. B 2:DB+3=5 Break if the value of DB+3=5 when you reach location 2 of the current segment, B 2:@DB+3=5 Every time you reach location 2 of the current segment, break if the value of DB+3=5.
CAUTION Do not set breakpoints on any branch or calling instruction. Doing so may corrupt your code.
EXAMPLES ?B 4.55, 20:@, A45.44:20 G1.22:@12, $P+4,15.3:2:DB<4 Breakpoints are set at: Location 55 of program segment 4. Location 20 of current program segment (permanent - break every time). Location 44 of absolute code segment 45 (conditional - break and delete after 20th time). (Requires privileged mode.) Location 22 of group library segment I (permanent and conditional - break every 12th time). Location defined by contents of register P+ 4. Location 2 of program segment 3 in process 15 (conditional - break only if the value of DB is less than 4). (Requires privileged mode.)
NOTE An optional form of the B command - B@, causes all breakpoints belonging to the current process to be displayed.
Privileged Mode B@ displays all system-owned breakpoints in AS mode; all user-owned break- points in AP mode. The display format for each breakpoint is [P] LCST = [G] lsn, P = pc, CST = asn, [@] t/u where: P = Account Public System Library. G = Group System Library. lsn = Logical Code Segment Number. pc = Program Counter. asn = Actual Code Segment Index. (Privileged Mode only.) @ = Permanent breakpoint. (No @ indicates temporary breakpoint.) t = Total number of executions allowed by conditional breakpoint. u = Total number of times breakpoint actually executed.


MPE/iX 5.0 Documentation