From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9679 invoked by alias); 29 Mar 2012 20:58:05 -0000 Received: (qmail 9668 invoked by uid 22791); 29 Mar 2012 20:58:04 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,T_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; Thu, 29 Mar 2012 20:57:51 +0000 Received: by vcbfk14 with SMTP id fk14so2242033vcb.0 for ; Thu, 29 Mar 2012 13:57:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=5s7Fe6AF7rbZYjucCT7FYiDJZ3FGDtTwgKvuIxD/9/Y=; b=SxjRH9OlLbPSHf/ZzsIlVVsq9AN2a2VBRdyyOUh2DH+rH2G+BP6AqOdFDipATdX0HM I1R0QrMcHO5XfwYRDAH7RfRckGHpNEPIBxhb2lwHZ6C/3TndvtSnHvdMe0V2TcU6wvft SMRo2NxqWiEkNJ0G/Q6nQHuBudqh6/kEPaE5pI7QU0zfdlP5M3GV7a3dopQzpMxCVIoG 2ALy8gnLt7MgmTQBnsjs8I83mjhEwdbZmTb2SdGHRaWmk3y5N76qWAncnARPlzwpr8Fm QBz/RNjVxtWBeRX6Cc2FDOUb1gqDuXOmF/xcMIF9PM7b+lHzyS0i71AQoyGobeiH/RJO pwXQ== Received: by 10.52.98.200 with SMTP id ek8mr13997891vdb.36.1333054671004; Thu, 29 Mar 2012 13:57:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.98.200 with SMTP id ek8mr13997885vdb.36.1333054670942; Thu, 29 Mar 2012 13:57:50 -0700 (PDT) Received: by 10.220.73.14 with HTTP; Thu, 29 Mar 2012 13:57:50 -0700 (PDT) In-Reply-To: <20120329091258.GD25449@host2.jankratochvil.net> References: <20120329091258.GD25449@host2.jankratochvil.net> Date: Thu, 29 Mar 2012 20:58:00 -0000 Message-ID: Subject: Re: [patch#2 3/6] set auto-load local-gdbinit warn-and-* From: Doug Evans To: Jan Kratochvil Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQkBN+/XTf/CnFm0x/oS3Q3WxMvvXKsogwhXTud5Tb0FN2uPqxfuL0QceZ/PXINbQSPvXnNGC8SdkKdoFAYZD2cpMjM+JGNQySzYokOktauNB3kXuDGjTo5hilzXJBkwY+pxNUC4hJ2FJckI8F3d3IQPCBblkw== 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: 2012-03/txt/msg01017.txt.bz2 On Thu, Mar 29, 2012 at 2:12 AM, Jan Kratochvil wrote: > Hi, > > it does not change any default behavior (that's done in [patch 6/6]) but = it > gives an option to warn on .gdbinit files (which become deprecated). Deprecating .gdbinit files requires a NEWS entry. [But maybe that's in a later patch.] And are we *really* sure we want to deprecate them? I don't read every thread (and forget half I do read :-() so I may have missed a high level decision. > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -141,7 +141,7 @@ set auto-load python-scripts on|off > =A0show auto-load python-scripts > =A0 Control auto-loading of Python script files. > > -set auto-load local-gdbinit on|off > +set auto-load local-gdbinit on|off|warn-and-on|warn-and-off > =A0show auto-load local-gdbinit > =A0 Control loading of init file (.gdbinit) from current directory. > While I realize you might be trying to avoid adding another option, combining warn on/off with auto-load on/off is a bit odd. Is it possible to look at this differently and have the warning apply to more than just local-gdbinit (thus being a more useful option and thus being less of a pain to add)? E.g., a warning for using deprecated features or some such. [Or maybe we want a warning for each such feature, dunno.] > + struct stat statbuf; > + > + if (fstat (fd, &statbuf) =3D=3D 0 > + && memcmp (&statbuf, &local_gdbinit_stat, > + sizeof (statbuf)) =3D=3D 0) > + local_gdbinit =3D NULL; This assumes absence of padding.