]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
x86/gdbstub: Clean up includes
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 20 Apr 2022 12:48:05 +0000 (13:48 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Apr 2022 19:39:34 +0000 (20:39 +0100)
common/gdbstub.c wants struct gdb_context but only gets it transitively
through asm/debugger.h.  None of */gdbstub.c should include asm/debugger.h so
include xen/gdbstub.h instead.

Forward declare struct cpu_user_regs in xen/gdbstub.h so it doesn't depend on
the include order to compile.

x86/setup.c doesn't need xen/gdbstub.h at all, so drop it.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/gdbstub.c
xen/arch/x86/setup.c
xen/arch/x86/x86_64/gdbstub.c
xen/common/gdbstub.c
xen/include/xen/gdbstub.h

index 8f4f49fd3b54a4071ff6502ebe0c6e2a1eadfcc3..961cae0be74f5514eb2f05536727786a74f9e250 100644 (file)
  * You should have received a copy of the GNU General Public License
  * along with this program; If not, see <http://www.gnu.org/licenses/>.
  */
-#include <asm/debugger.h>
+#include <asm/uaccess.h>
+#include <asm/x86-defns.h>
+
+#include <xen/gdbstub.h>
 
 u16
 gdb_arch_signal_num(struct cpu_user_regs *regs, unsigned long cookie)
index 6f20e178929fa0dbd0b760e2b9a8aa50b0c50b62..53a73010e02920d20c447276c12d1bf994fd59ce 100644 (file)
@@ -15,7 +15,6 @@
 #include <xen/multiboot.h>
 #include <xen/domain_page.h>
 #include <xen/version.h>
-#include <xen/gdbstub.h>
 #include <xen/hypercall.h>
 #include <xen/keyhandler.h>
 #include <xen/numa.h>
index 2626519c89c72447058829066324d445c764659f..8287124dfb1d0934e8a6d29de82fca374ca00357 100644 (file)
@@ -17,7 +17,7 @@
  * along with this program; If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <asm/debugger.h>
+#include <xen/gdbstub.h>
 
 #define GDB_REG64(r) gdb_write_to_packet_hex(r, sizeof(u64), ctx)
 #define GDB_REG32(r)  gdb_write_to_packet_hex(r, sizeof(u32), ctx)
index d6872721dc0d67f98a112e1d98c158df39dc2307..df8d122bce8d8c7fe0ede2303bfc46148712f4c4 100644 (file)
 #include <xen/serial.h>
 #include <xen/irq.h>
 #include <xen/watchdog.h>
-#include <asm/debugger.h>
 #include <xen/init.h>
 #include <xen/param.h>
 #include <xen/smp.h>
 #include <xen/console.h>
 #include <xen/errno.h>
 #include <xen/delay.h>
+#include <xen/gdbstub.h>
+
 #include <asm/byteorder.h>
 
 /* Printk isn't particularly safe just after we've trapped to the
index 0b2041095d88a621537215805f3efbf317f33131..18c960969b769d20d035855479391407587c3636 100644 (file)
@@ -25,6 +25,8 @@
 
 #ifdef CONFIG_CRASH_DEBUG
 
+struct cpu_user_regs;
+
 struct gdb_context {
     int                 serhnd;           /* handle on our serial line */
     int                 console_steal_id; /* handle on stolen console */