[0/5] Implement Ada Pragma Import and Pragma Export

Message ID 20230314-submit-pragma-import-export-v1-0-a235709f7e96@adacore.com
Headers
Series Implement Ada Pragma Import and Pragma Export |

Message

Tom Tromey March 14, 2023, 8:04 p.m. UTC
  This adds better support to GDB for Ada's import and export feature.
There are some minor cleanups to start with, then the bulk of the
feature in the last patch, which I think should be reasonably
self-explanatory.

Regression tested on x86-64 Fedora 36.  It's also been running in the
AdaCore internal test suite for a while.

Tom

---
Tom Tromey (5):
      Introduce lookup_minimal_symbol_linkage
      Bump MAX_SYMBOL_IMPLS
      Define symbol::value_block separately
      Introduce symbol_block_ops::get_block_value
      Handle Ada Pragma Import and Pragma Export

 gdb/Makefile.in                          |   1 +
 gdb/dwarf2/ada-imported.c                | 122 +++++++++++++++++++++++++++++
 gdb/dwarf2/loc.h                         |   2 +
 gdb/dwarf2/read.c                        | 128 +++++++++++++++++++++++++++++++
 gdb/minsyms.c                            |  22 ++++++
 gdb/minsyms.h                            |   8 ++
 gdb/symtab.c                             |  36 +++------
 gdb/symtab.h                             |  20 ++++-
 gdb/testsuite/gdb.ada/complete.exp       |   2 +
 gdb/testsuite/gdb.ada/complete/pck.ads   |   4 +-
 gdb/testsuite/gdb.ada/import.exp         |  58 ++++++++++++++
 gdb/testsuite/gdb.ada/import/inc.c       |  27 +++++++
 gdb/testsuite/gdb.ada/import/pkg.adb     |  28 +++++++
 gdb/testsuite/gdb.ada/import/pkg.ads     |  33 ++++++++
 gdb/testsuite/gdb.ada/import/prog.adb    |  31 ++++++++
 gdb/testsuite/gdb.ada/info_auto_lang.exp |  10 ++-
 16 files changed, 499 insertions(+), 33 deletions(-)
---
base-commit: d0aa28e155baf16ec37afdf0193c3d58816c1927
change-id: 20230314-submit-pragma-import-export-c38bb4077953

Best regards,
  

Comments

Tom Tromey March 29, 2023, 4:10 p.m. UTC | #1
>>>>> "Tom" == Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> writes:

Tom> This adds better support to GDB for Ada's import and export feature.
Tom> There are some minor cleanups to start with, then the bulk of the
Tom> feature in the last patch, which I think should be reasonably
Tom> self-explanatory.

Tom> Regression tested on x86-64 Fedora 36.  It's also been running in the
Tom> AdaCore internal test suite for a while.

Another AdaCore employee found a problem when debugging the GNAT front
end that I think was caused by this series, so I'm going to hold off
checking it in until that is found & fixed.

Tom