From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15735 invoked by alias); 5 Dec 2011 21:27:16 -0000 Received: (qmail 15724 invoked by uid 22791); 5 Dec 2011 21:27:15 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Dec 2011 21:27:02 +0000 Received: by vcbfk26 with SMTP id fk26so5067779vcb.0 for ; Mon, 05 Dec 2011 13:27:01 -0800 (PST) Received: by 10.220.228.200 with SMTP id jf8mr1320603vcb.105.1323120421800; Mon, 05 Dec 2011 13:27:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.228.200 with SMTP id jf8mr1320591vcb.105.1323120421475; Mon, 05 Dec 2011 13:27:01 -0800 (PST) Received: by 10.220.97.211 with HTTP; Mon, 5 Dec 2011 13:27:01 -0800 (PST) In-Reply-To: <20111205201553.GA22427@host2.jankratochvil.net> References: <201110271909.37066.pedro@codesourcery.com> <20111028174014.GB18885@host1.jankratochvil.net> <201110281917.44839.pedro@codesourcery.com> <20111029194745.GA12850@host1.jankratochvil.net> <20111203183613.GA15496@host2.jankratochvil.net> <20111204012935.GA4034@host2.jankratochvil.net> <20111205201553.GA22427@host2.jankratochvil.net> Date: Mon, 05 Dec 2011 21:44:00 -0000 Message-ID: Subject: Re: ping: Re: [patch] Forbid "run" etc. for use_gdb_stub targets From: Doug Evans To: Jan Kratochvil Cc: Pedro Alves , gdb-patches@sourceware.org, Kevin Pouget , Tom Tromey Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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-12/txt/msg00153.txt.bz2 On Mon, Dec 5, 2011 at 12:15 PM, Jan Kratochvil wrote: > On Sun, 04 Dec 2011 03:55:07 +0100, Doug Evans wrote: >> Poorly chosen names lead to confusion, bugs, and wasted time. >> [No claim is made that this is news. :-)] > > Just $use_gdb_stub is a different form of [target_info exists use_gdb_stu= b] so > no matter what the name is IMO it is correct the name is the same. > > And one cannot change use_gdb_stub in the board file for board files back= ward > compatibility. I realize that. grep use_gdb_stub /usr/share/dejagnu/baseboards/*.exp. ref: http://sourceware.org/ml/gdb-patches/2011-12/msg00048.html I was suggesting either a layer of abstraction and/or have gdbserver set something with a more meaningful name, and use the more meaningful name in contexts where we currently use use_gdb_stubs. [btw, once gdb_stubs is gone, I think we should also remove (at least in name) use_gdb_stubs, at least within gdb. Otherwise we're not finishing the job of cleaning things up.] >> Plus, there's no reason why, for example, gdb_start_cmd can't work >> with target remote and gdbserver. > > It does not work with non-extended gdbserver - which has use_gdb_stub =3D= =3D 1. > Also my change did not change it: > - =A0 =A0if [target_info exists use_gdb_stub] { > + =A0 =A0if $use_gdb_stub { > (gdb) target remote localhost:1234 > Remote debugging using localhost:1234 > [...] > (gdb) start > The "remote" target does not support "run". =A0Try "help target" or "cont= inue". I realize "target remote" doesn't support "start". What I meant was there's no reason why gdb_start_cmd couldn't do something like the following for non-extended-remote gdbserver: tbreak main continue > > It works with extended gdbserver - which has use_gdb_stub =3D=3D 0. > > I do not see the problem you describe. > > > Thanks, > Jan >