aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-script.c
diff options
context:
space:
mode:
authorNils-Christian Kempke <nils-christian.kempke@intel.com>2022-10-13 15:17:24 +0200
committerIjaz, Abdul B <abdul.b.ijaz@intel.com>2024-02-02 08:57:16 +0100
commit6a6744198309c2122fed4374b97ee170a3b2d3e2 (patch)
treeb96d22f603dc189c52e4dd4c4b05a6b00d54a5ed /gdb/cli/cli-script.c
parentf18fc7e56fbb605aa38643881eb0228313466551 (diff)
downloadbinutils-6a6744198309c2122fed4374b97ee170a3b2d3e2.zip
binutils-6a6744198309c2122fed4374b97ee170a3b2d3e2.tar.gz
binutils-6a6744198309c2122fed4374b97ee170a3b2d3e2.tar.bz2
gdb, testsuite, fortran: Fix sizeof intrinsic for Fortran pointers
For Fortran pointers gfortran/ifx emits DW_TAG_pointer_types like <2><17d>: Abbrev Number: 22 (DW_TAG_variable) <180> DW_AT_name : (indirect string, offset: 0x1f1): fptr <184> DW_AT_type : <0x214> ... <1><219>: Abbrev Number: 27 (DW_TAG_array_type) <21a> DW_AT_type : <0x10e> <216> DW_AT_associated : ... The 'pointer property' in Fortran is implicitly modeled by adding a DW_AT_associated to the type of the variable (see also the DW_AT_associated description in DWARF 5). A Fortran pointer is more than an address and thus different from a C pointer. It is a self contained type having additional fields such as, e.g., the rank of its underlying array. This motivates the intended DWARF modeling of Fortran pointers via the DW_AT_associated attribute. This patch adds support for the sizeof intrinsic by simply dereferencing pointer types when encountered during a sizeof evaluation. The patch also adds a test for the sizeof intrinsic which was not tested before. Tested-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org> Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/cli/cli-script.c')
0 files changed, 0 insertions, 0 deletions