Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
To: gdb-patches@sourceware.org
Subject: [PATCH ARM] Fix unterminated list of options to 'set arm fallback-mode' and 'set arm force-mode'
Date: Mon, 11 Oct 2010 16:30:00 -0000	[thread overview]
Message-ID: <1286814631.21020.10.camel@e102319-lin.cambridge.arm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

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

[-- Attachment #2: 1010-gdb-missing-null.patch --]
[-- Type: text/x-patch, Size: 307 bytes --]

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

             reply	other threads:[~2010-10-11 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11 16:30 Matthew Gretton-Dann [this message]
2010-10-11 16:40 ` Daniel Jacobowitz
2010-10-12  8:47   ` Matthew Gretton-Dann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286814631.21020.10.camel@e102319-lin.cambridge.arm.com \
    --to=matthew.gretton-dann@arm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox