binutils-gdb/gdb/testsuite/gdb.linespec
Simon Marchi 9be5d742db gdb/testsuite: add "macros" option to gdb_compile
Make gdb_compile handle a new "macros" option, which makes it pass the
appropriate flag to make the compiler include macro information in the
debug info.  This will help simplify tests using macros, reduce
redundant code, and make it easier to add support for a new compiler.

Right now it only handles clang specially (using -fdebug-macro) and
falls back to -g3 otherwise (which works for gcc).  Other compilers can
be added as needed.

There are some tests that are currently skipped if the compiler is nor
gcc nor clang.  After this patch, the tests will attempt to run (the -g3
fall back will be used).  That gives a chance to people using other
compilers to notice something is wrong and maybe add support for their
compiler.  If it is needed to support a compiler that doesn't have a way
to include macro information, then we can always introduce a
"skip_macro_tests" that can be used to skip over them.

Change-Id: I50cd6ab1bfbb478c1005486408e214b551364c9b
2022-04-07 14:41:28 -04:00
..
base
3explicit.c
body.h
break-ask.exp
break-asm-file0.s
break-asm-file1.s
break-asm-file.c
break-asm-file.exp
cp-completion-aliases.cc
cp-completion-aliases.exp
cp-replace-typedefs-ns-template.cc
cp-replace-typedefs-ns-template.exp
cpcompletion.exp
cpexplicit.cc
cpexplicit.exp
cpls2.cc
cpls-abi-tag.cc
cpls-abi-tag.exp
cpls-hyphen.cc
cpls-ops.cc
cpls-ops.exp
cpls.cc
errors.exp
explicit2.c
explicit.c
explicit.exp
keywords.c
keywords.exp
linespec.exp
ls-dollar.cc
ls-dollar.exp
ls-errs.c
ls-errs.exp
lspec.cc
lspec.h
macro-relative.c
macro-relative.exp
skip-two.exp
thread.c
thread.exp