Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 160339 - GDB fails to correctly report frame information
Summary: GDB fails to correctly report frame information
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gdb
Version: 4.0
Hardware: ia64
OS: Linux
Target Milestone: ---
: ---
Assignee: Jeff Johnston
QA Contact: Jay Turner
Depends On:
Blocks: 145411 156322 164315
TreeView+ depends on / blocked
Reported: 2005-06-14 15:26 UTC by H.J. Lu
Modified: 2015-01-08 00:10 UTC (History)
4 users (show)

Fixed In Version: RHSA-2005-709
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-10-05 12:42:18 UTC
Target Upstream Version:

Attachments (Terms of Use)
A testcase (deleted)
2005-06-14 15:31 UTC, H.J. Lu
no flags Details
Simple patch with a tentative fix for the 'info frame' issue (deleted)
2005-06-14 23:30 UTC, Inaky Perez-Gonzalez
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:709 qe-ready SHIPPED_LIVE Low: gdb security update 2005-10-05 04:00:00 UTC

Description H.J. Lu 2005-06-14 15:26:46 UTC
It is the same as IT 74002. I opened this so that all parties could share the
information here.


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
- 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

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  
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 15:31:18 UTC
Created attachment 115414 [details]
A testcase

A testcase.

Comment 2 Inaky Perez-Gonzalez 2005-06-14 23:30:34 UTC
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 14:42:15 UTC
Customer patch applied as of gdb-  A proper fix for sigaltstack has
also been added.

Comment 10 Red Hat Bugzilla 2005-10-05 12:42:18 UTC
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.

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