From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16120 invoked by alias); 16 Sep 2009 23:36:08 -0000 Received: (qmail 16112 invoked by uid 22791); 16 Sep 2009 23:36:07 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f177.google.com (HELO mail-px0-f177.google.com) (209.85.216.177) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Sep 2009 23:36:02 +0000 Received: by pxi7 with SMTP id 7so4117306pxi.18 for ; Wed, 16 Sep 2009 16:36:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.59.6 with SMTP id h6mr711818wfa.25.1253144161101; Wed, 16 Sep 2009 16:36:01 -0700 (PDT) In-Reply-To: References: <200909161425.48262.pedro@codesourcery.com> From: Hui Zhu Date: Wed, 16 Sep 2009 23:36:00 -0000 Message-ID: Subject: Re: Another proposal for frontends and queries. To: tromey@redhat.com Cc: Marc Khouzam , Pedro Alves , "gdb-patches@sourceware.org" , Joel Brobecker , Michael Snyder Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2009-09/txt/msg00547.txt.bz2 On Thu, Sep 17, 2009 at 02:02, Tom Tromey wrote: >>>>>> ">" =3D=3D Hui Zhu writes: > >>> And about the patch I said can handle this issue is "set record query >>> " patch. =A0I cannot find who don't like this patch. > > I don't like it, I think I said that in another thread. > > The reason I don't like it is twofold. > > First, queries are a general feature of gdb. =A0They are sprinkled about > rather liberally. =A0So, if one causes problems for a front end, then it > probably represents a general class of problems. =A0IMO, fixing it in this > ad hoc way is not a good way to attack a generic problem. > > The thought experiment to perform here is to consider generalizing this > solution to all the queries in gdb. =A0I think that would result in > madness: hundreds of "disable this query" settings. > > Second, this has the feeling of an "unbreak my gdb" option. =A0That is, > setting an option to avoid one particular query says to me that the > query is probably badly chosen in some way. > Sorry I didn't get the mean of "It seems like a strange approach to me." first time. Now, I got it. One day, I try to debug a big program with GDB prec. I don't know why it get something wrong. It get bug only after exec a long time. And prec will make inferior exec slow (I design dump and skip to make it fast). So I enter "record" and "c" command in GDB and go to bed. In the next morning, I open the LCD and want see what happen. I found that GDB is broken by a query. :( That is why I like "set rec query off". It will not be a only switch. It will include a lot of switches for each query. For the advanced user, he can set each switch and then set rec query off. Then he can let GDB unbreak record a long time, and come back to use replay debug find what happen. That is why I think "set prec query off" is not bad. Thanks, Hui