HPlogo System Debug Reference Manual > Chapter 4 System Debug Command Specifications

BD

MPE documents

Complete PDF
Table of Contents
Index

E0201 Edition 4 ♥
E0300 Edition 3
E0692 Edition 3

Debug only

Breakpoint delete. Deletes a breakpoint entry specified by index number.

Syntax



   BD [number | @ [: pin | @] ]

The BD command is used to delete process-local breakpoints and global (system-wide) breakpoints. Only users with privileged mode (PM) capability are allowed to view and delete global breakpoints. Users without PM capability may only specify PINs that are descendant processes (any generation) of the current PIN.

When an NM breakpoint set in translated code is deleted, all corresponding CM breakpoints are automatically removed. When a CM breakpoint is deleted, the CM reference counter in the corresponding NM breakpoint (if any) is decremented. If the reference count reaches zero, the NM breakpoint is deleted. Refer to appendix C for a discussion of CM object code translation, node points, and breakpoints in translated CM code.

Parameters


number | @

The index number of the breakpoint entry that is to be deleted. The character "@" can be used to delete all breakpoint entries.

If the index number is omitted, Debug displays each breakpoint, one at a time, and asks the user if it should be deleted (Y/N?). The following responses are recognized:

Y[E[S]]

Yes, remove the breakpoint.

YES any_text

Yes, remove the breakpoint.

N[O]

No, do not remove the breakpoint.

NO any_text

No, do not remove the breakpoint.

If any other response is given, the default value NO is assumed.

pin | @

The PIN for the process whose breakpoint entry is to be deleted. Typically this is omitted, and pin defaults to the current process.

The character "@" can be used to specify that a global breakpoint is to be deleted.

Examples



   $nmdebug > bl
   NM    [1] PROG 115.00006a8c PROGRAM+$270
   NM    [2] PROG 115.00006a90 PROGRAM+$274
   NM    [3] PROG 115.00005d24 processstudent
          cmdlist: {wl "Processing #" r26:"d";c}
   NM   T[4] PROG 115.00005b50 processstudent.highscore
   NM    [5] GRP 118.00015c88 average
   NM    [6] GRP 118.00015c8c average+$4
   NM    [7] GRP 118.00015c90 average+$8
   NM    [8] USER f4.0012f2b8 p_heap:P_INIT_HEAP
   NM    [9] USER f4.001f9188 U_INIT_TRAPS
   NM   [10] SYS a.0074aa34 FREAD
   [QUIET]  count: 0/64  cmdlist: {wl "Read another 100 records";c}
   NM   [11] PROG $115.00006984 initstudentrecord+14
   NM   @[1] SYS a.00668684 trap_handler
   [QUIET]  cmdlist: {trace ,ism}

Display all breakpoints. Process-local breakpoints are always displayed first, followed by all global breakpoints.

   $nmdebug > bd 2
   deleted: NM    [2] PROG 115.00006a90 PROGRAM+$274

Delete process-local breakpoint number 2.


   $nmdebug > bd
   NM    [1] PROG 115.00006a8c PROGRAM+$270 (Y/N) ?
   NM    [3] PROG 115.00005d24 processstudent (Y/N) ? y
   NM   T[4] PROG 115.00005b50 processstudent.highscore (Y/N) ?
   NM    [5] GRP 118.00015c88 average (Y/N) ?
   NM    [6] GRP 118.00015c8c average+$4 (Y/N) ? YES
   NM    [7] GRP 118.00015c8c average+$4 (Y/N) ? YES
   NM    [8] USER f4.0012f2b8 p_heap:P_INIT_HEAP (Y/N) ? YES
   NM    [9] USER f4.001f9188 U_INIT_TRAPS (Y/N) ? YES
   NM   [10] SYS a.0074aa34 FREAD (Y/N) ?
   NM   [11] PROG $115.00006984 initstudentrecord+14 (Y/N) y
   NM   @[1] SYS a.00668684 trap_handler (Y/N) ?

Display each breakpoint (local first, then global), then ask the user if the breakpoint should be deleted. In this example, process-local breakpoints numbers 3, 6, 7, 8, and 9 are removed.

   $nmdebug > bl
   NM    [1] PROG 115.00006a8c PROGRAM+$270
   NM   T[4] PROG 115.00005b50 processstudent.highscore
   NM    [5] GRP 118.00015c88 average
   NM   [10] SYS a.0074aa34 FREAD
   [QUIET]  count: 0/64  cmdlist: {wl "Read another 100 records";c}
   NM   @[1] SYS a.00668684 trap_handler
   [QUIET]  cmdlist: {trace ,ism}

List the remaining breakpoints.

   $nmdebug > bd 1:@
   deleted: NM   @[1] SYS a.00668684 trap_handler

Delete global breakpoint number 1.

   $nmdebug > bd @
   deleted: NM    [1] PROG 115.00006a8c PROGRAM+$270
   deleted: NM   T[4] PROG 115.00005b50 processstudent.highscore
   deleted: NM    [5] GRP 118.00015c88 average
   deleted: NM   [10] SYS a.0074aa34 FREAD
   [QUIET]  count: 0/64  cmdlist: {wl "Read another 100 records";c}

Delete all remaining process-local breakpoints.

Translated Code Examples



   %cmdebug > bl
   CM    [1] GRP  %   0.13     ?AVERAGE               SEG'   (CST 112)
          Corresponding NM bp = 1
   CM    [2] PROG %   0.1665   ?PROCESSSTUDENT        SEG'   (CSTX 1)
          Corresponding NM bp = 2
   CM    [3] PROG %   0.1672   PROCESSSTUDENT+%265    SEG'   (CSTX 1)
          Corresponding NM bp = 3
   CM    [4] PROG %   0.1673   PROCESSSTUDENT+%266    SEG'   (CSTX 1)
          Corresponding NM bp = 3

   %cmdebug > nm
   $nmdebug > bl
   NM    [1] TRANS 3d.0016962c SEG':?AVERAGE
          CM Ref count = 1
   NM    [2] TRANS 48.0000a610 SEG':?PROCESSSTUDENT
          CM Ref count = 1
   NM    [3] TRANS 48.0000a66c SEG':PROCESSSTUDENT+%265
          CM Ref count = 2
   NM    [4] TRANS 20.0000b940 FSEG:?FREAD
          count: 0/64  cmdlist: {wl "Read another 100 records";c}
          CM Ref count = 1

Show all of the CM and NM breakpoints. Notice that all of the native mode breakpoints are set in translated code and correspond to the emulated CM code breakpoints.

   $nmdebug > bd 1
   deleted: CM    [1] GRP  $   0.b      ?AVERAGE
   deleted: NM    [1] TRANS 3d.0016962c SEG':?AVERAGE
          CM Ref count = 0

Delete NM breakpoint number 1. The corresponding CM breakpoint is also deleted. If more than one CM breakpoint corresponds to the NM breakpoint, then all of the CM breakpoints are deleted.

   $nmdebug > cm
   %cmdebug > bd 2
   deleted: NM    [2] TRANS 48.0000a610 SEG':?PROCESSSTUDENT
          CM Ref count = 0
   deleted: CM    [2] PROG %   0.1665   ?PROCESSSTUDENT

Delete CM breakpoint number 2. The corresponding NM breakpoint is also deleted.

   %cmdebug > bd 3
   deleted: NM    [3] TRANS 48.0000a66c SEG':PROCESSSTUDENT+%265
          CM Ref count = 1
   deleted: CM    [3] PROG %   0.1672   PROCESSSTUDENT+%265

Delete CM breakpoint number 3. In this example, two CM breakpoints are mapped to one NM breakpoint (indicated by the reference counter). The corresponding NM breakpoint has its CM reference count decremented by one. When the reference count is zero, the NM breakpoint is deleted.

   %cmdebug > bl
   CM    [4] PROG %   0.1673   PROCESSSTUDENT+%266    SEG'    (CSTX 1)
          Corresponding NM bp = 3

   %cmdebug > nm
   $nmdebug > bl
   NM    [3] TRANS 48.0000a66c SEG':PROCESSSTUDENT+%265
          CM Ref count = 1
   NM    [4] TRANS 20.0000b940 FSEG:?FREAD
          count: 0/64  cmdlist: {wl "Read another 100 records";c}
          CM Ref count = 1

List the remaining CM and NM breakpoints.

Limitations, Restrictions


If breakpoints are listed for a process other than the current PIN, Debug has no knowledge of the procedure names associated with the addresses unless the specified process is running the exact same program file.




B (break)


BL