/* Native-dependent code for FreeBSD/amd64.
- Copyright (C) 2003-2004, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003-2014 Free Software Foundation, Inc.
This file is part of GDB.
/* Support for debugging kernel virtual memory images. */
-#include <sys/types.h>
#include <machine/pcb.h>
#include <osreldate.h>
}
\f
+static void (*super_mourn_inferior) (struct target_ops *ops);
+
+static void
+amd64fbsd_mourn_inferior (struct target_ops *ops)
+{
+#ifdef HAVE_PT_GETDBREGS
+ i386_cleanup_dregs ();
+#endif
+ super_mourn_inferior (ops);
+}
+
/* Provide a prototype to silence -Wmissing-prototypes. */
void _initialize_amd64fbsd_nat (void);
#endif /* HAVE_PT_GETDBREGS */
+ super_mourn_inferior = t->to_mourn_inferior;
+ t->to_mourn_inferior = amd64fbsd_mourn_inferior;
+
t->to_pid_to_exec_file = fbsd_pid_to_exec_file;
t->to_find_memory_regions = fbsd_find_memory_regions;
t->to_make_corefile_notes = fbsd_make_corefile_notes;