This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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";

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]