CTF: incorrect underlying type setting for enumeration types
authorWeimin Pan <weimin.pan@oracle.com>
Mon, 18 Oct 2021 18:15:21 +0000 (14:15 -0400)
committerWeimin Pan <weimin.pan@oracle.com>
Mon, 18 Oct 2021 18:15:21 +0000 (14:15 -0400)
commitb3a01ce2155d3532761f07639e00ce3d0317837d
tree401a78bd61bb190b2da7ccdd27248d49e18ff954
parent19b96124487358e723f920bfa30c272f5c0c5995
CTF: incorrect underlying type setting for enumeration types

A bug was filed against the incorrect underlying type setting for
an enumeration type, which was caused by a copy and paste error.
This patch fixes the problem by setting it by calling objfile_int_type,
which was originally dwarf2_per_objfile::int_type, with ctf_type_size bits.
Also add error checking on ctf_func_type_info call.
gdb/ctfread.c
gdb/dwarf2/cu.c
gdb/dwarf2/read.c
gdb/dwarf2/read.h
gdb/objfiles.c
gdb/objfiles.h