From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11724 invoked by alias); 11 Oct 2010 16:30:48 -0000 Received: (qmail 11699 invoked by uid 22791); 11 Oct 2010 16:30:44 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cam-admin0.cambridge.arm.com (HELO cam-admin0.cambridge.arm.com) (217.140.96.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Oct 2010 16:30:34 +0000 Received: from cam-owa2.Emea.Arm.com (cam-owa2.emea.arm.com [10.1.105.18]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id o9BGQkF9017608 for ; Mon, 11 Oct 2010 17:26:46 +0100 (BST) Received: from [10.1.77.49] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); 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' From: Matthew Gretton-Dann To: gdb-patches@sourceware.org Content-Type: multipart/mixed; boundary="=-cTbeqweAwicsXvM8mlWN" Date: Mon, 11 Oct 2010 16:30:00 -0000 Message-ID: <1286814631.21020.10.camel@e102319-lin.cambridge.arm.com> Mime-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00183.txt.bz2 --=-cTbeqweAwicsXvM8mlWN Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Content-length: 510 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 * arm-tdep.c (arm_mode_strings): Add NULL entry at end of array. -- Matthew Gretton-Dann Principal Engineer - PDSW Tools ARM Ltd --=-cTbeqweAwicsXvM8mlWN Content-Disposition: attachment; filename="1010-gdb-missing-null.patch" Content-Type: text/x-patch; name="1010-gdb-missing-null.patch"; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Content-length: 307 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"; --=-cTbeqweAwicsXvM8mlWN--