Handle Ada Pragma Import and Pragma Export
authorTom Tromey <tromey@adacore.com>
Fri, 16 Dec 2022 20:36:45 +0000 (13:36 -0700)
committerTom Tromey <tromey@adacore.com>
Fri, 12 May 2023 19:25:28 +0000 (13:25 -0600)
commitd5acae9e9f16521e1d9886f74418cd2e48f01364
tree1adec256dadc28425b89160d07818be015040399
parent36ed3d84e0ac1b6f21e68c742d72061ff51cb76b
Handle Ada Pragma Import and Pragma Export

Ada can import C APIs and also export Ada constructs to C via Pragma
Import and Pragma Export.  This patch adds support for these to gdb,
by arranging to either defer some aspects of a symbol to the
underlying C symbol (for Import) or by introducing a second symbol
(for Export).  A somewhat tricky approach is needed, both because gdb
doesn't generally handle symbol aliasing, and because Ada treats
symbol names in an unusual way (as compared to the rest of gdb).
12 files changed:
gdb/Makefile.in
gdb/dwarf2/ada-imported.c [new file with mode: 0644]
gdb/dwarf2/loc.h
gdb/dwarf2/read.c
gdb/testsuite/gdb.ada/complete.exp
gdb/testsuite/gdb.ada/complete/pck.ads
gdb/testsuite/gdb.ada/import.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/import/inc.c [new file with mode: 0644]
gdb/testsuite/gdb.ada/import/pkg.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/import/pkg.ads [new file with mode: 0644]
gdb/testsuite/gdb.ada/import/prog.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/info_auto_lang.exp