Tom de Vries
1d45d90934
[gdb/symtab] Work around PR gas/29517
...
When using glibc debuginfo generated with gas 2.39, we run into PR gas/29517:
...
$ gdb -q -batch a.out -ex start -ex "p (char *)strstr (\"haha\", \"ah\")"
Temporary breakpoint 1 at 0x40051b: file hello.c, line 6.
Temporary breakpoint 1, main () at hello.c:6
6 printf ("hello\n");
Invalid cast.
...
while without glibc debuginfo installed we get the expected result:
...
$n = 0x7ffff7daa1b1 "aha"
...
and likewise with glibc debuginfo generated with gas 2.40.
The strstr ifunc resolves to __strstr_sse2_unaligned. The problem is that gas
generates dwarf that states that the return type is void:
...
<1><3e1e58>: Abbrev Number: 2 (DW_TAG_subprogram)
<3e1e59> DW_AT_name : __strstr_sse2_unaligned
<3e1e5d> DW_AT_external : 1
<3e1e5e> DW_AT_low_pc : 0xbbd2e
<3e1e66> DW_AT_high_pc : 0xbc1c3
...
while the return type should be a DW_TAG_unspecified_type, as is the case
with gas 2.40.
We can still use the workaround of casting to another function type for both
__strstr_sse2_unaligned:
...
(gdb) p ((char * (*) (const char *, const char *))__strstr_sse2_unaligned) \
("haha", "ah")
$n = 0x7ffff7daa211 "aha"
...
and strstr (which requires using *strstr to dereference the ifunc before we
cast):
...
gdb) p ((char * (*) (const char *, const char *))*strstr) ("haha", "ah")
$n = 0x7ffff7daa251 "aha"
...
but that's a bit cumbersome to use.
Work around this in the dwarf reader, such that we have instead:
...
(gdb) p (char *)strstr ("haha", "ah")
$n = 0x7ffff7daa1b1 "aha"
...
This also requires fixing producer_is_gcc to stop returning true for
producer "GNU AS 2.39.0".
Tested on x86_64-linux.
Approved-By: Andrew Burgess <aburgess@redhat.com >
PR symtab/30911
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30911
2023-10-16 16:32:28 +02:00
..
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:57 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-26 10:09:44 +01:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-05-02 17:37:58 +02:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-26 18:28:32 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-03-02 08:49:37 -07:00
2023-03-02 08:49:37 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-26 10:09:44 +01:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:57 -07:00
2023-01-13 13:18:55 -07:00
2023-01-25 09:02:11 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-26 10:09:44 +01:00
2023-04-17 18:09:32 +02:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-03-27 13:58:10 +02:00
2023-09-05 18:48:22 +00:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-26 10:09:44 +01:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:54 -07:00
2023-01-13 13:18:57 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:55 -07:00
2023-03-27 13:58:10 +02:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-03-27 13:58:10 +02:00
2023-01-13 13:18:55 -07:00
2023-01-26 10:09:44 +01:00
2023-01-13 13:18:55 -07:00
2023-01-26 18:28:31 -07:00
2023-05-05 17:59:21 +01:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-04-22 07:50:08 +02:00
2023-06-07 12:01:12 +01:00
2023-01-13 13:18:55 -07:00
2023-03-22 15:13:17 -04:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:56 -07:00
2023-03-27 13:58:09 +02:00
2023-01-26 10:09:44 +01:00
2023-01-13 13:18:55 -07:00
2023-01-26 10:09:44 +01:00
2023-01-26 10:09:44 +01:00
2023-01-13 13:18:55 -07:00
2023-01-26 10:09:44 +01:00
2023-01-13 13:18:55 -07:00
2023-03-27 13:58:10 +02:00
2023-01-13 13:18:56 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:54 -07:00
2023-01-13 13:18:55 -07:00
2023-01-26 10:09:44 +01:00
2023-01-13 13:18:55 -07:00
2023-10-16 16:32:28 +02:00
2023-10-16 16:32:28 +02:00
2023-01-13 13:18:55 -07:00
2023-03-27 13:58:10 +02:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:56 -07:00
2023-01-26 10:09:44 +01:00
2023-03-07 15:12:06 +01:00
2023-01-13 13:18:55 -07:00
2023-03-27 13:58:09 +02:00
2023-06-11 15:41:42 -07:00
2023-01-26 18:28:32 -07:00
2023-01-13 13:18:55 -07:00
2023-09-08 12:27:02 +02:00
2023-01-26 18:28:32 -07:00
2023-03-18 10:16:30 +01:00
2023-03-18 10:16:30 +01:00
2023-01-13 13:18:55 -07:00
2023-08-10 15:46:30 +02:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-26 10:09:44 +01:00
2023-01-26 10:09:44 +01:00
2023-01-26 10:09:44 +01:00
2023-03-27 13:58:09 +02:00
2023-01-25 09:02:11 -07:00
2023-01-13 13:18:55 -07:00
2023-01-25 09:02:11 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-07-15 10:09:40 +02:00
2023-01-13 13:18:55 -07:00
2023-03-27 13:58:10 +02:00
2023-01-13 13:18:55 -07:00
2023-08-29 17:27:19 +02:00
2023-05-12 13:45:52 +01:00
2023-01-13 13:18:54 -07:00
2023-03-27 13:58:10 +02:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-06-17 12:28:58 +02:00
2023-01-13 13:18:57 -07:00
2023-01-13 13:18:57 -07:00
2023-01-13 13:18:57 -07:00
2023-01-13 13:18:57 -07:00
2023-01-13 13:18:57 -07:00
2023-01-13 13:18:57 -07:00
2023-01-13 13:18:55 -07:00
2023-03-27 13:58:10 +02:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-10-05 12:21:46 +01:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-07-21 14:03:23 -06:00
2023-01-13 13:18:55 -07:00
2023-03-27 13:58:09 +02:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-02-18 15:41:38 -07:00
2023-02-09 07:55:34 -07:00
2023-01-26 18:28:32 -07:00
2023-01-13 13:18:57 -07:00
2023-05-19 10:16:44 +01:00
2023-05-19 10:16:44 +01:00
2023-01-13 13:18:57 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-25 09:02:11 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:57 -07:00
2023-08-30 23:33:31 +02:00
2023-01-13 13:18:55 -07:00
2023-05-12 11:43:41 +02:00
2023-03-27 13:58:10 +02:00
2023-06-17 12:28:58 +02:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-08-10 21:16:30 +02:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-08-28 16:27:58 +02:00
2023-05-11 15:47:37 -06:00
2023-07-21 08:25:25 +02:00
2023-01-13 13:18:57 -07:00
2023-01-13 13:18:55 -07:00
2023-09-20 16:05:55 +02:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-20 11:51:54 -05:00
2023-06-13 09:22:39 +01:00
2023-06-13 09:22:39 +01:00
2023-01-13 13:18:58 -07:00
2023-01-13 13:18:55 -07:00
2023-01-26 10:09:44 +01:00
2023-07-26 13:42:32 +02:00
2023-07-26 13:42:32 +02:00
2023-07-26 13:42:32 +02:00
2023-01-13 13:18:58 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00
2023-01-13 13:18:55 -07:00