From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16739 invoked by alias); 23 Feb 2010 20:51:48 -0000 Received: (qmail 16714 invoked by uid 22791); 23 Feb 2010 20:51:47 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from imr2.ericy.com (HELO imr2.ericy.com) (198.24.6.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Feb 2010 20:51:42 +0000 Received: from eusaamw0706.eamcs.ericsson.se ([147.117.20.31]) by imr2.ericy.com (8.13.1/8.13.1) with ESMTP id o1NKrSKb018131; Tue, 23 Feb 2010 14:53:28 -0600 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.20]) by eusaamw0706.eamcs.ericsson.se ([147.117.20.31]) with mapi; Tue, 23 Feb 2010 15:51:24 -0500 From: Marc Khouzam To: "'tromey@redhat.com'" , "'Hui Zhu'" CC: "'gdb@sourceware.org'" Date: Wed, 24 Feb 2010 06:08:00 -0000 Subject: RE: How to set default value of yquery and nquery Message-ID: References: In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00162.txt.bz2 > -----Original Message----- > From: gdb-owner@sourceware.org=20 > [mailto:gdb-owner@sourceware.org] On Behalf Of Tom Tromey > Sent: Tuesday, February 23, 2010 12:14 PM > To: Hui Zhu > Cc: gdb@sourceware.org > Subject: Re: How to set default value of yquery and nquery >=20 > >>>>> ">" =3D=3D Hui Zhu writes: >=20 > >> A people want set a lot of command with .gdbinit, > >> He want set a breakpoint to a solib before load it. > >> He just got: > >> Function "www2" not defined. > >> Make breakpoint pending on future shared library load? (y or [n]) > >> [answered N; input not from terminal] >=20 > >> We can handle this issue with load solib before set=20 > breakpoint. But > >> does GDB have some ways to set default value with input not from > >> terminal? >=20 > In this particular case you can also use "set breakpoint pending". >=20 > I don't think there is a general facility for answering queries from a > script. This was my problem with Eclipse and PRecord. When a query is answered not from a terminal it always takes the the default=20 (N for nquery(), Y for for query() and yquery()). That is why we had to make PRecord use query() instead of nquery() For pending breakpoints you have "set breakpoint pending" that Tom mentions, but if anyone else uses nquery() (no one currently does), they would have to add their own optional setting. We discussed a bunch of ways to improve this when I had the problem. But the easiest fix was to not use nquery() :-) Marc