From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16366 invoked by alias); 3 Jun 2003 21:12:29 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 16313 invoked from network); 3 Jun 2003 21:12:28 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 3 Jun 2003 21:12:28 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 012EA2B2F; Tue, 3 Jun 2003 17:12:21 -0400 (EDT) Message-ID: <3EDD0F35.1040508@redhat.com> Date: Tue, 03 Jun 2003 21:12:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Theodore A. Roth" Cc: gdb@sources.redhat.com Subject: Re: DEPRECATED_REGISTER_BYTES and remote targets References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00039.txt.bz2 > Hi, > > In trying to remove deprecated gdbarch methods from the avr port, I've > got a problem with 'g' packets. > > In remote_fetch_registers(), the for loop that converts the target hex > reply to gdb native int uses rs->sizeof_g_packet as the loop stop > condition. > > Digging further, I see in init_remote_state() that the sizeof_g_packet > field is set to DEPRECATED_REGISTER_BYTES, but since I've removed it, > sizeof_g_packet is set to zero. > > Thus, my problem is that the target reply is never converted to an > integer and gdb reports that the PC is 0x30303030 instead of 0x0. Fun, > no? > > So, should I still set the DEPRECATED_REGISTER_BYTES method or is this > a bug in init_remote_state()? It's a bug in init_remote_state(). If !DEPRECATED_REGISTER_BYTES_P() it can be computed by accumulating the size of all registers. Andrew