Bug 136700 - 64-bit PowerPC GDB can't fetch FPSCR
64-bit PowerPC GDB can't fetch FPSCR
Status: CLOSED DUPLICATE of bug 91727
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
powerpc Linux
medium Severity medium
: ---
: ---
Assigned To: David Woodhouse
Brian Brock
:
Depends On:
Blocks: 116894
  Show dependency treegraph
 
Reported: 2004-10-21 15:41 EDT by Andrew Cagney
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:06:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Cagney 2004-10-21 15:41:42 EDT
GDB can't fetch the PowerPC's FPSCR register: 

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

as occures when GDB is doing an inferior function call.

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

 2.6.9-rc4

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 18:22:33 EDT
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-25 20:53:05 EDT

*** This bug has been marked as a duplicate of 91727 ***
Comment 3 Red Hat Bugzilla 2006-02-21 14:06:32 EST
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.