Tim, I reviewed the following patch and had to make a couple changes to get it to work in my environment (Ampere eMAG8180).
1. src/rtos/hwthread.c -> needed to remove the "assert(thread_list_size)". I'm hitting this assert in my environment. 2. src/server/gdb_server.c -> In the GDB client, when switching from one CPU core to another, the "rtos->current_threadid" variable gets correctly updated to reflect the new target CPU core, but the "rtos->current_thread" variable does not. I'm new to this project and don't understand the distinction between "current_threadid" and "current_thread". The end result is that on line 2799 in file gdb_server.c, when "current_thread" and "thread_id" don't match, "fake_step" gets enabled and I'm unable to step the newly select CPU core. I've added the above comments to the Gerrit review at http://openocd.zylin.com/#/c/5101/ Dan Goehring Ampere Computing On 4/10/2019 3:34 PM, Tim Newsome wrote: > I just submitted my fix for this (along with a raft of other hwthread > tweaks) at http://openocd.zylin.com/#/c/5101/ > > Tim > > On Wed, Apr 10, 2019 at 4:02 AM Matthias Welwarsky > <matthias.welwar...@sysgo.com <mailto:matthias.welwar...@sysgo.com>> wrote: > > __ > > On Dienstag, 9. April 2019 01:36:43 CEST Tim Newsome wrote: > > > In my personal branch (which hopefully I'll be submitting soon), > I changed > > > hwthread_update_threads() to preserve current_threadid, which fixed a > > > problem I ran into. > > > > > > Does this patch also work for you? > > I'd prefer a fix for the clobbering of current_threadid inside > hwthread.c. There's another patch already submitted to that effect > and I think it's the correct solution. That patch has some other > weird stuff included that I'm not happy with so it's on hold until > the submitter cleans it up. > > Removing the thread update from the vcont support will have side > effects. I specifically put it there to circumvent a weird behaviour > I was seeing with rtos threads being not up to date at this point. > It should be resolved at a point but the fix for current_threadid > must go into hwthread.c anyway. > > BR, > > Matthias > > -- > > Mit freundlichen Grüßen/Best regards, > > Matthias Welwarsky > > Project Engineer > > SYSGO AG > > Office Mainz > > Am Pfaffenstein 14 / D-55270 Klein-Winternheim / Germany > > Phone: +49-6136-9948-0 / Fax: +49-6136-9948-10 > > VoIP: SIP:m...@sysgo.com <mailto:sip%3a...@sysgo.com> > > E-mail: matthias.welwar...@sysgo.com > <mailto:matthias.welwar...@sysgo.com> / Web: http://www.sysgo.com > > > _________________________________________________________________________________ > Web: https://www.sysgo.com > > Blog: https://www.sysgo.com/blog > > Events: https://www.sysgo.com/events > > Newsletter: https://www.sysgo.com/newsletter > > _________________________________________________________________________________ > Handelsregister/Commercial Registry: HRB Mainz 90 HRB 8066 > > Vorstand/Executive Board: Etienne Butery (CEO), Kai Sablotny (COO) > > Aufsichtsratsvorsitzender/Supervisory Board Chairman: Marc Darmon > > USt-Id-Nr./VAT-Id-No.: DE 149062328 > _______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel