public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Improve error messages with incomplete variables
@ 2022-11-04 15:47 Bruno Larsen
  2022-11-04 15:47 ` [PATCH v2 1/2] gdb/testsuite: allowed for function_range to deal with mangled functions Bruno Larsen
  2022-11-04 15:47 ` [PATCH v2 2/2] gdb/c++: Improve error messages in overload resolution Bruno Larsen
  0 siblings, 2 replies; 11+ messages in thread
From: Bruno Larsen @ 2022-11-04 15:47 UTC (permalink / raw)
  To: gdb-patches; +Cc: Bruno Larsen

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

-- 
2.37.3


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-11-10 15:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04 15:47 [PATCH v2 0/2] Improve error messages with incomplete variables Bruno Larsen
2022-11-04 15:47 ` [PATCH v2 1/2] gdb/testsuite: allowed for function_range to deal with mangled functions Bruno Larsen
2022-11-09 17:15   ` Tom Tromey
2022-11-10 11:41     ` Bruno Larsen
2022-11-10 13:44       ` Tom Tromey
2022-11-10 13:52         ` Bruno Larsen
2022-11-04 15:47 ` [PATCH v2 2/2] gdb/c++: Improve error messages in overload resolution Bruno Larsen
2022-11-09 17:47   ` Tom Tromey
2022-11-10 15:19   ` Simon Marchi
2022-11-10 15:29     ` Bruno Larsen
2022-11-10 15:45       ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).