[PATCH 0/6] Fix printing macros
Simon Marchi
simon.marchi@polymtl.ca
Thu Apr 7 01:51:53 GMT 2022
This series fixes some problems with printing macros in the main source
file. Depending on how the source file path was specified on the
compiler command line, it may or may not work. More details about that
in patch 5. Patches before that are preparatory, and patch 6 adds some
tests.
Simon Marchi (6):
gdb/testsuite/dwarf: remove two unused variables
gdb/testsuite/dwarf: simplify line number program syntax
gdb/testsuite/dwarf: don't automatically add directory and file entry
for DWARF 5
gdb/testsuite: add "macros" option to gdb_compile
gdb: prepend comp_dir to symtab name in buildsym_compunit
gdb/testsuite: add macros test for source files compiled in various
ways
gdb/buildsym.c | 15 +
gdb/dwarf2/line-header.h | 5 +-
gdb/testsuite/gdb.base/info-macros.exp | 14 +-
gdb/testsuite/gdb.base/macro-source-path.c | 22 ++
gdb/testsuite/gdb.base/macro-source-path.exp | 79 +++++
gdb/testsuite/gdb.base/macscp.exp | 11 +-
gdb/testsuite/gdb.base/style.exp | 23 +-
.../gdb.base/until-trailing-insns.exp | 58 ++--
gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp | 28 +-
.../gdb.dwarf2/dw2-disasm-over-non-stmt.exp | 56 ++--
.../gdb.dwarf2/dw2-inline-header-1.exp | 70 ++--
.../gdb.dwarf2/dw2-inline-header-2.exp | 66 ++--
.../gdb.dwarf2/dw2-inline-header-3.exp | 66 ++--
.../gdb.dwarf2/dw2-inline-many-frames.exp | 168 +++++-----
.../gdb.dwarf2/dw2-inline-small-func.exp | 34 +-
.../gdb.dwarf2/dw2-inline-stepping.exp | 46 +--
.../dw2-inline-with-lexical-scope.exp | 28 +-
gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp | 156 ++++-----
gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp | 58 ++--
.../gdb.dwarf2/dw2-line-number-zero.exp | 60 ++--
gdb/testsuite/gdb.dwarf2/dw2-lines.exp | 37 ++-
.../gdb.dwarf2/dw2-objfile-overlap.exp | 2 +-
.../dw2-out-of-range-end-of-seq.exp | 20 +-
gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp | 39 +--
gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp | 46 +--
gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp | 120 +++----
.../dw2-step-out-of-function-no-stmt.exp | 36 +--
.../gdb.dwarf2/dw2-symtab-includes-lookup.exp | 2 +-
.../gdb.dwarf2/dw2-symtab-includes.exp | 2 +-
.../gdb.dwarf2/dw2-vendor-extended-opcode.exp | 14 +-
gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp | 64 ++--
.../gdb.dwarf2/imported-unit-bp.exp.tcl | 50 +--
.../locexpr-data-member-location.exp | 50 +--
gdb/testsuite/gdb.dwarf2/macro-source-path.c | 20 ++
.../gdb.dwarf2/macro-source-path.exp | 299 ++++++++++++++++++
gdb/testsuite/gdb.linespec/macro-relative.exp | 9 +-
gdb/testsuite/lib/dwarf.exp | 148 ++++++---
gdb/testsuite/lib/gdb.exp | 13 +
38 files changed, 1260 insertions(+), 774 deletions(-)
create mode 100644 gdb/testsuite/gdb.base/macro-source-path.c
create mode 100644 gdb/testsuite/gdb.base/macro-source-path.exp
create mode 100644 gdb/testsuite/gdb.dwarf2/macro-source-path.c
create mode 100644 gdb/testsuite/gdb.dwarf2/macro-source-path.exp
base-commit: 5f0b6b77f11ca1484b69babd7ab6729ebbc447ee
--
2.35.1
More information about the Gdb-patches
mailing list