From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 346 invoked by alias); 6 Mar 2014 05:20:56 -0000 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 Received: (qmail 335 invoked by uid 89); 6 Mar 2014 05:20:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yh0-f51.google.com Received: from mail-yh0-f51.google.com (HELO mail-yh0-f51.google.com) (209.85.213.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 06 Mar 2014 05:20:53 +0000 Received: by mail-yh0-f51.google.com with SMTP id f10so2160542yha.24 for ; Wed, 05 Mar 2014 21:20:51 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.236.81.237 with SMTP id m73mr12062235yhe.29.1394083251670; Wed, 05 Mar 2014 21:20:51 -0800 (PST) Received: by 10.170.214.130 with HTTP; Wed, 5 Mar 2014 21:20:51 -0800 (PST) Date: Thu, 06 Mar 2014 05:20:00 -0000 Message-ID: Subject: target-delegates.c needs some TLC [was Re: [OB PATCH] target.h (to_traceframe_info): Fix TARGET_DEFAULT_RETURN] From: Doug Evans To: Yao Qi , Tom Tromey Cc: Hui Zhu , gdb-patches ml Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00146.txt.bz2 On Mon, Mar 3, 2014 at 5:36 PM, Yao Qi wrote: > On 03/04/2014 09:18 AM, Hui Zhu wrote: >> I cannot understand about this OB is not right. I have 2 questions to you: >> 1. Before my patch, does target-delegates.c that generated by make-target-delegates is same with current target-delegates.c? > > No, as I said, I forgot to re-generate target-delegates.c. Hmmm.... I don't even see target-delegates.c in Makefile.in. That feels like a bug. [Could be blind of course. :-)] I realize there's a comment in target-delegates.c that says how to regenerate it, but these kind of things are part of what makefiles are for. While I realize we don't want to require perl for building gdb (and I for one would never advocate it), I wonder if we can do at least a bit better. I'm not sure I'd want to require perl for --enable-maintainer-mode (which is a common trigger for enabling in makefiles the appropriate rules to auto-regenerate checked-in machine-generated files), but it's one thought. Failing using --enable-maintainer-mode for this I think it's a requirement to add a different --enable-foo option to turn on the necessary makefile rules to regenerate target-delegates.c at build time as needed. Another thought would be to at least have makefile issue a warning if target-delegates.c is out of date, perhaps predicated on --enable-maintainer-mode, or some other configure option, since doing so by default is problematic otherwise.