Query regarding Itanium (Mapping of register values)
Hi ,
We have a program for core analysis. We have a query regarding the mapping of register values. The query is as follows:
*************************************************************************************************************************************************
We have used "gregset_t" which is an array of 128 elements (say reg[128]). Each element of the array is of unsigned long data type. The type gregset_t is defined in sys/procfs.h and is used to store the general purpose register values. The register values of all the 128 elements i.e. reg[0] to reg[127] is coming correctly. We have compared the values with the ones in the debugger. These values are matching.
1. But, we are not sure about what value is stored in which register array element ?
For eg: We are DIRECTLY using reg[12] for the value of stack pointer (sp) and reg[13] for the value of base pointer (bp) .Is this mapping correct ?
2. How can the instruction pointer (ip) be calculated using the register values stored in the register array reg[] ?
3. Out of reg[0] to reg[127] , which array elements contain the following application register values ?
( ar.ccv (Compare and exchange compare value register),
ar.bsp (Backing store pointer),
ar.bspstore(Backing store pointer for memory stores),
ar.itc (Interval time counter),
ar.rsc(Register stack configuration),
ar.rnat (RSE Nat collection register),
ar.unat (User NaT collection register),
ar.fpsr (Floating point status register),
ar.pfs (Previous function state),
ar.lc (Loop counter register),
ar.ec (Epilog count register),
cfm (Current frame marker) )
*************************************************************************************************************************************************
Please let us know your views on this.
Thanks and Regards,
Deepak
Deepak,
The format is "documented" in the Linux source code (see
http://linux.bkbits.net:8080/linux-2.5/anno/arch/ia64/kernel/[email protected]
for example). The comment in that file says:
/* * coredump format: * r0-r31 * NaT bits (for r0-r31; bit N = 1 iff rN is a NaT) * predicate registers (p0-p63) * b0-b7 * ip cfm user-mask * ar.rsc ar.bsp ar.bspstore ar.rnat * ar.ccv ar.unat ar.fpsr ar.pfs ar.lc ar.ec */
Hope this helps,
--david
Thanks David,
gdb uses gregset structure, could you please provide a link in gdb source, because we
need something like gdb core analysis.
Thanks and Regards
Deepak
-----Original Message-----
From: David Mosberger [mailto:[email protected]]
Sent: Thursday, February 12, 2004 1:32 AM
To: Kotian, Deepak
Cc: [email protected]
Subject: Re: Query regarding Itanium (Mapping of register values)
Deepak,
The format is "documented" in the Linux source code (see
http://linux.bkbits.net:8080/linux-2.5/anno/arch/ia64/kernel/[email protected]
for example). The comment in that file says:
/* * coredump format: * r0-r31 * NaT bits (for r0-r31; bit N = 1 iff rN is a NaT) * predicate registers (p0-p63) * b0-b7 * ip cfm user-mask * ar.rsc ar.bsp ar.bspstore ar.rnat * ar.ccv ar.unat ar.fpsr ar.pfs ar.lc ar.ec */
Hope this helps,
--david
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Deepak
Deepak> Thanks David, gdb uses gregset structure, could you please Deepak> provide a link in gdb source, because we need something like Deepak> gdb core analysis.
Sure, but in the future, why not use a search engine such as Google? Many of your questions can be answered trivially with a search engine.
Here is the official gdb source:
ftp://ftp.gnu.org/pub/gnu/gdb/
--david