Skip to content

Commit 9d5b9b7

Browse files
no1wudixiaoxiang781216
authored andcommitted
Documentation: Add usage guide for the debugpoint command
See apache/nuttx-apps#2549 Signed-off-by: Huang Qi <[email protected]>
1 parent 3f00c4a commit 9d5b9b7

File tree

1 file changed

+57
-0
lines changed
  • Documentation/applications/system/debugpoint

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
=====================================
2+
``debugpoint`` Debug Utility
3+
=====================================
4+
5+
``CONFIG_SYSTEM_DEBUGPOINT=y``
6+
7+
The ``debugpoint`` utility is a tool for testing and managing debug points (breakpoints and watchpoints) in the system. It allows users to set, remove, and test various types of debug points.
8+
9+
Usage::
10+
11+
debugpoint [options]
12+
13+
Options::
14+
15+
-r addr Set a read watchpoint at address
16+
-w addr Set a write watchpoint at address
17+
-b addr Set a breakpoint at address
18+
-x addr Set a read/write watchpoint at address
19+
-c Cancel the watchpoint or breakpoint (must be used with -r, -w, -b, or -x)
20+
-l len Set the watch length (must be used with -r, -w, -b, or -x)
21+
22+
Examples::
23+
24+
# Set a read watchpoint at address 0x1000
25+
debugpoint -r 0x1000
26+
27+
# Set a write watchpoint at address 0x2000
28+
debugpoint -w 0x2000
29+
30+
# Set a breakpoint at address 0x3000
31+
debugpoint -b 0x3000
32+
33+
# Set a read/write watchpoint at address 0x4000
34+
debugpoint -x 0x4000
35+
36+
# Cancel the read watchpoint at address 0x1000
37+
debugpoint -r 0x1000 -c
38+
39+
# Cancel the write watchpoint at address 0x2000
40+
debugpoint -w 0x2000 -c
41+
42+
# Cancel the breakpoint at address 0x3000
43+
debugpoint -b 0x3000 -c
44+
45+
# Cancel the read/write watchpoint at address 0x4000
46+
debugpoint -x 0x4000 -c
47+
48+
# Set the watch length to 8 bytes for a read watchpoint at address 0x1000
49+
debugpoint -r 0x1000 -l 8
50+
51+
# Set the watch length to 8 bytes for a write watchpoint at address 0x2000
52+
debugpoint -w 0x2000 -l 8
53+
54+
# Set the watch length to 8 bytes for a breakpoint at address 0x3000
55+
debugpoint -b 0x3000 -l 8
56+
57+
The ``debug`` utility also includes automated tests for breakpoints and watchpoints. When run without any options, it will execute these tests to verify the functionality of the debug points.

0 commit comments

Comments
 (0)