Bug 160339 - GDB fails to correctly report frame information
GDB fails to correctly report frame information
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gdb (Show other bugs)
4.0
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnston
Jay Turner
:
Depends On:
Blocks: 145411 156322 164315
  Show dependency treegraph
 
Reported: 2005-06-14 11:26 EDT by H.J. Lu
Modified: 2015-01-07 19:10 EST (History)
4 users (show)

See Also:
Fixed In Version: RHSA-2005-709
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-05 08:42:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A testcase (82.81 KB, application/octet-stream)
2005-06-14 11:31 EDT, H.J. Lu
no flags Details
Simple patch with a tentative fix for the 'info frame' issue (5.44 KB, patch)
2005-06-14 19:30 EDT, jarljarl
no flags Details | Diff

  None (edit)
Description H.J. Lu 2005-06-14 11:26:46 EDT
It is the same as IT 74002. I opened this so that all parties could share the
information here.

From inaky.perez-gonzalez@intel.com:

Problem is ia64_sigtramp_frame_prev_register() has no clue on how to deal with
all the virtual registers. GDB considers the following virtual registers:

- NAT0-127, the NaT bits for GR0-127, because they don't fit the raw register
model. NAT32-NAT127 have to do the rotation thingie.
- P0-P63, predicate registers (I guess virtual because they are one bit and you
extract'em out of PR). P16 to P63 have to do the rotation thingie.
- V32 to V127 are the general purpose registers, but with the rotation stuff
applied.
- BOF, calculated from the BSP and CFM registers

Now, if you read ia64_pseudo_registers_read(), it deals properly with all the
pseudo registers--it follows we just have to plug the same code into
ia64_sigtramp..etc...() to make it be able to get the addresses of virtual
registers.

So at the end the problem is simply that GDB wasn't reporting the location of  
the pseudo registers properly.   
 
The fix is to specify those locations, and it was done in the following way:  
 
- NAT0-NAT31: located at UNAT, so the location of those bits is UNAT's.  
- NAT32-NAT127: located at the frame's RNAT [I was unable to test this, but it  
should work]  
- BOF: computed out of BSP and CFM, thus it has no real location--locatrion  
declared to be 0.  
- VP0-VP63: these bits are all located in the PR register; thus their location  
is PR's. Didn't have a chance to test as gcc code doesn't save them in user  
space.  
 
Please give the patch a try and a check. I have mostly made up everything  
according to the code I've seen in other areas of ia64-tdep.c  
(ia64_pseudo_register_read(), for example),
Comment 1 H.J. Lu 2005-06-14 11:31:18 EDT
Created attachment 115414 [details]
A testcase

A testcase.
Comment 2 jarljarl 2005-06-14 19:30:34 EDT
Created attachment 115447 [details]
Simple patch with a tentative fix for the 'info frame' issue

This is not complete nor verified to be correct; 
I need some GDB expert to certify it correct or not.

Applies to gdb 6.3
Comment 6 Jeff Johnston 2005-07-27 10:42:15 EDT
Customer patch applied as of gdb-6.3.0.0-1.51  A proper fix for sigaltstack has
also been added.
Comment 10 Red Hat Bugzilla 2005-10-05 08:42:18 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-709.html

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