aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-subr.c
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2019-08-09 22:53:50 +0100
committerNick Alcock <nick.alcock@oracle.com>2019-09-24 14:06:32 +0100
commitcb2b796c8599a961f0104900e1902026b393de3d (patch)
treec81643d0d109480315476e2df777e1d4b1bcdf35 /libctf/ctf-subr.c
parent09dd90b0230aae35acdb505f4cdcd577d200d32c (diff)
downloadbinutils-cb2b796c8599a961f0104900e1902026b393de3d.zip
binutils-cb2b796c8599a961f0104900e1902026b393de3d.tar.gz
binutils-cb2b796c8599a961f0104900e1902026b393de3d.tar.bz2
libctf: get the encoding of non-ints/fps in the dynamic space right
If you call ctf_type_encoding() on a slice, you are meant to get the encoding of the slice with the format of the underlying type. If you call it on a non-int, non-fp, non-slice, you're meant to get the error ECTF_INTNOTFP. None of this was implemented for types in the dynamic space (which, now, is *all* types in writable containers). Instead, we were always returning the encoding as if it were a float, which for all other types consulted the wrong part of a discriminated union and returned garbage. (Curiously, existing users were more disturbed by the lack of an error in the non-int/fp/slice case than they were about getting garbage back.) libctf/ * ctf-types.c (ctf_type_encoding): Fix the dynamic case to work right for non-int/fps.
Diffstat (limited to 'libctf/ctf-subr.c')
0 files changed, 0 insertions, 0 deletions