blackmagic-debug / blackmagic

In application debugger for ARM Cortex microcontrollers.
GNU General Public License v3.0
3.3k stars 775 forks source link

Fix: `tdi_low_reset` crash #1980

Closed dragonmux closed 3 weeks ago

dragonmux commented 4 weeks ago

Detailed description

In this PR we address a crash that was reported by triggered_tux on Discord and via the issue tracker.

In this crash, if the user has not yet done a JTAG scan on their probe or run any JTAG remote protocol commands since boot prior to issuing mon tdi_low_reset, then the probe (or BMDA if done in BMDA) will crash due to trying to call a NULL pointer in the jtag_proc structure. To rectify this, we guard this call and make the command fail if the JTAG structure has not been initialised yet.

Your checklist for this pull request

Closing issues

Fixes #1979