Warnings in native MinGW32 build of GDB 7.8

Message ID 20140813182655.GH4881@adacore.com
State New, archived
Headers

Commit Message

Joel Brobecker Aug. 13, 2014, 6:26 p.m. UTC
  > > I can do the 1st and the 3rd parts, but I'd prefer not to touch
> > gdbarch.sh.  Could one of you please do that?

Attached is a patch that does that. Can you confirm it fixes your
warnings?
  

Comments

Eli Zaretskii Aug. 13, 2014, 6:48 p.m. UTC | #1
> Date: Wed, 13 Aug 2014 11:26:55 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: yao@codesourcery.com, gdb-patches@sourceware.org
> 
> Attached is a patch that does that. Can you confirm it fixes your
> warnings?

Yes, it does.  Thanks!
  

Patch

From ee8948e61a8047d67cf8ad32d3259dbe7951a527 Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Wed, 13 Aug 2014 11:15:00 -0700
Subject: [PATCH] Add "frame.h" #include in gdbarch.h.

This include is needed because of gdbarch_dummy_id needs the full
definition of struct frame_id.

gdb/ChangeLog:

        * gdbarch.sh: #include "frame.h" in gdbarch.h.  Delete "struct
        frame_info" advance declaration.

Tested on x86_64-linux by rebuilding GDB.
---
 gdb/gdbarch.h  | 3 ++-
 gdb/gdbarch.sh | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 5388e6e..0303b2e 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -35,9 +35,10 @@ 
 #ifndef GDBARCH_H
 #define GDBARCH_H
 
+#include "frame.h"
+
 struct floatformat;
 struct ui_file;
-struct frame_info;
 struct value;
 struct objfile;
 struct obj_section;
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 61d0781..2a8bca8 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -1124,9 +1124,10 @@  cat <<EOF
 #ifndef GDBARCH_H
 #define GDBARCH_H
 
+#include "frame.h"
+
 struct floatformat;
 struct ui_file;
-struct frame_info;
 struct value;
 struct objfile;
 struct obj_section;
-- 
1.9.1