Commit db34f6f
target: arm_dap: Fix crash in 'dap info' command
The 'dap info' command was not checking that the target was
an ARM before dereferencing the `arm` pointer. This would
cause a crash if the current target was (say) a mem_ap.
Add 'target_to_dap' function to safely get the dap
Change-Id: I0c765f915f2ef7b9a7d20c934e144559ca4e5f1c
Signed-off-by: Grant Ramsay <grant.ramsay@hotmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8415
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>1 parent 92b482a commit db34f6f
1 file changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
415 | 425 | | |
416 | 426 | | |
417 | 427 | | |
| |||
432 | 442 | | |
433 | 443 | | |
434 | 444 | | |
435 | | - | |
436 | | - | |
| 445 | + | |
437 | 446 | | |
438 | 447 | | |
439 | 448 | | |
440 | | - | |
| 449 | + | |
441 | 450 | | |
442 | 451 | | |
443 | 452 | | |
| |||
0 commit comments