This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/1756: GDB displays xmm registers incorrectly when executable linked with libpthread


>Number:         1756
>Category:       gdb
>Synopsis:       GDB displays xmm registers incorrectly when executable linked with libpthread
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 24 09:48:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     anight@monamour.ru
>Release:        unknown-1.0
>Organization:
>Environment:
SuSE linux 8.2, 9.1
>Description:
GDB displays xmm register contents incorrectly when executable linked with libpthread (may be other libraries too, not confirmed yet)
>How-To-Repeat:
> cat bug.c
#include <stdio.h>

int a[4] = { 1, 2, 3, 4 };
int b[4] = { 0, 0, 0, 0 };

int main()
{
    asm("   movups a, %xmm0\n"
        "   movups %xmm0, b\n"
        "   int $3\n");

    printf("b = 0x%08x 0x%08x 0x%08x 0x%08x\n", b[0], b[1], b[2], b[3]);

    return 0;
}

> gcc bug.c
> gdb ./a.out
GNU gdb 6.2
...

(gdb) r
Starting program: /..../a.out

Program received signal SIGTRAP, Trace/breakpoint trap.
0x080483ab in main ()
(gdb) p $xmm0.uint128
$1 = 0x00000004000000030000000200000001
(gdb) c
Continuing.
b = 0x00000001 0x00000002 0x00000003 0x00000004

Program exited normally.
(gdb) quit

> gcc bug.c -lpthread
> gdb ./a.out
GNU gdb 6.2
...

(gdb) r
Starting program: /..../a.out
[Thread debugging using libthread_db enabled]
[New Thread 1075131488 (LWP 28203)]

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 1075131488 (LWP 28203)]
0x080483eb in main ()
(gdb) p $xmm0.uint128
$1 = 0xffffffffffffffffffffffffffffffff
(gdb) c
Continuing.
b = 0x00000001 0x00000002 0x00000003 0x00000004

Program exited normally.
(gdb) quit

>
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]