Bug 136700 - 64-bit PowerPC GDB can't fetch FPSCR
Summary: 64-bit PowerPC GDB can't fetch FPSCR
Status: CLOSED DUPLICATE of bug 91727
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: powerpc
OS: Linux
Target Milestone: ---
Assignee: David Woodhouse
QA Contact: Brian Brock
Depends On:
Blocks: 116894
TreeView+ depends on / blocked
Reported: 2004-10-21 19:41 UTC by Andrew Cagney
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2006-02-21 19:06:32 UTC

Attachments (Terms of Use)

Description Andrew Cagney 2004-10-21 19:41:42 UTC
GDB can't fetch the PowerPC's FPSCR register: 

  (gdb) print $fpscr
  reading register fpscr (#70): Input/output error.

as occures when GDB is doing an inferior function call.

Version-Release number of selected component (if applicable):


strace shows:

  ptrace(PTRACE_PEEKUSER, 503, 0x288, 0xffffcdb0) = -1 EIO

and grubbing the headers:

  #define PT_FPR0 48
  define PT_FPSCR (PT_FPR0 + 32 + 1)
  (gdb) print/x (48 + 32 + 1) * 8
  $1 = 0x288

suggests that the value is correct.

Comment 1 David Woodhouse 2004-10-25 22:22:33 UTC
See bug #91727. 

The value of PT_FPSCR for 64-bit userspace is different to the value
for 32-bit. This is because a 'double' is worth two longs for 32-bit
code, and only one for 64-bit code.

I think the kernel is doing the right thing -- if there's a kernel bug
it's purely the evilness of the way the interface is done. If we're
going to start criticising the ptrace interface... :)

Closing NOTABUG. Feel free to argue if you feel strongly ;)

Comment 2 Andrew Cagney 2004-10-26 00:53:05 UTC

*** This bug has been marked as a duplicate of 91727 ***

Comment 3 Red Hat Bugzilla 2006-02-21 19:06:32 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.