Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/6] Make SELF_CHECK print operands of comparisons
@ 2026-10-19 16:58 Simon Marchi
  2026-10-19 16:58 ` [PATCH 1/6] gdb/unittests: catch gdb_exception_error in scoped_mmap test Simon Marchi
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Simon Marchi @ 2026-10-19 16:58 UTC (permalink / raw)
  To: gcc-patches, gdb-patches; +Cc: Simon Marchi

Tom mentioned [1] how it would be nice to have a SELF_CHECK variant that
took operands as separate arguments and printed them when the comparison
failed.  Some test frameworks like catch2 are actually able to decompose
some expressions passed to the test macro to achieve this automatically.
This series implements the same concept but for GDB's own SELF_CHECK
macro.

[1] https://inbox.sourceware.org/gdb-patches/20261005052602.1288766-1-simon.marchi@polymtl.ca/T/#mef6ee3be132da2d69d3ea22e6182d259f91503a9

Simon Marchi (6):
  gdb/unittests: catch gdb_exception_error in scoped_mmap test
  gdbsupport/selftest: print expression when selftest fails and
    re-format
  include/diagnostics.h: add DIAGNOSTIC_IGNORE_PARENTHESES
  gdb/gmp-utils: rename gdb_mp{z,q,f}::str to to_string
  gdbsupport/selftest: print operand values when a SELF_CHECK fails
  gdb: remove manual printing of values in some selftests

 gdb/aarch64-tdep.c                            |  38 +-
 gdb/ada-typeprint.c                           |   2 +-
 gdb/arm-tdep.c                                |   4 +-
 gdb/cp-name-parser.c                          |   2 +-
 gdb/disasm-selftests.c                        |  11 +-
 gdb/dwarf2/frame.c                            |   2 +-
 gdb/expprint.c                                |   3 +-
 gdb/gdbtypes.c                                |   2 +-
 gdb/gmp-utils.c                               |  10 +-
 gdb/gmp-utils.h                               |  12 +-
 gdb/memrange.h                                |   7 +
 gdb/producer.c                                |  33 +-
 gdb/regcache.c                                |   6 +-
 gdb/rust-parse.c                              |   2 +-
 gdb/selftest-arch.c                           |   2 +-
 gdb/source-cache.c                            |  12 +-
 gdb/split-name.c                              |  28 -
 gdb/typeprint.c                               |   2 +-
 gdb/unittests/array-view-selftests.c          |   5 +
 gdb/unittests/environ-selftests.c             |  32 +-
 gdb/unittests/frame_info_ptr-selftests.c      |   2 +-
 gdb/unittests/function-view-selftests.c       |   4 +-
 gdb/unittests/remote-arg-selftests.c          |  65 +--
 gdb/unittests/scoped_fd-selftests.c           |   8 +-
 .../scoped_ignore_signal-selftests.c          |   7 +-
 gdb/unittests/scoped_mmap-selftests.c         |  17 +-
 gdb/unittests/style-selftests.c               |  10 +-
 gdb/utils.c                                   |   4 +-
 gdb/valprint.c                                |   2 +-
 gdbserver/server.cc                           |  19 +-
 gdbsupport/common-exceptions.h                |   3 +
 gdbsupport/selftest.cc                        |  88 ++-
 gdbsupport/selftest.h                         | 545 +++++++++++++++++-
 include/diagnostics.h                         |   8 +
 34 files changed, 800 insertions(+), 197 deletions(-)


base-commit: ec9be4b35cf367e6ffa0d5881fb20e60c68e2f89
-- 
2.56.0


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

end of thread, other threads:[~2026-10-27 17:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-19 16:58 [PATCH 0/6] Make SELF_CHECK print operands of comparisons Simon Marchi
2026-10-19 16:58 ` [PATCH 1/6] gdb/unittests: catch gdb_exception_error in scoped_mmap test Simon Marchi
2026-10-19 16:58 ` [PATCH 2/6] gdbsupport/selftest: print expression when selftest fails and re-format Simon Marchi
2026-10-19 16:58 ` [PATCH 3/6] include/diagnostics.h: add DIAGNOSTIC_IGNORE_PARENTHESES Simon Marchi
2026-10-19 16:58 ` [PATCH 4/6] gdb/gmp-utils: rename gdb_mp{z,q,f}::str to to_string Simon Marchi
2026-10-19 16:58 ` [PATCH 5/6] gdbsupport/selftest: print operand values when a SELF_CHECK fails Simon Marchi
2026-10-27 14:13   ` Tom Tromey
2026-10-27 17:06     ` Simon Marchi
2026-10-19 16:58 ` [PATCH 6/6] gdb: remove manual printing of values in some selftests Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox