target/target: Add 'debug_reason' to current target 21/8021/2
authorMarc Schink <dev@zapb.de>
Sat, 18 Nov 2023 11:48:33 +0000 (12:48 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 4 May 2024 08:31:14 +0000 (08:31 +0000)
Change-Id: Ie35b13b3e06411b4866ffeada47b3262493dbf2e
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8021
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
doc/openocd.texi
src/target/target.c

index 52a51c196f9be54677e8e6e5af8ec7bdcd8708f8..55e6e76808b96da23b3c39cbc8de2f906bd8e859 100644 (file)
@@ -9191,6 +9191,18 @@ read_memory 0x20000000 32 2
 @end example
 @end deffn
 
+@deffn {Command} {debug_reason}
+Displays the current debug reason:
+@code{debug-request},
+@code{breakpoint},
+@code{watchpoint},
+@code{watchpoint-and-breakpoint},
+@code{single-step},
+@code{target-not-halted},
+@code{program-exit},
+@code{exception-catch} or @code{undefined}.
+@end deffn
+
 @deffn {Command} {halt} [ms]
 @deffnx {Command} {wait_halt} [ms]
 The @command{halt} command first sends a halt request to the target,
index 45698a66c59879a6221ddb4b2b3ee32d2583922c..5168305dee36ed9fe06d4743b2ff170090bd3b44 100644 (file)
@@ -6736,6 +6736,13 @@ static const struct command_registration target_exec_command_handlers[] = {
                .help = "Write Tcl list of 8/16/32/64 bit numbers to target memory",
                .usage = "address width data ['phys']",
        },
+       {
+               .name = "debug_reason",
+               .mode = COMMAND_EXEC,
+               .handler = handle_target_debug_reason,
+               .help = "displays the debug reason of this target",
+               .usage = "",
+       },
        {
                .name = "reset_nag",
                .handler = handle_target_reset_nag,

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)