Discussion:
[PATCH] Handle missing Solaris auxv entries
Rainer Orth
2018-09-19 11:49:39 UTC
Permalink
Currently, three tests FAIL on Solaris 11.4+ (amd64-pc-solaris2.11 and
sparcv9-sun-solaris2.11):

info auxv
[...]
2009 AT_SUN_HWCAP Machine-dependent CPU capability hints 0x3f5ff7
2023 ??? 0x0
0 AT_NULL End of vector 0x0
(gdb) WARNING: Unrecognized tag value: 2023 ??? 0x0

FAIL: gdb.base/auxv.exp: info auxv on live process

info auxv
4294969310 ??? 0x7fffbfffe410
9225589753816 ??? 0x7fffbfffe45c
[...]
WARNING: Unrecognized tag value: 4294969310 ??? 0x7fffbfffe410

WARNING: Unrecognized tag value: 9225589753816 ??? 0x7fffbfffe45c

WARNING: Unrecognized tag value: 140733193388037 ??? 0x6
[...]
2009 AT_SUN_HWCAP Machine-dependent CPU capability hints 0x3f5ff7
2023 ??? 0x0
0 AT_NULL End of vector 0x0
(gdb) WARNING: Unrecognized tag value: 2023 ??? 0x0

UNRESOLVED: gdb.base/auxv.exp: info auxv on native core dump

info auxv
[...]
2009 AT_SUN_HWCAP Machine-dependent CPU capability hints 0x3f5ff7
2023 ??? 0x0
0 AT_NULL End of vector 0x0
(gdb) WARNING: Unrecognized tag value: 2023 ??? 0x0

FAIL: gdb.base/auxv.exp: info auxv on gcore-created dump

The following patch fixes this by introducing the missing AT_SUN_*
values from Solaris 11.4+ <sys/auxv.h>. This lets the live and
gcore-created dump tests PASS.

I don't know yet what's the reason for those weird 'Unrecognized tag
value' warnings with native core dumps is; elfdump -n certainly doesn't
show them. However, native core dumps still need quite some work
(mostly in bfd) in this and other areas.

Tested on amd64-pc-solaris2.11. Ok for master?

Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2018-06-13 Rainer Orth <***@CeBiTec.Uni-Bielefeld.DE>

gdb:
* auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
renaming.
Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2).

include:
* elf/common.h (AT_SUN_HWCAP): Rename to ...
(AT_SUN_CAP_HW1): ... this. Retain old name for backward
compatibility.
(AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1)
(AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2): Define.
Nick Clifton
2018-09-19 14:59:29 UTC
Permalink
Hi Rainer,
Post by Rainer Orth
Tested on amd64-pc-solaris2.11. Ok for master?
No problems from the binutils end.

Cheers
Nick
Tom Tromey
2018-09-19 19:51:44 UTC
Permalink
Rainer> The following patch fixes this by introducing the missing AT_SUN_*
Rainer> values from Solaris 11.4+ <sys/auxv.h>. This lets the live and
Rainer> gcore-created dump tests PASS.

Rainer> I don't know yet what's the reason for those weird 'Unrecognized tag
Rainer> value' warnings with native core dumps is; elfdump -n certainly doesn't
Rainer> show them. However, native core dumps still need quite some work
Rainer> (mostly in bfd) in this and other areas.

Rainer> Tested on amd64-pc-solaris2.11. Ok for master?

The gdb parts are ok. Thank you for doing this.

Rainer> (AT_SUN_CAP_HW1): ... this. Retain old name for backward
Rainer> compatibility.

I don't know if compatibility is needed here, but I suppose it can
hardly hurt.

Tom
Rainer Orth
2018-09-20 08:26:31 UTC
Permalink
Hi Tom,
Post by Tom Tromey
Rainer> (AT_SUN_CAP_HW1): ... this. Retain old name for backward
Rainer> compatibility.
I don't know if compatibility is needed here, but I suppose it can
hardly hurt.
I've been following the lead of Solaris <sys/auxv.h> here. Not knowing
if there are any out-of-tree consumers, it seemed the safest course.

Thanks.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
Loading...