[gcc(refs/users/meissner/heads/work269)] Add -mdebug=extra1 through -mdebug=extra5
Michael Meissner
meissner@gcc.gnu.org
Thu Oct 22 05:08:22 GMT 2026
https://gcc.gnu.org/g:27244e8e822129a6d8fa5b617ba054a7ed90557d
commit 27244e8e822129a6d8fa5b617ba054a7ed90557d
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Thu Oct 22 01:08:04 2026 -0400
Add -mdebug=extra1 through -mdebug=extra5
We've had various -mdebug=<xxx> options for some time. This patch adds several
debug options that developers can use without adding their own debug options.
2026-10-22 Michael Meissner <meissner@linux.ibm.com>
* common/config/rs6000/rs6000rcommon.cc (rs6000_handle_option): Add
support for -mdebug=estra{1,2,3,4,5}.
* config/rs6000/rs6000.h (MASK_DEBUG_*): Likewise.
(TARGET_DEBUG_*): Likewise.
Diff:
---
gcc/common/config/rs6000/rs6000-common.cc | 10 +++++++
gcc/config/rs6000/rs6000.h | 43 +++++++++++++++++++++----------
2 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/gcc/common/config/rs6000/rs6000-common.cc b/gcc/common/config/rs6000/rs6000-common.cc
index 5be6fd804351..8a774ce91e54 100644
--- a/gcc/common/config/rs6000/rs6000-common.cc
+++ b/gcc/common/config/rs6000/rs6000-common.cc
@@ -171,6 +171,16 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
mask = MASK_DEBUG_TARGET;
else if (! strcmp (q, "builtin"))
mask = MASK_DEBUG_BUILTIN;
+ else if (! strcmp (q, "extra1"))
+ mask = MASK_DEBUG_EXTRA1;
+ else if (! strcmp (q, "extra2"))
+ mask = MASK_DEBUG_EXTRA2;
+ else if (! strcmp (q, "extra3"))
+ mask = MASK_DEBUG_EXTRA3;
+ else if (! strcmp (q, "extra4"))
+ mask = MASK_DEBUG_EXTRA4;
+ else if (! strcmp (q, "extra5"))
+ mask = MASK_DEBUG_EXTRA5;
else
error_at (loc, "unknown %<-mdebug-%s%> switch", q);
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 98952f111892..f2559930d98e 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -295,20 +295,30 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#define ASSEMBLER_DIALECT 1
/* Debug support */
-#define MASK_DEBUG_STACK 0x01 /* debug stack applications */
-#define MASK_DEBUG_ARG 0x02 /* debug argument handling */
-#define MASK_DEBUG_REG 0x04 /* debug register handling */
-#define MASK_DEBUG_ADDR 0x08 /* debug memory addressing */
-#define MASK_DEBUG_COST 0x10 /* debug rtx codes */
-#define MASK_DEBUG_TARGET 0x20 /* debug target attribute/pragma */
-#define MASK_DEBUG_BUILTIN 0x40 /* debug builtins */
-#define MASK_DEBUG_ALL (MASK_DEBUG_STACK \
- | MASK_DEBUG_ARG \
- | MASK_DEBUG_REG \
- | MASK_DEBUG_ADDR \
- | MASK_DEBUG_COST \
- | MASK_DEBUG_TARGET \
- | MASK_DEBUG_BUILTIN)
+#define MASK_DEBUG_STACK 0x001 /* debug stack applications */
+#define MASK_DEBUG_ARG 0x002 /* debug argument handling */
+#define MASK_DEBUG_REG 0x004 /* debug register handling */
+#define MASK_DEBUG_ADDR 0x008 /* debug memory addressing */
+#define MASK_DEBUG_COST 0x010 /* debug rtx codes */
+#define MASK_DEBUG_TARGET 0x020 /* debug target attribute/pragma */
+#define MASK_DEBUG_BUILTIN 0x040 /* debug builtins */
+#define MASK_DEBUG_EXTRA1 0x080 /* random debug testing #1. */
+#define MASK_DEBUG_EXTRA2 0x100 /* random debug testing #2. */
+#define MASK_DEBUG_EXTRA3 0x200 /* random debug testing #3. */
+#define MASK_DEBUG_EXTRA4 0x400 /* random debug testing #4. */
+#define MASK_DEBUG_EXTRA5 0x800 /* random debug testing #5. */
+#define MASK_DEBUG_ALL (MASK_DEBUG_STACK \
+ | MASK_DEBUG_ARG \
+ | MASK_DEBUG_REG \
+ | MASK_DEBUG_ADDR \
+ | MASK_DEBUG_COST \
+ | MASK_DEBUG_TARGET \
+ | MASK_DEBUG_BUILTIN \
+ | MASK_DEBUG_EXTRA1 \
+ | MASK_DEBUG_EXTRA2 \
+ | MASK_DEBUG_EXTRA3 \
+ | MASK_DEBUG_EXTRA4 \
+ | MASK_DEBUG_EXTRA5)
#define TARGET_DEBUG_STACK (rs6000_debug & MASK_DEBUG_STACK)
#define TARGET_DEBUG_ARG (rs6000_debug & MASK_DEBUG_ARG)
@@ -317,6 +327,11 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#define TARGET_DEBUG_COST (rs6000_debug & MASK_DEBUG_COST)
#define TARGET_DEBUG_TARGET (rs6000_debug & MASK_DEBUG_TARGET)
#define TARGET_DEBUG_BUILTIN (rs6000_debug & MASK_DEBUG_BUILTIN)
+#define TARGET_DEBUG_EXTRA1 (rs6000_debug & MASK_DEBUG_EXTRA1)
+#define TARGET_DEBUG_EXTRA2 (rs6000_debug & MASK_DEBUG_EXTRA2)
+#define TARGET_DEBUG_EXTRA3 (rs6000_debug & MASK_DEBUG_EXTRA3)
+#define TARGET_DEBUG_EXTRA4 (rs6000_debug & MASK_DEBUG_EXTRA4)
+#define TARGET_DEBUG_EXTRA5 (rs6000_debug & MASK_DEBUG_EXTRA5)
/* Helper macros for TFmode. Quad floating point (TFmode) can be either IBM
long double format that uses a pair of doubles, or IEEE 128-bit floating
More information about the Gcc-cvs
mailing list