public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/16468] New: gdb fails on s390x with "Couldn't write registers: Invalid argument"
@ 2014-01-20  2:46 naesten at gmail dot com
  2014-01-20  2:49 ` [Bug gdb/16468] " naesten at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: naesten at gmail dot com @ 2014-01-20  2:46 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16468

            Bug ID: 16468
           Summary: gdb fails on s390x with "Couldn't write registers:
                    Invalid argument"
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: naesten at gmail dot com

Some of us at Debian have noticed that GDB isn't working in s390x sid chroots
on the s390 porterbox, zelenka.debian.org.

Observe:

sbronson@zelenka:~/strace-code$ uname -a
Linux zelenka 3.2.0-4-s390x #1 SMP Debian 3.2.51-1 s390x GNU/Linux
sbronson@zelenka:~/strace-code$ dpkg-query -W linux-image-3.2.0-4-s390x
linux-image-3.2.0-4-s390x       3.2.51-1
sbronson@zelenka:~/strace-code$ schroot -r -c $CHROOT
<-code$ strace -e ptrace gdb -batch -ex run -ex bt --args echo foo
--- SIGCHLD (Child exited) @ 0 (0) ---
--- SIGCHLD (Child exited) @ 0 (0) ---
ptrace(PTRACE_CONT, 22210, 0x1, SIG_0)  = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
ptrace(PTRACE_SETOPTIONS, 22210, 0, PTRACE_O_TRACEFORK) = 0
ptrace(PTRACE_SETOPTIONS, 22211, 0, PTRACE_O_TRACEFORK) = 0
ptrace(PTRACE_SETOPTIONS, 22211, 0, PTRACE_O_TRACEFORK|PTRACE_O_TRACEVFORKDONE)
= 0
ptrace(PTRACE_CONT, 22211, 0, SIG_0)    = 0
ptrace(PTRACE_GETEVENTMSG, 22211, 0, 0x3ffffdb1af8) = 0
ptrace(PTRACE_KILL, 22212, 0, 0)        = 0
ptrace(PTRACE_KILL, 22211, 0, 0)        = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
ptrace(PTRACE_SETOPTIONS, 22210, 0,
PTRACE_O_TRACEFORK|PTRACE_O_TRACEVFORK|PTRACE_O_TRACECLONE|PTRACE_O_TRACEEXEC|PTRACE_O_TRACEVFORKDONE)
= 0
ptrace(PTRACE_SETOPTIONS, 22210, 0, PTRACE_O_TRACESYSGOOD) = 0
ptrace(PTRACE_SETOPTIONS, 22210, 0,
PTRACE_O_TRACESYSGOOD|PTRACE_O_TRACEFORK|PTRACE_O_TRACEVFORK|PTRACE_O_TRACECLONE|PTRACE_O_TRACEEXEC|PTRACE_O_TRACEVFORKDONE)
= 0
ptrace(0x4204 /* PTRACE_??? */, 22210, 0x306, 0x3ffffdb1cb8) = 0
ptrace(0x4204 /* PTRACE_??? */, 22210, 0x307, 0x3ffffdb1cb8) = 0
ptrace(PTRACE_PEEKUSER, 22210, psw_mask, [0x705c00180000000]) = 0
ptrace(0x5000 /* PTRACE_??? */, 22210, 0x3ffffdb1af0, 0x3fffcc2db28) = 0
ptrace(PTRACE_PEEKUSER, 22210, psw_mask, [0x705c00180000000]) = 0
.
.
.
ptrace(PTRACE_PEEKUSER, 22210, psw_mask, [0x705c00180000000]) = 0
ptrace(PTRACE_PEEKTEXT, 22210, 0x80007ef8, [0]) = 0
ptrace(PTRACE_PEEKUSER, 22210, psw_mask, [0x705c00180000000]) = 0
.
.
.
ptrace(PTRACE_PEEKUSER, 22210, psw_mask, [0x705c00180000000]) = 0
ptrace(PTRACE_PEEKTEXT, 22210, 0x80007ef8, [0]) = 0
ptrace(0x4204 /* PTRACE_??? */, 22210, 0x307, 0x3ffffdb19e8) = 0
ptrace(0x4205 /* PTRACE_??? */, 22210, 0x307, 0x3ffffdb19e8) = 0
ptrace(PTRACE_PEEKTEXT, 22210, 0x3fffdfeb6d0, [0xfddc070707fe0707]) = 0
ptrace(PTRACE_PEEKTEXT, 22210, 0x3fffdfeb6d0, [0xfddc070707fe0707]) = 0
ptrace(PTRACE_POKEDATA, 22210, 0x3fffdfeb6d0, 0xfddc070700010707) = 0
ptrace(PTRACE_CONT, 22210, 0x1, SIG_0)  = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
ptrace(0x5000 /* PTRACE_??? */, 22210, 0x3ffffdb1548, 0x3fffcc2db28) = 0
ptrace(0x5000 /* PTRACE_??? */, 22210, 0x3ffffdb14c0, 0x1) = 0
ptrace(0x5001 /* PTRACE_??? */, 22210, 0x3ffffdb14c0, 0xbc1cbf28) = -1 EINVAL
(Invalid argument)
Couldn't write registers: Invalid argument.
Target is executing.
ptrace(PTRACE_KILL, 22210, 0, 0)        = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
ptrace(PTRACE_KILL, 22210, 0, 0)        = -1 ESRCH (No such process)
(sid_s390x-dchroot)sbronson@zelenka:~/strace-code$ gdb --version
GNU gdb (GDB) 7.6.1 (Debian 7.6.1-1)
.
.
.

(The failing request is a PTRACE_POKEUSR_AREA request.)

The kernel package can be obtained from:
http://snapshot.debian.org/package/linux/3.2.51-1/#linux-image-3.2.0-4-s390x_3.2.51-1

(In this case, since the outer system is running the s390 arch, it came from
the _s390.deb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

end of thread, other threads:[~2014-02-01  0:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-20  2:46 [Bug gdb/16468] New: gdb fails on s390x with "Couldn't write registers: Invalid argument" naesten at gmail dot com
2014-01-20  2:49 ` [Bug gdb/16468] " naesten at gmail dot com
2014-01-21  1:37 ` naesten at gmail dot com
2014-01-21 21:28 ` naesten at gmail dot com
2014-01-22 19:17 ` naesten at gmail dot com
2014-01-23  1:45 ` sergiodj at redhat dot com
2014-01-23 22:56 ` naesten at gmail dot com
2014-01-26  5:35 ` sergiodj at redhat dot com
2014-02-01  0:45 ` naesten at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).