From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71252 invoked by alias); 12 Jan 2019 18:37:19 -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 71240 invoked by uid 89); 12 Jan 2019 18:37:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Google-DKIM-Signature:reply-to X-HELO: mail-lf1-f68.google.com Received: from mail-lf1-f68.google.com (HELO mail-lf1-f68.google.com) (209.85.167.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 12 Jan 2019 18:37:15 +0000 Received: by mail-lf1-f68.google.com with SMTP id y11so13057700lfj.4 for ; Sat, 12 Jan 2019 10:37:15 -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=kQXRh2QHr+vXCUT8SNQJ5uaVcNAWQgVa+xK7lBkhZlA=; b=fqFXRolDZAj68gyoy+ORB8Fy3qRggiLiMsC7bP3f2tMDzODvJuiNaScZ0/3btzFQId zhObvqnj8Y2uxiNv46AvFQN9XD5ZjhSPOHY8vuJWxAmehB9KXdQ4i4RXK1NwBYlXZHYA acS367Uk8g0gAcHLzGlOLybQclSKukW9709BTHxVW8TPX04fMI6GoYztpxYwnGy0Deu2 44iSdUFtNwTLjwDTXAyyJr7DwOGrCtEyfjfzuch8FAjTmkjtqq/08w74cczEyvzU81CX SLmgFK17SwyZz3nfQAHXlovwWREVcSJohsY5wLdMUcTq1nEFxj93qyqD9pgAUSyk1kPL 9ctw== Return-Path: Received: from G3620.lan (178-78-231-178.customers.ownit.se. [178.78.231.178]) by smtp.gmail.com with ESMTPSA id a62sm15456244lfa.37.2019.01.12.10.37.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 12 Jan 2019 10:37:12 -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: Andreas Schwab , Simon Marchi , gdb-patches@sourceware.org Date: Sat, 12 Jan 2019 18:37:00 -0000 In-Reply-To: <87r2e6pp9c.fsf@tromey.com> References: <000db1d81a0c415190b6648222ed29db7f927df9.camel@gmail.com> <87d0q13w6b.fsf@tromey.com> <878t0j4ykk.fsf@tromey.com> <87r2e6pp9c.fsf@tromey.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.4-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-01/txt/msg00292.txt.bz2 Hi, Just to make clear that the patch below is not enough to make gdb building on GNU/Hurd. It helps but there are more issues. I'll continue to try to make gdb building when time permits. Thanks! On Mon, 2018-12-24 at 14:51 -0700, Tom Tromey wrote: > > > > > > "Tom" == Tom Tromey writes: > > Tom> I took a quick look at it and one question I have is whether > Tom> nm-i386gnu.h really needs to include any of the headers it does. defs.h > Tom> already includes unistd.h, and regcache.h should probably not be needed; > Tom> and removing the mach includes would at least reduce the number of spots > Tom> needing the "struct". Could you try removing these lines? > > Tom> Also I happened to notice that file declares gnu_target_pid_to_str -- > Tom> but I didn't see a definition. So perhaps that could be removed as > Tom> well. > > As John pointed out, the file seems not to be needed at all. > Could you try this patch? I have no way to test it. > > Tom > > commit 86d2fb04c1890b381a24d3508087d11cc88388c8 > Author: Tom Tromey > Date: Mon Dec 24 14:49:27 2018 -0700 > > Attempt to fix Hurd build > > gdb/ChangeLog > 2018-12-24 Tom Tromey > > * gnu-nat.c (THREAD_STATE_FLAVOR, THREAD_STATE_SIZE) > (THREAD_STATE_SET_TRACED, THREAD_STATE_CLEAR_TRACED): Move > definitions from nm-i386gnu.h. > * configure.nat: Don't reference nm-i386gnu.h. > * config/i386/nm-i386gnu.h: Remove. > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 21731be98d..bc408fe748 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,11 @@ > +2018-12-24 Tom Tromey > + > + * gnu-nat.c (THREAD_STATE_FLAVOR, THREAD_STATE_SIZE) > + (THREAD_STATE_SET_TRACED, THREAD_STATE_CLEAR_TRACED): Move > + definitions from nm-i386gnu.h. > + * configure.nat: Don't reference nm-i386gnu.h. > + * config/i386/nm-i386gnu.h: Remove. > + > 2018-12-18 Tom Tromey > > * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take > diff --git a/gdb/config/i386/nm-i386gnu.h b/gdb/config/i386/nm-i386gnu.h > deleted file mode 100644 > index 4b2ca907fd..0000000000 > --- a/gdb/config/i386/nm-i386gnu.h > +++ /dev/null > @@ -1,37 +0,0 @@ > -/* Native-dependent definitions for Intel 386 running the GNU Hurd > - Copyright (C) 1994-2018 Free Software Foundation, Inc. > - > - This file is part of GDB. > - > - This program is free software; you can redistribute it and/or modify > - it under the terms of the GNU General Public License as published by > - the Free Software Foundation; either version 3 of the License, or > - (at your option) any later version. > - > - This program is distributed in the hope that it will be useful, > - but WITHOUT ANY WARRANTY; without even the implied warranty of > - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > - GNU General Public License for more details. > - > - You should have received a copy of the GNU General Public License > - along with this program. If not, see ;. */ > - > -#ifndef NM_I386GNU_H > -#define NM_I386GNU_H > - > -#include > -#include > -#include > -#include "regcache.h" > - > -extern char *gnu_target_pid_to_str (int pid); > - > -/* Thread flavors used in re-setting the T bit. */ > -#define THREAD_STATE_FLAVOR i386_REGS_SEGS_STATE > -#define THREAD_STATE_SIZE i386_THREAD_STATE_COUNT > -#define THREAD_STATE_SET_TRACED(state) \ > - ((struct i386_thread_state *) (state))->efl |= 0x100 > -#define THREAD_STATE_CLEAR_TRACED(state) \ > - ((((struct i386_thread_state *) (state))->efl &= ~0x100), 1) > - > -#endif /* nm-i386gnu.h */ > diff --git a/gdb/configure.nat b/gdb/configure.nat > index 200b716924..aa6f9c5c4e 100644 > --- a/gdb/configure.nat > +++ b/gdb/configure.nat > @@ -218,7 +218,6 @@ case ${gdb_host} in > msg_U.o exc_request_U.o exc_request_S.o' > HAVE_NATIVE_GCORE_HOST=1 > > - NAT_FILE='nm-i386gnu.h' > MH_CFLAGS='-D_GNU_SOURCE' > > XM_CLIBS='-lshouldbeinlibc' > diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c > index a886c2b80c..612815f8ae 100644 > --- a/gdb/gnu-nat.c > +++ b/gdb/gnu-nat.c > @@ -81,6 +81,14 @@ extern "C" > #include "msg_U.h" > } > > +/* Thread flavors used in re-setting the T bit. */ > +#define THREAD_STATE_FLAVOR i386_REGS_SEGS_STATE > +#define THREAD_STATE_SIZE i386_THREAD_STATE_COUNT > +#define THREAD_STATE_SET_TRACED(state) \ > + ((struct i386_thread_state *) (state))->efl |= 0x100 > +#define THREAD_STATE_CLEAR_TRACED(state) \ > + ((((struct i386_thread_state *) (state))->efl &= ~0x100), 1) > + > static process_t proc_server = MACH_PORT_NULL; > > /* If we've sent a proc_wait_request to the proc server, the pid of the