From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30319 invoked by alias); 12 Aug 2014 21:28:57 -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 30309 invoked by uid 89); 12 Aug 2014 21:28:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f170.google.com Received: from mail-vc0-f170.google.com (HELO mail-vc0-f170.google.com) (209.85.220.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 12 Aug 2014 21:28:55 +0000 Received: by mail-vc0-f170.google.com with SMTP id lf12so14139644vcb.29 for ; Tue, 12 Aug 2014 14:28:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=3UaykDkiqPqXntMQGuNXjSWoFOTujlCKgu0T3SDtcWc=; b=UQ3byzJsf+1XO1dlK6lm53avEyN8tD2d46jvpW1ePlFgQFNQv6N61jKQIbtKjocoR0 siOUPc0uJdozOkcVYL8WFgJULVxMxdXhf2lHtoE3Gp+MN+V1SU1RbvZunvArWo+44rBq cP9DmA51v9vWjeR5U3oLFrZyjmSxWukhyklGRMeCuBtXAZsoH+F4SiIQWTOrz7ZgFYup INN9Q2j+JiMsBIHrs8UkojU6f0OphK/CfL9cN/zXhdBuI/3k9TClhE3Mj8gdKTZjlouR FTg9/oENUy9jAv4Uzm3GxlNvTpiEK/B/Q1lHeEDMc5iAWr7zVTfXlK9K34IivhGl2z8O Gh1g== X-Gm-Message-State: ALoCoQlPGhT0PYi3/hEjRnBymK3qHHYOr9d0HalICIvArFEAHjR6A/0/0xNVrLFlQJWim7Mp0FeO MIME-Version: 1.0 X-Received: by 10.52.246.198 with SMTP id xy6mr147585vdc.7.1407878932776; Tue, 12 Aug 2014 14:28:52 -0700 (PDT) Received: by 10.52.136.203 with HTTP; Tue, 12 Aug 2014 14:28:52 -0700 (PDT) In-Reply-To: <20140812203845.GA18456@host2.jankratochvil.net> References: <20140804202907.GA2608@host2.jankratochvil.net> <53E17E14.8070104@codesourcery.com> <20140812192204.GA13299@host2.jankratochvil.net> <20140812203845.GA18456@host2.jankratochvil.net> Date: Tue, 12 Aug 2014 21:28:00 -0000 Message-ID: Subject: Re: [patch+7.8?] Fix --with-babeltrace with gcc-4.9.1 From: Doug Evans To: Jan Kratochvil Cc: Yao Qi , gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00201.txt.bz2 On Tue, Aug 12, 2014 at 1:38 PM, Jan Kratochvil wrote: > On Tue, 12 Aug 2014 22:32:55 +0200, Doug Evans wrote: >> E.g., can we just delete "pos" and the function call that initializes it? >> >> struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); > > I think we cannot and the reason is given in the comment there: > # Append -Werror to CFLAGS so that configure can catch the warning > # "assignment from incompatible pointer type", which is related to > # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works > # in GDB, while babeltrace 1.0.3 is broken. > > >> Or, if for some reason we need to test whether bf_ctf_get_iter exists, >> can we just >> call it and discard the result? > > Also not due to the reason above. Alas the comment doesn't specify which assignment. I think it's for scope. I did some grepping: @ruffy:babeltrace$ find babeltrace-1.0.3 -name '*.h' | xargs grep bt_iter_get_pos babeltrace-1.0.3/include/babeltrace/iterator.h: * - restore is a position saved with bt_iter_get_pos, it is used with babeltrace-1.0.3/include/babeltrace/iterator.h: * bt_iter_get_pos - Get the current iterator position. babeltrace-1.0.3/include/babeltrace/iterator.h:struct bt_iter_pos *bt_iter_get_pos(struct bt_iter *iter); @ruffy:babeltrace$ find babeltrace-1.1.0 -name '*.h' | xargs grep bt_iter_get_pos babeltrace-1.1.0/include/babeltrace/iterator.h: * - restore is a position saved with bt_iter_get_pos, it is used with babeltrace-1.1.0/include/babeltrace/iterator.h: * bt_iter_get_pos - Get the current iterator position. babeltrace-1.1.0/include/babeltrace/iterator.h:struct bt_iter_pos *bt_iter_get_pos(struct bt_iter *iter); @ruffy:babeltrace$ find babeltrace-1.0.3 -name '*.h' | xargs grep bt_ctf_get_top_level_scope babeltrace-1.0.3/include/babeltrace/ctf/events.h: * bt_ctf_get_top_level_scope: return a definition of the top-level scope babeltrace-1.0.3/include/babeltrace/ctf/events.h:const struct definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *event, @ruffy:babeltrace$ find babeltrace-1.1.0 -name '*.h' | xargs grep bt_ctf_get_top_level_scope babeltrace-1.1.0/include/babeltrace/ctf/events.h: * bt_ctf_get_top_level_scope: return a definition of the top-level scope babeltrace-1.1.0/include/babeltrace/ctf/events.h:const struct bt_definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *event, Note that there's no change in the result of bt_iter_get_pos, but there is in bt_ctf_get_top_level_scope. Plus some digging found this: https://sourceware.org/ml/gdb-patches/2013-03/msg00955.html