]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix Cell debugging regression
authorPedro Alves <palves@redhat.com>
Wed, 27 Jun 2018 16:19:32 +0000 (17:19 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 27 Jun 2018 16:19:32 +0000 (17:19 +0100)
commit4c4e7ad46ed77f552e2624d2f711c0ce51714395
treeb2c765f0307db1ff483b4e70db0156d27cb2d40d
parent7ab6656f274b450942deb8800257c0d2e060fa84
Fix Cell debugging regression

Commit 00431a78b28f ("Use thread_info and inferior pointers more
throughout") broke Cell multi-arch debugging, because it made the
proc-service routines (ps_lgetregs etc.) access registers using the
SPU architecture if GDB happens to interrupt SPU code.  The
proc-service routines must always operate on the "main" (in this case
PowerPC) architecture, because that's the register set libthread_db
expects to be using.

Restore the previous behavior, but wrapped in a new
get_ps_regcache function with a describing comment.

Also, the ps_l*regs routines have an explicit lwpid parameter that
said commit missed; with the commit mentioned above, we started always
reading the registers off of the current thread, which is incorrect.
That is fixed by this commit too.

gdb/ChangeLog:
2018-06-27  Pedro Alves  <palves@redhat.com>

* proc-service.c (get_ps_regcache): New.
(ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
(ps_lsetfpregs): Use it.
gdb/ChangeLog
gdb/proc-service.c