[7/9,v7] Remove GDBSERVER uses from linux-btrace.c

Message ID 1409320299-6812-8-git-send-email-gbenson@redhat.com
State Committed
Headers

Commit Message

Gary Benson Aug. 29, 2014, 1:51 p.m. UTC
  This commit makes nat/linux-btrace.c include common-defs.h rather
than defs.h or server.h.  A couple of minor changes were required
to support this change.

This patch is unchanged from the version I posted August 1:
https://sourceware.org/ml/gdb-patches/2014-08/msg00009.html

gdb/ChangeLog:

	* nat/linux-btrace.c: Include common-defs.h.
	Don't include defs.h, server.h or gdbthread.h.
	* nat/linux-btrace.h (struct target_ops): New forward declaration.
---
 gdb/ChangeLog          |    6 ++++++
 gdb/nat/linux-btrace.c |    8 +-------
 gdb/nat/linux-btrace.h |    2 ++
 3 files changed, 9 insertions(+), 7 deletions(-)
  

Comments

Pedro Alves Sept. 10, 2014, 1:12 p.m. UTC | #1
On 08/29/2014 02:51 PM, Gary Benson wrote:
> This commit makes nat/linux-btrace.c include common-defs.h rather
> than defs.h or server.h.  A couple of minor changes were required
> to support this change.
> 
> This patch is unchanged from the version I posted August 1:
> https://sourceware.org/ml/gdb-patches/2014-08/msg00009.html
> 
> gdb/ChangeLog:
> 
> 	* nat/linux-btrace.c: Include common-defs.h.
> 	Don't include defs.h, server.h or gdbthread.h.
> 	* nat/linux-btrace.h (struct target_ops): New forward declaration.

Looks good to me too.

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c
index cf98582..ec26f0f 100644
--- a/gdb/nat/linux-btrace.c
+++ b/gdb/nat/linux-btrace.c
@@ -19,15 +19,9 @@ 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "linux-btrace.h"
 #include "common-regcache.h"
-#include "gdbthread.h"
 #include "gdb_wait.h"
 #include "i386-cpuid.h"
 
diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h
index 28a7176..e4b2604 100644
--- a/gdb/nat/linux-btrace.h
+++ b/gdb/nat/linux-btrace.h
@@ -30,6 +30,8 @@ 
 #  include <linux/perf_event.h>
 #endif
 
+struct target_ops;
+
 /* Branch trace target information per thread.  */
 struct btrace_target_info
 {