diff options
author | Jan Matyas <50193733+JanMatCodasip@users.noreply.github.com> | 2022-03-23 17:47:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-23 09:47:57 -0700 |
commit | 0a70e59cb86deed71fd92ceffdd233478e237ebb (patch) | |
tree | 5809630a865944b42d030accf909331e2288bd76 | |
parent | f732956b031cdab47e8784ee01ea9c8d5e185e6e (diff) | |
download | riscv-openocd-0a70e59cb86deed71fd92ceffdd233478e237ebb.zip riscv-openocd-0a70e59cb86deed71fd92ceffdd233478e237ebb.tar.gz riscv-openocd-0a70e59cb86deed71fd92ceffdd233478e237ebb.tar.bz2 |
Fix: Set proper debug_reason in deassert_reset() (#687)
* Fix checkpatch workflow: ignore changes in .github/
Ignore changes in .github/ directory when running checkpatch.
Checkpatch emits false alarms on substrings "CC:" found in *.yml
workflow files, apparently thinking it is a "Cc:" signature in
commit message.
Change-Id: Id977d5a8838797e4676758066af4825651c41a87
* Fix: Set proper debug_reason in deassert_reset()
The issue was visible for example when user's .cfg file ended
with "reset halt" command:
In such case, the hart would remain halted but the debug_reason would not be
updated and may retain an incorrect value, e.g. DBG_REASON_NOTHALTED.
In such cases, gdb_last_signal() would provide an incorrect reply to GDB.
Change-Id: Ie6f050295fb5cbe9db38b189c4bc385662acf5b4
Signed-off-by: Jan Matyas <matyas@codasip.com>
* Fix checkpatch workflow: add 'apt-get update'
Change-Id: Ic5843ec86d16a187d01970a3253caade3d13b7ab
Signed-off-by: Jan Matyas <matyas@codasip.com>
-rw-r--r-- | .github/workflows/checkpatch.yml | 16 | ||||
-rw-r--r-- | src/target/riscv/riscv-013.c | 1 |
2 files changed, 12 insertions, 5 deletions
diff --git a/.github/workflows/checkpatch.yml b/.github/workflows/checkpatch.yml index 0c120c0..c9ec78d 100644 --- a/.github/workflows/checkpatch.yml +++ b/.github/workflows/checkpatch.yml @@ -1,6 +1,6 @@ on: pull_request -name: Check Code Style +name: Check Code Style (checkpatch) jobs: check: @@ -13,9 +13,15 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 50 - - run: sudo apt-get install patchutils + - name: Install required packages (apt-get) + run: | + sudo apt-get update + sudo apt-get install patchutils - name: Run checkpatch run: | - git diff -U20 HEAD~40 | \ - filterdiff -x "a/src/jtag/drivers/libjaylink/*" -x "a/tools/git2cl/*" | \ - ./tools/scripts/checkpatch.pl --no-signoff - + git diff -U20 HEAD~40 \ + | filterdiff \ + -x "a/src/jtag/drivers/libjaylink/*" \ + -x "a/tools/git2cl/*" \ + -x "a/.github/*" \ + | ./tools/scripts/checkpatch.pl --no-signoff - diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 553cc39..b719fa4 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -2436,6 +2436,7 @@ static int deassert_reset(struct target *target) } } target->state = TARGET_HALTED; + target->debug_reason = DBG_REASON_DBGRQ; if (get_field(dmstatus, DM_DMSTATUS_ALLHAVERESET)) { /* Ack reset. */ |