aboutsummaryrefslogtreecommitdiff
path: root/gold/attributes.cc
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-09-27 12:53:25 -0600
committerTom Tromey <tromey@adacore.com>2022-10-21 09:40:59 -0600
commite379f6521a9fbc65de8cd90a950e28d0ca522ae3 (patch)
treead535756dd30530414241d77a7af18527068a7f6 /gold/attributes.cc
parent6c849804cff9e251876f3edb64d44dabeadaa711 (diff)
downloadgdb-e379f6521a9fbc65de8cd90a950e28d0ca522ae3.zip
gdb-e379f6521a9fbc65de8cd90a950e28d0ca522ae3.tar.gz
gdb-e379f6521a9fbc65de8cd90a950e28d0ca522ae3.tar.bz2
Fix crash in value_print_array_elements
A user noticed that gdb would crash when printing a packed array after doing "set lang c". Packed arrays don't exist in C, but it's occasionally useful to print things in C mode when working in a non-C language -- this lets you see under the hood a little bit. The bug here is that generic value printing does not handle packed arrays at all. This patch fixes the bug by introducing a new function to extract a value from a bit offset and width. The new function includes a hack to avoid problems with some existing test cases when using -fgnat-encodings=all. Cleaning up this code looked difficult, and since "all" is effectively deprecated, I thought it made sense to simply work around the problems.
Diffstat (limited to 'gold/attributes.cc')
0 files changed, 0 insertions, 0 deletions