Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdbserver, NPTL pthreads and PEEKUSER based targets
@ 2005-03-31 15:43 Daniel THOMPSON
  2005-03-31 15:49 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel THOMPSON @ 2005-03-31 15:43 UTC (permalink / raw)
  To: gdb

Hi folks

I am trying to port gdbserver to work on NPTL kernels on an architecture 
that fetchs registers using PTRACE_PEEKUSER rather than PTRACE_GETREGS 
(in my specific case the SH4).

I have written a hacky but working implementation of ps_lgetregs(). This 
is sufficient to get through he shared library loading without spitting 
out invalid data packets and works well enough for the threads_db code 
to correctly identify the root thread triplet (pid, lwp, tid).

Unfortunately the gdbserver bails out inside pthread_create() with an 
SIGTRAP signal. The other oddity I noted is that where the x86 does a 
PTRACE_ATTACH to LWP pid+4 inside pthread_create(), the SH4 is attaching 
to LWP pid+1 which does not seem right as this would not be the LWP of 
the spawned thread.

I have tried comparing the strace's of gdb vs. gdbserver but did not 
notice anything very useful.

-- 
Daniel Thompson (STMicroelectronics) <daniel.thompson@st.com>
1000 Aztec West, Almondsbury, Bristol, BS32 4SQ. 01454 462659

If a car is a horseless carriage then is a motorcycle a horseless horse?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-01 14:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-31 15:43 gdbserver, NPTL pthreads and PEEKUSER based targets Daniel THOMPSON
2005-03-31 15:49 ` Daniel Jacobowitz
2005-04-01  8:14   ` Daniel THOMPSON
2005-04-01 14:08     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox