aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-07-25Print out which port OpenOCD is listening on.print_portTim Newsome1-0/+6
This is essential when a test environment asks OpenOCD to listen on port 0, so that the environment can easily discover which port is actually being used.
2017-07-16Merge pull request #84 from riscv/resetTim Newsome1-2/+23
Fix infinite loop in reset.
2017-07-16Use a wall clock timeout to complete reset.Tim Newsome1-5/+9
2017-07-14Fix infinite loop in reset.Tim Newsome1-1/+18
2017-07-13Merge pull request #83 from riscv/triggersTim Newsome4-643/+359
Share trigger code between 0.11 and 0.13 code.
2017-07-12Share trigger code between 0.11 and 0.13 code.Tim Newsome4-643/+359
The actual implementation of triggers didn't change between those two versions, so there's no need to duplicate the code. In the process, I also fixed a minor multicore bug where tselect didn't always get written on all harts.
2017-07-12Merge pull request #82 from riscv/commentTim Newsome1-0/+3
Forgot to commit this follow up to PR #79
2017-07-12Forgot to commit this follow up to PR #79Tim Newsome1-0/+3
2017-07-12Merge pull request #79 from riscv/abstract_regsTim Newsome1-99/+287
Use abstract command to access registers if possible
2017-07-12Keep around cmderr for callers to inspect.Tim Newsome1-26/+39
Use this to only change abstract register access behavior when cmderr explicitly says the requested operation is unsupported.
2017-07-12Try abstract register writes as well.Tim Newsome1-55/+133
2017-07-12Try using abstract commands to read registersTim Newsome1-62/+159
This is the only way the spec guarantees that GPRs are accessible, and depending on the implementation this might be the only way that CSRs are accessible. Also changed the debug code that parses out DMI fields to be simpler to maintain (albeit a little slower). riscv013_execute_debug_buffer() now automatically clears cmderr if the command fails. That feels like the right behavior. (It does return the error to its caller.)
2017-07-11Merge pull request #80 from riscv/triggersTim Newsome4-82/+135
Disable debugger-set triggers on connect
2017-07-10Merge pull request #81 from riscv/llp64Palmer Dabbelt1-27/+27
Use LL for 64-bit defines, as Windows is LLP64
2017-07-10Use LL for 64-bit defines, as Windows is LLP64Palmer Dabbelt1-27/+27
This should also fix bugs on ILP32 systems.
2017-07-10Disable debugger-set triggers on connectTim Newsome4-82/+135
When first connecting to a target, have the debugger disable any hardware triggers that are set by a previously connected debugger. The 0.11 code already did this, but 0.13 did not. To achieve this I decided to share the code to enumerate triggers between 0.11 and 0.13, which required me to implement get_register() and set_register() for 0.11, which made the whole change a lot larger than you might have guessed. Hopefully this sets us up to in the future share the code to set/remove triggers as well.
2017-07-06Merge pull request #78 from riscv/build32Tim Newsome2-1/+14
Add 32-bit build
2017-07-06Fix 32-bit build.build32Tim Newsome1-1/+1
Code taken from http://openocd.zylin.com/#/c/4178/
2017-07-06Build 32- and 64-bit binaries with Travis.Tim Newsome1-0/+13
2017-07-06Merge pull request #74 from riscv/build32Tim Newsome3-7/+10
Fix 32-bit build errors.
2017-07-06Merge pull request #77 from riscv/travisTim Newsome1-0/+5
Perform regular build with travis.
2017-07-05Perform regular build with travis.Tim Newsome1-0/+5
2017-07-03Merge pull request #73 from riscv/old_triggersTim Newsome1-44/+130
Add back support for type 1 triggers
2017-07-03Merge pull request #69 from riscv/multi-gdbPalmer Dabbelt3-43/+66
Fix the multi-GDB mode bugs
2017-07-03Merge pull request #72 from dmitryryzhov/examine_restore_temp_regPalmer Dabbelt1-0/+12
Restore value of temporary register (s0) in examine OpenOCD procedure…
2017-07-03Fix 32-bit build errors.Tim Newsome3-7/+10
I only compiled the source. Didn't have the tooling installed to link. Hopefully that's good enough. Fixes #71.
2017-07-03Fix trigger set/clear bug.Tim Newsome1-2/+2
2017-07-03Add back support for type 1 triggers.old_triggersTim Newsome1-42/+120
They were implemented, and people want to keep using them. Also make OpenOCD tolerate cores that have $misa at 0xf10 instead of the current address of 0x301. Actually return an error when we fail to read a CSR. Tweak cache_set32() debug output.
2017-07-01Fix comment about saving the temporary register in examine procedure.Dmitry Ryzhov1-2/+6
2017-06-30Restore value of temporary register (s0) in examine OpenOCD procedure in ↵Dmitry Ryzhov1-0/+8
case of core can not execute 64 bit instruction.
2017-06-27Check for errors in read_csr().Tim Newsome1-2/+10
Also slightly improve debugging output.
2017-06-21Don't set breakpoints on disabled hartsv20170621Palmer Dabbelt1-0/+6
2017-06-21No longer hard-code the non-RTOS hart to 0Palmer Dabbelt1-3/+4
I was just being lazy here.
2017-06-21Allow memory writes to proceed on all hartsPalmer Dabbelt1-6/+0
2017-06-21Refactor examine, to avoid some assertionsPalmer Dabbelt1-9/+16
Now that we're supporting non-RTOS multi-hart mode there's some more assertions that you're running on the right hart. Those assertions aren't sane very early in examine, so I avoid them.
2017-06-21Factor out checking if harts should be usedPalmer Dabbelt3-18/+35
Rather than having a bunch of "if rtos" stuff, I now just check "if hart_enabled". This makes some code paths cleaner, all of which were buggy in the non-RTOS multi-hart mode.
2017-06-20Set current_hartid from coreidPalmer Dabbelt3-7/+5
This avoids a bunch of RTOS special cases.
2017-06-20Merge pull request #68 from riscv/multicorePalmer Dabbelt4-38/+89
Testsuite now passes on multicore target
2017-06-20Set hardware triggers on all harts.multicoreTim Newsome1-33/+69
Right now we're using "threads" to represent harts. gdb/OpenOCD assume there's only one set of hardware breakpoints among all threads. Make it so.
2017-06-20Don't immediately segfault with -rtos on v0.11.Tim Newsome1-0/+3
2017-06-20Comment curious code.Tim Newsome1-0/+4
2017-06-20Update list of "threads" when harts are discovered.Tim Newsome3-5/+13
This ensures that "info threads" is accurate as soon as gdb connects. Also print out number of triggers that is discovered in examine().
2017-06-20Merge pull request #67 from riscv/cosmeticsTim Newsome3-77/+147
Various cosmetic improvements
2017-06-19Put early DEBUG notice of XLEN back.Tim Newsome1-0/+5
2017-06-16Update debug_defines. Clarify debug output.Tim Newsome2-52/+118
Update debug_defines from the spec, commit 920ec9a690. Decode dmstatus scans in the debug output.
2017-06-16Fix comment.Tim Newsome1-1/+1
2017-06-16Tell the user about detected harts.Tim Newsome1-8/+10
2017-06-16Tighten up debug output.Tim Newsome1-17/+14
Assuming the program allocating code works, we don't need its output. Only output parts of the debug RAM that are actually doing something.
2017-06-16Merge pull request #66 from riscv/whitespaceTim Newsome6-335/+333
Fix indentation to match OpenOCD style.
2017-06-15Fix indentation to match OpenOCD style.Tim Newsome6-335/+333
This change is just in the whitespace. There are no code changes. See http://openocd.org/doc-release/doxygen/stylec.html