From patchwork Thu Oct 13 16:01:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinevere Larsen X-Patchwork-Id: 55216 From: blarsen@redhat.com (Bruno Larsen) Date: Thu, 13 Oct 2022 18:01:13 +0200 List-Id: gdb-patches mailing list Subject: [PATCH 0/2] Improve error messages with incomplete variables Message-ID: <20221013160114.4143323-1-blarsen@redhat.com> Currently, if a user attempts to call a C++ fuction by hand using an incomplete variable, GDB might be unable to find the correct overload, but the error message in this situation is not intuitive at all. This series attempts improve those messages with a hint. To create a reasonably reproducible test, I decided to use the DWARF assembler, but it needed some fixing to deal with C++ mangled names, so the first patch happened. Bruno Larsen (2): gdb/testsuite: allowed for function_range to deal with mangled functions gdb/c++: Improve error messages in overload resolution .../gdb.cp/incomplete-type-overload.cc | 45 +++++ .../gdb.cp/incomplete-type-overload.exp | 183 ++++++++++++++++++ gdb/testsuite/lib/dwarf.exp | 12 ++ gdb/valops.c | 49 ++++- 4 files changed, 285 insertions(+), 4 deletions(-) create mode 100644 gdb/testsuite/gdb.cp/incomplete-type-overload.cc create mode 100644 gdb/testsuite/gdb.cp/incomplete-type-overload.exp