HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: C Pointers - Alpha -> Itanium port - FTAM, OSI...
Operating System - OpenVMS
1828456
Members
4095
Online
109978
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2006 06:49 AM
07-24-2006 06:49 AM
C Pointers - Alpha -> Itanium port - FTAM, OSIF, OSAK
Hi,
I am working on porting some code to Itanium from Alpha and having problems with pointers.
The code is used for FTAM file transfers using DECnet/OSI and the OSIF and OSAK toolkits
I have the code running on Alpha and also (not yet!) Itanium, in the VAX debugger.
When I get the problematic are of the code I see the following on Alpha and Itanium:
On Alpha
==========
DBG> ex pFtamGen[0]
TESTPROGRAM\Moveit\pFtamGen[0]
iFtamPort: 0
iApiStatus: 0
iFtamStatus: 0
iFtamCommand: -1
iOsifpb: 1
fpdat
[0]: 0
[1]: 0
pcFileName
[0]: 0
[1]: 0
TimeStamp: 1152558485
pParValue: 197012
pSourceSpec: 12658696
pResultpb: 13287432
pOsifpb
[0]: 13213704
[1]: 13139976
[2]: 13066248
[3]: 12992520
pBufferList
[0]: 12771336
RecordInfo
iRecordType: -1
iDataCount
[0]: 0
[1]: 0
iRecordCount
[0]: 0
[1]: 0
scratch
[0]: 0
[1]: 0
On Itanium
==========
DBG> ex pFtamGen[0]
TESTPROGRAM\Moveit\pFtamGen[0]
iFtamPort: 0
iApiStatus: 0
iFtamStatus: 0
iFtamCommand: -1
iOsifpb: 0
fpdat
[0]-[1]: 0
pcFileName
[0]-[1]: 0
TimeStamp: 1152556034
pParValue: 65916
pSourceSpec: 10456320
pResultpb: 11108368
pOsifpb
[0]: 6277101733928783489892973617953757389149798330745408217104
[1]:1461501636991459757530357134052030134282493575184
[2]: 340282366841905693879899832897826594832
[3]: 79228162495863086981675548688
pBufferList
[0]: 16
RecordInfo
iRecordType: -1
iDataCount
[0]-[1]: 0
iRecordCount
[0]-[1]: 0
scratch: ""
The problematic element of the data is pOsifpb, and pBufferList.
On the Alpha platform it is correctly resolved to be an address pointer pointing to another defined structure/array.
On Itanium however the elements are corrupted.
The pointer pFtamGen is then passed into a OSIF_SEND() function call, which works fine on Alpha, but ACCVIOs on Itanium due to the corruption of pOsifpb.
pResultpb is defined of the same type as pOsifpb and seems to work as expected on bith Alpha and Itanium.
Does anyone have any suggestions on how to resolve this and get pOsifpb back to being an address pointer?
How can I look at these variables/types in the debugger to try and spot the problem?
Many thanks
JC
I am working on porting some code to Itanium from Alpha and having problems with pointers.
The code is used for FTAM file transfers using DECnet/OSI and the OSIF and OSAK toolkits
I have the code running on Alpha and also (not yet!) Itanium, in the VAX debugger.
When I get the problematic are of the code I see the following on Alpha and Itanium:
On Alpha
==========
DBG> ex pFtamGen[0]
TESTPROGRAM\Moveit\pFtamGen[0]
iFtamPort: 0
iApiStatus: 0
iFtamStatus: 0
iFtamCommand: -1
iOsifpb: 1
fpdat
[0]: 0
[1]: 0
pcFileName
[0]: 0
[1]: 0
TimeStamp: 1152558485
pParValue: 197012
pSourceSpec: 12658696
pResultpb: 13287432
pOsifpb
[0]: 13213704
[1]: 13139976
[2]: 13066248
[3]: 12992520
pBufferList
[0]: 12771336
RecordInfo
iRecordType: -1
iDataCount
[0]: 0
[1]: 0
iRecordCount
[0]: 0
[1]: 0
scratch
[0]: 0
[1]: 0
On Itanium
==========
DBG> ex pFtamGen[0]
TESTPROGRAM\Moveit\pFtamGen[0]
iFtamPort: 0
iApiStatus: 0
iFtamStatus: 0
iFtamCommand: -1
iOsifpb: 0
fpdat
[0]-[1]: 0
pcFileName
[0]-[1]: 0
TimeStamp: 1152556034
pParValue: 65916
pSourceSpec: 10456320
pResultpb: 11108368
pOsifpb
[0]: 6277101733928783489892973617953757389149798330745408217104
[1]:1461501636991459757530357134052030134282493575184
[2]: 340282366841905693879899832897826594832
[3]: 79228162495863086981675548688
pBufferList
[0]: 16
RecordInfo
iRecordType: -1
iDataCount
[0]-[1]: 0
iRecordCount
[0]-[1]: 0
scratch: ""
The problematic element of the data is pOsifpb, and pBufferList.
On the Alpha platform it is correctly resolved to be an address pointer pointing to another defined structure/array.
On Itanium however the elements are corrupted.
The pointer pFtamGen is then passed into a OSIF_SEND() function call, which works fine on Alpha, but ACCVIOs on Itanium due to the corruption of pOsifpb.
pResultpb is defined of the same type as pOsifpb and seems to work as expected on bith Alpha and Itanium.
Does anyone have any suggestions on how to resolve this and get pOsifpb back to being an address pointer?
How can I look at these variables/types in the debugger to try and spot the problem?
Many thanks
JC
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2006 09:43 AM
07-24-2006 09:43 AM
Re: C Pointers - Alpha -> Itanium port - FTAM, OSIF, OSAK
JC,
Where, and how is the structure defined? Is it aligned properly/as expected?
It sometimes helps to examine the "raw" data
DBG> EXAMINE/HEX/QUAD/NOSYMB pFtamGen[0]:pFtamGen[1]
Determine exactly where the fields start and stop. This may identify places where the compiler has aligned fields where you didn't want it to. Symbolic EXAMINE commands hide padding.
Where, and how is the structure defined? Is it aligned properly/as expected?
It sometimes helps to examine the "raw" data
DBG> EXAMINE/HEX/QUAD/NOSYMB pFtamGen[0]:pFtamGen[1]
Determine exactly where the fields start and stop. This may identify places where the compiler has aligned fields where you didn't want it to. Symbolic EXAMINE commands hide padding.
A crucible of informative mistakes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2006 08:40 PM
07-24-2006 08:40 PM
Re: C Pointers - Alpha -> Itanium port - FTAM, OSIF, OSAK
Hi,
Thanks for the reply.
The structure is defined over several declarations/definitions in Header files,
including typedefs and structs.
The pointer pOsifpb is a pointer to the Osifpb structure type defined in the osif.h from the
DECnet-plus OSIF installation.
All the definitions are the same in the Alpha and Itanium code.
If the problem is alignment, can this this be fixed with compile/link options?
Where can find any porting guidelines around data aligning and how to control this at compile/link?
Anyone out there using the OSIF functions on Itanium, eg OSIF_SEND() ???
Many thanks
JC
Thanks for the reply.
The structure is defined over several declarations/definitions in Header files,
including typedefs and structs.
The pointer pOsifpb is a pointer to the Osifpb structure type defined in the osif.h from the
DECnet-plus OSIF installation.
All the definitions are the same in the Alpha and Itanium code.
If the problem is alignment, can this this be fixed with compile/link options?
Where can find any porting guidelines around data aligning and how to control this at compile/link?
Anyone out there using the OSIF functions on Itanium, eg OSIF_SEND() ???
Many thanks
JC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2006 09:41 PM
07-24-2006 09:41 PM
Re: C Pointers - Alpha -> Itanium port - FTAM, OSIF, OSAK
For porting information see
http://h71000.www7.hp.com/doc/82final/6673/6673PRO.html
and other resources at
http://h71000.www7.hp.com/openvms/integrity/resources.html
http://h71000.www7.hp.com/doc/82final/6673/6673PRO.html
and other resources at
http://h71000.www7.hp.com/openvms/integrity/resources.html
____________________
Purely Personal Opinion
Purely Personal Opinion
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP