mwelinder at gmail dot com
2018-06-13 15:47:13 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=23283
Bug ID: 23283
Summary: Inconsistent multi-versioning behaviour
Product: gdb
Version: 8.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: mwelinder at gmail dot com
Target Milestone: ---
The support for multiversioning is weak and can cause misleading
output, missed breakpoints, etc.
Compile the following with g++ 8.1:
// ttt.C:
__attribute__((target("default"))) inline int foo() { return 0; }
__attribute__((target("sse2"))) inline int foo() { return 1; }
__attribute__((target("avx"))) inline int foo() { return 2; }
__attribute__((target("avx2"))) inline int foo() { return 3; }
__attribute__((target("avx512f"))) inline int foo() { return 4; }
int
main ()
{
return foo ();
}
gdb [...]/ttt
GNU gdb (GDB) 8.1
[...]
(gdb) disass 'foo() [TAB]
foo() foo() [clone .avx] foo() [clone .resolver]
### NOTE: shows default, avx, and resolver versions. No sign of sse2, avx2,
### avx512f versions.
(gdb) info functions
All defined functions:
[...]
File [...]/ttt.C:
int _Z3foov.avx2(void);
int _Z3foov.avx512f(void);
int _Z3foov.sse2(void);
int foo();
int foo() [clone .avx];
int main();
[...]
### NOTE: The functions are there, but gdb fails to see them as clones
(gdb) disass foo
Dump of assembler code for function foo() [clone .avx]:
0x08048b00 <+0>: mov $0x2,%eax
0x08048b05 <+5>: ret
End of assembler dump.
### NOTE: That is not the function that is actually in use. It should
either refuse the command or disassemble the right version.
(gdb) b foo
Breakpoint 1 at 0x400af0: foo. (3 locations)
### NOTE: 3 locations -- it missed sse2/avx2/avx512f
Bug ID: 23283
Summary: Inconsistent multi-versioning behaviour
Product: gdb
Version: 8.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: mwelinder at gmail dot com
Target Milestone: ---
The support for multiversioning is weak and can cause misleading
output, missed breakpoints, etc.
Compile the following with g++ 8.1:
// ttt.C:
__attribute__((target("default"))) inline int foo() { return 0; }
__attribute__((target("sse2"))) inline int foo() { return 1; }
__attribute__((target("avx"))) inline int foo() { return 2; }
__attribute__((target("avx2"))) inline int foo() { return 3; }
__attribute__((target("avx512f"))) inline int foo() { return 4; }
int
main ()
{
return foo ();
}
gdb [...]/ttt
GNU gdb (GDB) 8.1
[...]
(gdb) disass 'foo() [TAB]
foo() foo() [clone .avx] foo() [clone .resolver]
### NOTE: shows default, avx, and resolver versions. No sign of sse2, avx2,
### avx512f versions.
(gdb) info functions
All defined functions:
[...]
File [...]/ttt.C:
int _Z3foov.avx2(void);
int _Z3foov.avx512f(void);
int _Z3foov.sse2(void);
int foo();
int foo() [clone .avx];
int main();
[...]
### NOTE: The functions are there, but gdb fails to see them as clones
(gdb) disass foo
Dump of assembler code for function foo() [clone .avx]:
0x08048b00 <+0>: mov $0x2,%eax
0x08048b05 <+5>: ret
End of assembler dump.
### NOTE: That is not the function that is actually in use. It should
either refuse the command or disassemble the right version.
(gdb) b foo
Breakpoint 1 at 0x400af0: foo. (3 locations)
### NOTE: 3 locations -- it missed sse2/avx2/avx512f
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.