This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/341: BUG IN GDB FOR IA64
- From: balderas at virtutech dot se
- To: gdb-gnats at sources dot redhat dot com
- Date: 5 Feb 2002 13:15:12 -0000
- Subject: gdb/341: BUG IN GDB FOR IA64
- Reply-to: balderas at virtutech dot se
>Number: 341
>Category: gdb
>Synopsis: BUG IN GDB FOR IA64
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 05 05:18:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: balderas@virtutech.se
>Release: unknown-1.0
>Organization:
>Environment:
Red Hat Linux release 7.1.94 (Roswell)
>Description:
I would like to know if any of you have experienced certain problems when
debugging code by using gdb in IA64. At first, when I enter the command
(gdb) info registers f1
I get
f1 0 (raw 0x00000000000000000000000000000000)
which seems to be wrong since f1 always reads as +1.0, well, at least that
is what the manual says.
Second, when I read an application register with mov, the value of the
instruction's target general register is different than the one gdb reads
and shows for such application register.
For example:
(gdb) disass a_function
Dump of assembler code for function a_function:
0x4000000000000690 <a_function>: [MMI] mov r8=r32;;
0x4000000000000691 <a_function+1>: mov.m r1=ar.k0 *
0x4000000000000692 <a_function+2>: nop.i 0x0;;
.
.
.
(gdb) info registers ip
ip 0x4000000000000691 4611686018427389585
(gdb) info registers kr0
kr0 0x0 0
(gdb) info registers r1
r1 0x6000000000000988 6917529027641084296
(gdb) si
0x4000000000000692 4 __asm__("mov.m r1=ar0;;");
(gdb) info registers r1
r1 0xffffc000000 17592118935552
(gdb) info registers kr0
kr0 0x0 0
gdb reads ar0 (application register 0) by its equivalent identifier kr0.
You can see at (*) that the first application register is referred to as
ar.k0 in assembly source code.
I would really appreciate if somebody lets me know what is wrong here.
Everything was perfect when I worked on gdb for ppc in the same way.
Thanks.
Tomás
>How-To-Repeat:
Just write an debug, in a single step way, the following program:
#include <stdio.h>
int a_function(int a) {
__asm__("mov.m r1=ar0;;");
return a + 1;
}
int main(void) {
int a;
printf("a + 1 = %d\n", a_function(a));
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: