Re: [PATCH 0/9] Fix most -fgnat-encodings=minimal failures

Tom de Vries
2020-11-04T16:33:27Z

On 11/4/20 4:49 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:
>
> Tom> GNAT has two debuginfo modes -- the default, which is to emit "GNAT
> Tom> encodings", and -fgnat-encodings=minimal, which emits something closer
> Tom> to pure DWARF.
>
> Tom> Historically gdb has only handled GNAT encodings. This patch series
> Tom> brings gdb most of the way to handling -fgnat-encodings=minimal. The
> Tom> remaining issues are going to require some patches to GNAT and gdb; my
> Tom> plan is to only land the gdb changes once the GNAT changes have gone
> Tom> in.
>
> Tom> Patches #2 - #9 were all reviewed internally by Joel. However, they
> Tom> aren't all purely Ada-specific. (Patch #1 is new, written while I was
> Tom> prepping this series -- see the comments there.)
>
> Tom> For gdb itself, the benefit of these changes is that with
> Tom> minimal-encodings, the Ada type system works more like the rest of
> Tom> gdb. For users the main benefit is that the Python API works more
> Tom> nicely.
>
> I'm checking these in now.

With a build from commit d8f62e8447 "Recognize names of array types", I get:
...
FAIL: gdb.ada/array_of_variant.exp: scenario=minimal: print entire array
FAIL: gdb.ada/array_of_variant.exp: scenario=minimal: print first array
element
FAIL: gdb.ada/array_of_variant.exp: scenario=minimal: print first array
slice
FAIL: gdb.ada/big_packed_array.exp: scenario=minimal: print bad
KPASS: gdb.ada/enum_idx_packed.exp: scenario=minimal: ptype small (PRMS
minimal encodings)
KPASS: gdb.ada/enum_idx_packed.exp: scenario=minimal: print small (PRMS
minimal encodings)
KPASS: gdb.ada/enum_idx_packed.exp: scenario=minimal: print small'first
(PRMS minimal encodings)
KPASS: gdb.ada/enum_idx_packed.exp: scenario=minimal: ptype multi (PRMS
minimal encodings)
KPASS: gdb.ada/enum_idx_packed.exp: scenario=minimal: print multi (PRMS
minimal encodings)
KPASS: gdb.ada/enum_idx_packed.exp: scenario=minimal: print multi'first
(PRMS minimal encodings)
KPASS: gdb.ada/enum_idx_packed.exp: scenario=minimal: print multi_multi
(PRMS minimal encodings)
KPASS: gdb.ada/enum_idx_packed.exp: scenario=minimal: print
multi_multi(1,3) (PRMS minimal encodings)
KPASS: gdb.ada/enum_idx_packed.exp: scenario=minimal: print
multi_multi(2) (PRMS minimal encodings)
KPASS: gdb.ada/mod_from_name.exp: scenario=minimal: print xp (PRMS
minimal encodings)
KPASS: gdb.ada/pckd_arr_ren.exp: scenario=minimal: print var (PRMS
minimal encodings)
...

Thanks,
- Tom