From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15674 invoked by alias); 23 Nov 2008 22:12:30 -0000 Received: (qmail 15595 invoked by uid 22791); 23 Nov 2008 22:12:29 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 23 Nov 2008 22:11:54 +0000 Received: (qmail 26647 invoked from network); 23 Nov 2008 22:10:43 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Nov 2008 22:10:43 -0000 From: Pedro Alves To: Daniel Jacobowitz Subject: Re: RFC: Do not try g-packet-guess algorithm on exited targets Date: Mon, 24 Nov 2008 14:49:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org, dgraham@nortel.com References: <20081123211454.GA17391@caradoc.them.org> In-Reply-To: <20081123211454.GA17391@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200811232211.59013.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: 2008-11/txt/msg00627.txt.bz2 On Sunday 23 November 2008 21:14:54, Daniel Jacobowitz wrote: > =A0static const struct target_desc * > =A0remote_read_description (struct target_ops *target) > =A0{ > + =A0struct remote_state *rs =3D get_remote_state (); > =A0 =A0struct remote_g_packet_data *data > =A0 =A0 =A0=3D gdbarch_data (target_gdbarch, remote_g_packet_data_handle); > =A0 > + =A0/* Do not try this during initial connection. =A0*/ > + =A0if (rs->tdesc_no_register_access) > + =A0 =A0return NULL; > + Is this new flag working around that fact that remote_open_1 does this? /* Assume that the target is running, unless we learn otherwise. */ target_mark_running (target); If we change the logic around to: /* Assume that the target is not running, unless we learn otherwise. */ if (extended_p) target_mark_exited (target); Then would this in remote_read_description work instead of a new flag? > + /* Do not try this during initial connection. */ > + if (!target_has_execution || ptid_equal (inferior_ptid, null_ptid)) > + return NULL; (or just null_ptid). I've done that change locally just a few days ago because I found out that the bit in remote_start_remote that does: if (gdbarch_has_global_solist (target_gdbarch)) solib_add (NULL, args->from_tty, args->target, auto_solib_add); also ended up trying to do things to a non-existant inferior due to target_has_execution being true while that is a lie in the=20 'extended-remote without an inferior yet' case. --=20 Pedro Alves