设置断点
gdb_set_breakpointSet a breakpoint at a file:line or function name. Supports conditional expressions and temporary breakpoints to control execution flow.
Instructions
在指定位置设置断点,支持条件断点和临时断点。
参数:
location: 断点位置 (文件:行号 或 函数名)
condition (可选): 条件表达式,如 x>5, i==10
temporary (可选): 临时断点,触发后自动删除
示例:
gdb_set_breakpoint({location: "main.c:10"}) → 在main.c第10行设置断点
gdb_set_breakpoint({location: "factorial", condition: "n==0"}) → 条件断点
gdb_set_breakpoint({location: "main", temporary: true}) → 临时断点
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| location | Yes | Breakpoint location: file:line (e.g., main.c:10) or function name | |
| condition | No | Conditional expression, e.g., x>5, i==10 | |
| temporary | No | Temporary breakpoint (auto-delete after hit) |