我要评分
获取效率
正确性
完整性
易理解

breakpoint

Command Function

Sets, deletes, and displays breakpoints.

Syntax

Setting a breakpoint:

breakpoint set [-h | --help] {-f FILE_NAME | --file FILE_NAME} {-l LINE_NUMBER | --line LINE_NUMBER} [-r RANK_ID | --rank RANK_ID] [-g GROUP_ID | --group GROUP_ID] [-t THREAD_INDEX | --thread THREAD_INDEX] [-c | --condition] [-i | --ignore-count]

Deleting a breakpoint:

breakpoint delete [-h | --help] [-n BREAKPOINT_ID | --number BREAKPOINT_ID] [-a | --all] [-r RANK_ID | --rank RANK_ID] [-g GROUP_ID | --group GROUP_ID] [-t THREAD_INDEX | --thread THREAD_INDEX]

Displaying breakpoints:

breakpoint list [-h | --help] [-r RANK_ID | --rank RANK_ID] [-g GROUP_ID | --group GROUP_ID] [-t THREAD_INDEX | --thread THREAD_INDEX]

The breakpoint command can be abbreviated as b or break.

Parameter Description

Table 1 Parameters of the set command

Parameter

Option

Description

-h/--help

-

Obtains help information. This parameter is optional.

-f/--file

FILE_NAME

Path to the source file to be debugged. This parameter is mandatory.

-l/--line

LINE_NUMBER

Line in the file, where the breakpoint is located. This parameter is mandatory.

-r/--rank

RANK_ID

Rank ID. This parameter is optional.

-g/--group

GROUP_ID

Group ID. This parameter is optional.

-t/--thread

THREAD_INDEX

Thread index. This parameter is optional.

-c/--condition

CONDITION

Conditional breakpoint expression. This parameter is optional.

Example: x>10

-i/--ignore-count

IGNORE_COUNT

Number of conditional breakpoint hits that are ignored. This parameter is optional.

Example: 2

Table 2 Parameters of the delete command

Parameter

Option

Description

-h/--help

-

Obtains help information. This parameter is optional.

-n/--number

BREAKPOINT_ID

ID of the breakpoint to be deleted. This parameter cannot be used together with the -a parameter. This parameter is optional.

-a/--all

-

Deletes all breakpoints. This parameter cannot be used together with the -n parameter. This parameter is optional.

NOTE:

You must specify either -n or -a, but not both or neither.

-r/--rank

RANK_ID

Rank ID. This parameter is optional.

-g/--group

GROUP_ID

Group ID. This parameter is optional.

-t/--thread

THREAD_INDEX

Thread index. This parameter is optional.

Table 3 Parameters of the list command

Parameter

Option

Description

-h/--help

-

Obtains help information. This parameter is optional.

-r/--rank

RANK_ID

Rank ID. This parameter is optional.

-g/--group

GROUP_ID

Group ID. This parameter is optional.

-t/--thread

THREAD_INDEX

Thread index. This parameter is optional.

Example

Display the information about breakpoint functions:

1
breakpoint -h

Command output:

The most commonly used breakpoint(b/break) sub commands are:
   set                 Adds breakpoints.
   list                Views breakpoints.
   delete              Deletes breakpoints.

 See 'breakpoint(b/break) COMMAND -h/--help' for more information on a specific command.