From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11241 invoked by alias); 5 Sep 2013 20:50:00 -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 11232 invoked by uid 89); 5 Sep 2013 20:50:00 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Sep 2013 20:50:00 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r85KnvhU003667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 5 Sep 2013 16:49:57 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r85KnuHe031524 for ; Thu, 5 Sep 2013 16:49:56 -0400 Message-ID: <5228EE73.6050707@redhat.com> Date: Thu, 05 Sep 2013 20:50:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH 7/9] [gdbserver] Split a new dll.h file out of server.h. References: <1378239999-15533-1-git-send-email-palves@redhat.com> <1378239999-15533-8-git-send-email-palves@redhat.com> In-Reply-To: <1378239999-15533-8-git-send-email-palves@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-09/txt/msg00187.txt.bz2 win32-low.c needs to include dll.h as well. -------- [gdbserver] Split a new dll.h file out of server.h. gdb/gdbserver/ 2013-09-05 Pedro Alves * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h". * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls) (loaded_dll, unloaded_dll): Move to ... * dll.h: ... this new file. * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h". --- gdb/gdbserver/dll.c | 1 + gdb/gdbserver/dll.h | 35 +++++++++++++++++++++++++++++++++++ gdb/gdbserver/inferiors.c | 1 + gdb/gdbserver/remote-utils.c | 2 ++ gdb/gdbserver/server.c | 1 + gdb/gdbserver/server.h | 16 ---------------- gdb/gdbserver/win32-low.c | 1 + 7 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 gdb/gdbserver/dll.h diff --git a/gdb/gdbserver/dll.c b/gdb/gdbserver/dll.c index e4873eb..74978e2 100644 --- a/gdb/gdbserver/dll.c +++ b/gdb/gdbserver/dll.c @@ -16,6 +16,7 @@ along with this program. If not, see . */ #include "server.h" +#include "dll.h" #define get_dll(inf) ((struct dll_info *)(inf)) diff --git a/gdb/gdbserver/dll.h b/gdb/gdbserver/dll.h new file mode 100644 index 0000000..428c60c --- /dev/null +++ b/gdb/gdbserver/dll.h @@ -0,0 +1,35 @@ +/* Copyright (C) 1993-2013 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 DLL_H +#define DLL_H + +struct dll_info +{ + struct inferior_list_entry entry; + char *name; + CORE_ADDR base_addr; +}; + +extern struct inferior_list all_dlls; +extern int dlls_changed; + +extern void clear_dlls (void); +extern void loaded_dll (const char *name, CORE_ADDR base_addr); +extern void unloaded_dll (const char *name, CORE_ADDR base_addr); + +#endif /* DLL_H */ diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c index 39eb52e..5f974ca 100644 --- a/gdb/gdbserver/inferiors.c +++ b/gdb/gdbserver/inferiors.c @@ -22,6 +22,7 @@ #include "server.h" #include "gdbthread.h" +#include "dll.h" struct inferior_list all_processes; struct inferior_list all_threads; diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 5cd6fa1..8e8a4d6 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -21,6 +21,8 @@ #include "target.h" #include "gdbthread.h" #include "tdesc.h" +#include "dll.h" + #include #include #if HAVE_SYS_IOCTL_H diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 3c70288..6ca7fe1 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -30,6 +30,7 @@ #include "btrace-common.h" #include "filestuff.h" #include "tracepoint.h" +#include "dll.h" /* The thread set with an `Hc' packet. `Hc' is deprecated in favor of `vCont'. Note the multi-process extensions made `vCont' a diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h index a696121..ab52738 100644 --- a/gdb/gdbserver/server.h +++ b/gdb/gdbserver/server.h @@ -102,26 +102,10 @@ typedef unsigned long long ULONGEST; #include "gdbthread.h" #include "inferiors.h" -struct dll_info -{ - struct inferior_list_entry entry; - char *name; - CORE_ADDR base_addr; -}; - /* Target-specific functions */ void initialize_low (); -/* From dll.c. */ - -extern struct inferior_list all_dlls; -extern int dlls_changed; -extern void clear_dlls (void); - -void loaded_dll (const char *name, CORE_ADDR base_addr); -void unloaded_dll (const char *name, CORE_ADDR base_addr); - /* Public variables in server.c */ extern ptid_t cont_thread; diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index 549c29f..a32cea4 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -25,6 +25,7 @@ #include "mem-break.h" #include "win32-low.h" #include "gdbthread.h" +#include "dll.h" #include #include