From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7976 invoked by alias); 18 Feb 2011 18:56:20 -0000 Received: (qmail 7959 invoked by uid 22791); 18 Feb 2011 18:56:18 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Feb 2011 18:56:14 +0000 Received: (qmail 26234 invoked from network); 18 Feb 2011 18:56:12 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 Feb 2011 18:56:12 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: RFC: move agent opcodes to common file Date: Fri, 18 Feb 2011 19:11:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic; KDE/4.6.0; x86_64; ; ) Cc: Tom Tromey References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102181856.05577.pedro@codesourcery.com> 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: 2011-02/txt/msg00492.txt.bz2 Looks good to me. Hmm. I think it'd be a good idea to wrap the direct accesses to the gdb_agent_op_names array (there are a few `gdb_agent_op_names[op]' in the code, in a function that checks that "op" doesn't overflow the array length before dereferencing it, and returns "?undef?" or something like that if it does over- or underflow. It look like it'll happen if you connect a new gdb to an older gdbserver with --debug enabled, and send it the new opcodes. -- Pedro Alves