From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83544 invoked by alias); 15 Dec 2018 23:01:32 -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 83500 invoked by uid 89); 15 Dec 2018 23:01:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=coding, UD:target.c, targetc, target.c X-HELO: mail-lj1-f195.google.com Received: from mail-lj1-f195.google.com (HELO mail-lj1-f195.google.com) (209.85.208.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 15 Dec 2018 23:01:29 +0000 Received: by mail-lj1-f195.google.com with SMTP id e5-v6so7912786lja.4 for ; Sat, 15 Dec 2018 15:01:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:reply-to:to:cc:date:in-reply-to:references :organization:user-agent:mime-version:content-transfer-encoding; bh=DPU2ojkocbSrUu7IwnNvSeuX5QdjeKRTxejgQnxxCo4=; b=g9Gjp/FWBSh7Ztxt+asn3I/8hLjIt4/KFyygm8sTtNb0AuQrWtLp2cAWJxmQn/j0O7 t4SANIQriMcVhe/jn0+0xTpJEwIvrqSp02L8yQSAhJt41SvSllBXwfixLxIliuJTSaTO 0Z6181Y5uLmj9TEYP0ya4G5jc1UErEfNNuZgLybsQvX6DQsSKUwZiEK+j+WQu+Vx13x/ sIwsGFlymyjtt01Ykm7UlWetK/6/HOYX1tPihOygdGsav4OWA+e/T71UzCCnZtJ0DrlY TaaNZ8zHhgJXdHD1wdZBMIuzn3f/wLoRezXUGzq5oie/UnC/gXWoWT0UkTa4+8cbzPAp TKrQ== Return-Path: Received: from G3620.lan (178-78-231-178.customers.ownit.se. [178.78.231.178]) by smtp.gmail.com with ESMTPSA id p23sm1684326lfh.47.2018.12.15.15.01.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Dec 2018 15:01:26 -0800 (PST) Message-ID: Subject: Re: [PATCH] Please define thread_info as struct thread_info (and other stuff) From: Svante Signell Reply-To: svante.signell@gmail.com To: Tom Tromey Cc: gdb-patches@sourceware.org Date: Sat, 15 Dec 2018 23:01:00 -0000 In-Reply-To: <87tvje5rvh.fsf@tromey.com> References: <87tvje5rvh.fsf@tromey.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.0-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-12/txt/msg00173.txt.bz2 On Sat, 2018-12-15 at 15:48 -0700, Tom Tromey wrote: > > > > > > "Svante" == Svante Signell writes: > > Svante> When building gdb version 8.2 on GNU/Hurd several problems arise that > need to be > Svante> solved. One problem is that most files in gdb/ have sloppy definitions > of struct > Svante> thread_info, causing a build stop fore every occurrence. They are > excluding the > Svante> struct part, making the build (and port) on Hurd very cumbersome. Can > you please > Svante> fix all bad references to thread_info upstream? I don't really > understand how > Svante> gcc can let these errors pass on GNU/Linux. > > In C++ there's an implicit typedef for a struct tag, so "struct > thread_info" can also just be referred to as "thread_info". So, I tend > to think the code is fine and something else is going wrong. > > You didn't post the text of the error or the version of the compiler > that you are using, so it's hard to say more about what the problem is. > Could you send that info? A typical error output: CXX target.o /home/srs/DEBs/gdb/gdb-8.2/gdb/target.c: In function ‘int dispose_inferior(inferior*, void*)’: /home/srs/DEBs/gdb/gdb-8.2/gdb/target.c:2028:16: error: ‘thread’ was not declared in this scope thread_info *thread = any_thread_of_inferior (inf); ^~~~~~ /home/srs/DEBs/gdb/gdb-8.2/gdb/target.c:2028:16: note: suggested alternative: ‘myread’ thread_info *thread = any_thread_of_inferior (inf); ^~~~~~ myread Sorry, but the compiler directive is hidden from the output (by libtool??). ii gcc 4:8.2.0-2 hurd-i386 GNU C compiler ii g++ 4:8.2.0-2 hurd-i386 GNU C++ compiler I would be very happy if you could be consistent in the coding: Either use struct thread_info everywhere or not. Thanks!