This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use thread_info and inferior pointers more throughout


Pedro Alves wrote:

>  ps_err_e
>  ps_lgetregs (struct ps_prochandle *ph, lwpid_t lwpid, prgregset_t gregset)
>  {
> -  ptid_t ptid = ptid_build (ptid_get_pid (ph->ptid), lwpid, 0);
> -  struct regcache *regcache
> -    = get_thread_arch_regcache (ptid, target_gdbarch ());
> +  struct regcache *regcache = get_thread_regcache (ph->thread);

This change (and the related ones in the following routines
completely break Cell multi-arch debugging.  The point of using
get_thread_arch_regcache with target_gdbarch() instead of just
plain get_thread_regcache is that the proc-service routines
must always operated on the "main" (in this case PowerPC)
architecture, because that's the register set libthread_db
expects to be using.

The change above switches the behavior to use the SPU architecture
if GDB happens to interrupt SPU code.  This is wrong and causes
internal GDB errors pretty much instantly when starting an SPU ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]