aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2019-02-19 14:48:46 -0800
committerAndrew Waterman <aswaterman@gmail.com>2019-02-19 14:48:46 -0800
commitda8ab7d18d79a921ccf00b4793eac9124d7b4a75 (patch)
tree48ebef1cd2e1166953e5c9c3276894fe2c8a3b52 /README.md
parent1916b185e25f9e99f192633eadeac592d64d35c4 (diff)
downloadspike-da8ab7d18d79a921ccf00b4793eac9124d7b4a75.zip
spike-da8ab7d18d79a921ccf00b4793eac9124d7b4a75.tar.gz
spike-da8ab7d18d79a921ccf00b4793eac9124d7b4a75.tar.bz2
Fix small bug in debug example. (#277)
23 is the wrong line number. Avoid future problems by using a label.
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 9 insertions, 7 deletions
diff --git a/README.md b/README.md
index 8b164e5..cd15898 100644
--- a/README.md
+++ b/README.md
@@ -151,6 +151,7 @@ int main()
i++;
}
+done:
while (!wait)
;
}
@@ -199,8 +200,8 @@ riscv.cpu: target state: halted
In yet another shell, start your gdb debug session:
```
tnewsome@compy-vm:~/SiFive/spike-test$ riscv64-unknown-elf-gdb rot13-64
-GNU gdb (GDB) 7.12.50.20170505-git
-Copyright (C) 2016 Free Software Foundation, Inc.
+GNU gdb (GDB) 8.0.50.20170724-git
+Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
@@ -216,21 +217,22 @@ Type "apropos word" to search for commands related to "word"...
Reading symbols from rot13-64...done.
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
-0x000000001001000a in main () at rot13.c:8
-8 while (wait)
+0x0000000010010004 in main () at rot13.c:8
+8 while (wait)
(gdb) print wait
$1 = 1
(gdb) print wait=0
$2 = 0
(gdb) print text
$3 = "Vafgehpgvba frgf jnag gb or serr!"
-(gdb) b 23
-Breakpoint 1 at 0x10010064: file rot13.c, line 23.
+(gdb) b done
+Breakpoint 1 at 0x10010064: file rot13.c, line 22.
(gdb) c
Continuing.
+Disabling abstract command writes to CSRs.
Breakpoint 1, main () at rot13.c:23
-23 while (!wait)
+23 while (!wait)
(gdb) print wait
$4 = 0
(gdb) print text