From patchwork Thu May 28 16:51:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 6968 Received: (qmail 57550 invoked by alias); 28 May 2015 16:52:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 57537 invoked by uid 89); 28 May 2015 16:52:01 -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_05, RCVD_IN_DNSWL_LOW, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-oi0-f46.google.com Received: from mail-oi0-f46.google.com (HELO mail-oi0-f46.google.com) (209.85.218.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 28 May 2015 16:51:59 +0000 Received: by oifu123 with SMTP id u123so37023676oif.1 for ; Thu, 28 May 2015 09:51:57 -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 :content-transfer-encoding; bh=63VTATtmlwVJctfTnKxlBaMFsW2qhUjMrTac0ZDfcH4=; b=Ss3PFgCfKIqjURiilmSmMvQ9TvgtF906XvF2Hm6SZvLyU9Q6dV6Xj+o4igqFaBl8uy 39QkOJJB0TRxUyBZZWtDKRwd7CYUqSauhBgQWiFqiBFKq2oUE6RyfEHk4w82PX4XGfyN PB36bwEPsN5dNqzPEX89LOb9FVPiAVCSPgqJEQaj7MPe80qE8U8oCTNuIK3ZYWC3H4u7 k4zVQimtFCFiC9/FghvdBPRhobBKbBmMeq6BBBMpL7FzspKd2cwNPymOHmtFJGK23hgq jNX8V1wCne2nIbFNxgF4ETLaup6SIJoXYpc8JGJasWBgWzBMQftsdDaDLeJ6vi/YX3lc gzDA== X-Gm-Message-State: ALoCoQnsy1F2QigwXgPTO9GyGMwt1nRNL81n6d39MbHmwLjCtWFvlj/GuM4jyDu9sJrg9QDH6XT+ MIME-Version: 1.0 X-Received: by 10.202.88.66 with SMTP id m63mr3122969oib.47.1432831917325; Thu, 28 May 2015 09:51:57 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Thu, 28 May 2015 09:51:57 -0700 (PDT) In-Reply-To: References: <20150528092738.GY7864@lug-owl.de> Date: Thu, 28 May 2015 09:51:57 -0700 Message-ID: Subject: =?UTF-8?Q?Re=3A_=5BBUILDROBOT=5D_error=3A_redefinition_of_typedef_=E2=80=98r?= =?UTF-8?Q?ecord=5Fline=5Fftype=E2=80=99_=28was=3A_=5BPATCH_3=2F6=5D_DWARF_Two_Level_Line_T?= =?UTF-8?Q?ables=3A_check=5Fline=5Faddress=29?= From: Doug Evans To: "Maciej W. Rozycki" Cc: Jan-Benedict Glaw , gdb-patches X-IsSubscribed: yes On Thu, May 28, 2015 at 6:58 AM, Maciej W. Rozycki wrote: > On Thu, 28 May 2015, Jan-Benedict Glaw wrote: > >> > > This patch just factors out the checking of a line address >> > > to improve the S/N ratio of the calling function. >> > > >> > > 2015-03-12 Doug Evans >> > > >> > > * dwarf2read.c (record_line_ftype): New typedef. >> > > (check_line_address): New function. >> > > (dwarf_decode_lines_1): Call it. >> > >> > Committed. >> >> Seems it's breaking, see eg. this xtensa-linux build >> (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=442962), >> or hppa-linux >> (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=443000): >> >> [...] >> gcc -g -O2 -I. -I/home/jbglaw/repos/binutils_gdb/gdb -I/home/jbglaw/repos/binutils_gdb/gdb/common -I/home/jbglaw/repos/binutils_gdb/gdb/config -DLOCALEDIR="\"/home/jbglaw/build/hppa-linux/_install_/share/locale\"" -DHAVE_CONFIG_H -I/home/jbglaw/repos/binutils_gdb/gdb/../include/opcode -I/home/jbglaw/repos/binutils_gdb/gdb/../opcodes/.. -I/home/jbglaw/repos/binutils_gdb/gdb/../readline/.. -I/home/jbglaw/repos/binutils_gdb/gdb/../zlib -I../bfd -I/home/jbglaw/repos/binutils_gdb/gdb/../bfd -I/home/jbglaw/repos/binutils_gdb/gdb/../include -I../libdecnumber -I/home/jbglaw/repos/binutils_gdb/gdb/../libdecnumber -I/home/jbglaw/repos/binutils_gdb/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/usr/include/python2.6 -I/usr/include/python2.6 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wpointer-sign -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -Werror -c -o dwarf2read.o -MT dwarf2read.o -MMD -MP -MF .deps/dwarf2read.Tpo /home/jbglaw/repos/binutils_gdb/gdb/dwarf2read.c >> /home/jbglaw/repos/binutils_gdb/gdb/dwarf2read.c:17480: error: redefinition of typedef ‘record_line_ftype’ >> /home/jbglaw/repos/binutils_gdb/gdb/buildsym.h:177: note: previous declaration of ‘record_line_ftype’ was here >> make[1]: *** [dwarf2read.o] Error 1 >> make[1]: Leaving directory `/home/jbglaw/build/hppa-linux/build-gdb/gdb' >> make: *** [all-gdb] Error 2 >> >> Probably just missed a small part of the patch which removed the >> second definition? > > Also mips-linux; any build probably. > > The typedef in buildsym.h has to stay, it's already used elsewhere. > It's the newly-added one in dwarf2read.c that has to go. Both are > identical anyway. Fixed. The build didn't fail for me so I didn't see this. I then tried several pure gcc versions (can't trust distro gcc defaults). I got a failure with 4.3.3 but not with 4.[6-9].x. 2015-05-28 Doug Evans * dwarf2read.c (record_line_ftype): Remove, duplicate. typedef struct diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 1ce616a..1e290c3 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -17475,11 +17475,6 @@ psymtab_include_file_name (const struct line_header *lh, int file_index, return include_name; } -/* Function to record a line number. */ - -typedef void (record_line_ftype) (struct subfile *subfile, int line, - CORE_ADDR pc); - /* State machine to track the state of the line number program. */