From patchwork Thu Feb 14 14:58:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 31466 Received: (qmail 4663 invoked by alias); 14 Feb 2019 14:59:08 -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 4589 invoked by uid 89); 14 Feb 2019 14:59:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Dec, dec X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (192.185.195.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Feb 2019 14:59:05 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 19A4B40138C0A for ; Thu, 14 Feb 2019 08:13:03 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id uITPgxiZi90onuITQgKlqm; Thu, 14 Feb 2019 08:58:48 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MsVqdstxFs8/6pfTC2IFhhyO1dQ9Z8rZDEVwHgE6DFE=; b=NxiRmTk0GIveYf+XtkUTlfTLbF IY5xSSEg7rzntwbMjRx72MbC/y+qjntSfjGNZp/KY5v483cvxIj4jVs3NVvlAlZpgXF8yLK8/ZHQl NUeZU/r2XIOQi2aY7w3mjVU/I; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:50494 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1guITP-0010Wp-O7; Thu, 14 Feb 2019 08:58:47 -0600 From: Tom Tromey To: Thomas Schwinge Cc: , Pierre Muller Subject: Re: [RFC] nm header removal: Get rid of config/i386/nm-i386gnu.h header References: <000601cbe7de$3da74740$b8f5d5c0$@muller@ics-cnrs.unistra.fr> <87oc4u166a.fsf@kepler.schwinge.homeip.net> <87wom2ifyv.fsf@euler.schwinge.homeip.net> Date: Thu, 14 Feb 2019 07:58:46 -0700 In-Reply-To: <87wom2ifyv.fsf@euler.schwinge.homeip.net> (Thomas Schwinge's message of "Thu, 14 Feb 2019 15:48:08 +0100") Message-ID: <87zhqy2z89.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 >>>>> "Thomas" == Thomas Schwinge writes: Thomas> Not quite ready to remove the 'gdb/config/i386/nm-i386gnu.h' file (but Thomas> getting there), but at least: I have a patch to do this but I never got a response. Maybe you could try it? I couldn't readily find it in the archives so I have appended it again. 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 21731be98db..bc408fe7481 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 4b2ca907fda..00000000000 --- 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 200b7169243..aa6f9c5c4e3 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 a886c2b80ce..612815f8ae8 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