[v2,0/2] Improve error messages with incomplete variables

Message ID 20221104154744.418906-1-blarsen@redhat.com
Headers
Series Improve error messages with incomplete variables |

Message

Guinevere Larsen Nov. 4, 2022, 3:47 p.m. UTC
  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.

Changes for v2:
 * Used Andrew's suggestion for patch 1
 * Styling changes to code
 * Factored new code into a static function

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                   |   2 +-
 gdb/valops.c                                  |  53 ++++-
 4 files changed, 278 insertions(+), 5 deletions(-)
 create mode 100644 gdb/testsuite/gdb.cp/incomplete-type-overload.cc
 create mode 100644 gdb/testsuite/gdb.cp/incomplete-type-overload.exp