target/tcl: Add get_reg function
Change-Id: Id1be9554d1df2c07cec3161a0fd3a586fdf18246 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/5312 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
da73280101
commit
e8e62c5aca
@@ -5018,6 +5018,24 @@ set_reg @{pc 0 sp 0x1000@}
|
||||
@end example
|
||||
@end deffn
|
||||
|
||||
@deffn {Command} {$target_name get_reg} [-force] list
|
||||
Get register values from the target and return them as Tcl dictionary with pairs
|
||||
of register names and values.
|
||||
If option "-force" is set, the register values are read directly from the
|
||||
target, bypassing any caching.
|
||||
|
||||
@itemize
|
||||
@item @var{list} ... List of register names
|
||||
@end itemize
|
||||
|
||||
For example, the following command retrieves the values from the program
|
||||
counter (pc) and stack pointer (sp) register:
|
||||
|
||||
@example
|
||||
get_reg @{pc sp@}
|
||||
@end example
|
||||
@end deffn
|
||||
|
||||
@deffn {Command} {$target_name cget} queryparm
|
||||
Each configuration parameter accepted by
|
||||
@command{$target_name configure}
|
||||
@@ -8521,6 +8539,24 @@ set_reg @{pc 0 sp 0x1000@}
|
||||
@end example
|
||||
@end deffn
|
||||
|
||||
@deffn {Command} {get_reg} [-force] list
|
||||
Get register values from the target and return them as Tcl dictionary with pairs
|
||||
of register names and values.
|
||||
If option "-force" is set, the register values are read directly from the
|
||||
target, bypassing any caching.
|
||||
|
||||
@itemize
|
||||
@item @var{list} ... List of register names
|
||||
@end itemize
|
||||
|
||||
For example, the following command retrieves the values from the program
|
||||
counter (pc) and stack pointer (sp) register:
|
||||
|
||||
@example
|
||||
get_reg @{pc sp@}
|
||||
@end example
|
||||
@end deffn
|
||||
|
||||
@deffn {Command} {halt} [ms]
|
||||
@deffnx {Command} {wait_halt} [ms]
|
||||
The @command{halt} command first sends a halt request to the target,
|
||||
|
||||
Reference in New Issue
Block a user