This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH ARM] Fix unterminated list of options to 'set arm fallback-mode' and 'set arm force-mode'
- From: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 11 Oct 2010 17:30:31 +0100
- Subject: [PATCH ARM] Fix unterminated list of options to 'set arm fallback-mode' and 'set arm force-mode'
All,
The attached patch adds a NULL entry at the end of the array of options
accepted by 'set arm fallback-mode' and 'set arm force-mode'. Thus
ensuring GDB doesn't go wandering off trying to print garbage from
beyond the end of an array.
Can someone please review and approve?
Thanks,
Matt
gdb/ChangeLog:
2010-10-11 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* arm-tdep.c (arm_mode_strings): Add NULL entry at end of array.
--
Matthew Gretton-Dann
Principal Engineer - PDSW Tools
ARM Ltd
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 19b9c85..5b32b8a 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -124,7 +124,8 @@ static const char *arm_mode_strings[] =
{
"auto",
"arm",
- "thumb"
+ "thumb",
+ NULL
};
static const char *arm_fallback_mode_string = "auto";