Bug 19365 - gdb record fail to recognize vmovdqa avx instruction.
Summary: gdb record fail to recognize vmovdqa avx instruction.
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: record (show other bugs)
Version: 7.10
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-15 19:24 UTC by skpgkp1
Modified: 2022-07-05 17:45 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skpgkp1 2015-12-15 19:24:08 UTC
Following are step to reproduce this issue. Use AVX machine and gdb version 7.10 to reproduce this issue.

$ cat x.c
#include<stdio.h>
#include<string.h>
main()
{
        printf("%d",strcasecmp("0","0"));
}


# Compile

$ gcc --version
gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)

$ gcc x.c

$ gdb --version
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.

$ gdb a.out
(gdb) b main
Breakpoint 1 at 0x40058a
(gdb) run
Starting program: /local/lab_dss/a.out

Breakpoint 1, 0x000000000040058a in main ()
(gdb) record full
(gdb) c
Continuing.
Process record does not support instruction 0xc5 at address 0x7ffff7b6062f.
(null)Process record: failed to record execution log.

[process 22205] #1 stopped.
0x00007ffff7b6062f in __strcasecmp_l_avx () from /lib64/libc.so.6
(gdb) disass
Dump of assembler code for function __strcasecmp_l_avx:
   0x00007ffff7b60610 <+0>:     mov    (%rdx),%rax
   0x00007ffff7b60613 <+3>:     testl  $0x1,0x278(%rax)
   0x00007ffff7b6061d <+13>:    jne    0x7ffff7ac3920 <__strcasecmp_l_nonascii>
   0x00007ffff7b60623 <+19>:    mov    %esi,%ecx
   0x00007ffff7b60625 <+21>:    mov    %edi,%eax
   0x00007ffff7b60627 <+23>:    and    $0x3f,%rcx
   0x00007ffff7b6062b <+27>:    and    $0x3f,%rax
=> 0x00007ffff7b6062f <+31>:    vmovdqa 0x45e49(%rip),%xmm4        # 0x7ffff7ba6480
   0x00007ffff7b60637 <+39>:    vmovdqa 0x45e61(%rip),%xmm5        # 0x7ffff7ba64a0
   0x00007ffff7b6063f <+47>:    vmovdqa 0x45e19(%rip),%xmm6        # 0x7ffff7ba6460 <blanks>
   0x00007ffff7b60647 <+55>:    cmp    $0x30,%ecx
   0x00007ffff7b6064a <+58>:    ja     0x7ffff7b606b0 <__strcasecmp_l_avx+160>
   0x00007ffff7b6064c <+60>:    cmp    $0x30,%eax
   0x00007ffff7b6064f <+63>:    ja     0x7ffff7b606b0 <__strcasecmp_l_avx+160>
Comment 1 H.J. Lu 2015-12-15 20:27:51 UTC
AVX instructions are

      2f:       c5 f9 6f 25 00 00 00 00         vmovdqa 0x0(%rip),%xmm4        # 37 <__strcasecmp_l_avx+0x27>
      37:       c5 f9 6f 2d 00 00 00 00         vmovdqa 0x0(%rip),%xmm5        # 3f <__strcasecmp_l_avx+0x2f>
      3f:       c5 f9 6f 35 00 00 00 00         vmovdqa 0x0(%rip),%xmm6        # 47 <__strcasecmp_l_avx+0x37>
Comment 2 H.J. Lu 2015-12-15 20:31:18 UTC
Apparent, none of AVX instructions are supported.