symtab.c (basic_lookup_symbol_nonlocal): Add comment.
[deliverable/binutils-gdb.git] / gdb / mips-linux-nat.c
index a92078d2a58d5bf71c18e0df8c60f44a40a7e117..9aada60b65fc0f6f8974b1f9a3b666505a339698 100644 (file)
@@ -20,7 +20,6 @@
 #include "defs.h"
 #include "command.h"
 #include "gdbcmd.h"
-#include "gdb_assert.h"
 #include "inferior.h"
 #include "mips-tdep.h"
 #include "target.h"
@@ -36,7 +35,7 @@
 #include <sys/ptrace.h>
 #include <asm/ptrace.h>
 
-#include "mips-linux-watch.h"
+#include "nat/mips-linux-watch.h"
 
 #include "features/mips-linux.c"
 #include "features/mips-dsp-linux.c"
    we'll clear this and use PTRACE_PEEKUSER instead.  */
 static int have_ptrace_regsets = 1;
 
-/* Whether or not to print the mirrored debug registers.  */
-
-static int maint_show_dr;
-
 /* Saved function pointers to fetch and store a single register using
    PTRACE_PEEKUSER and PTRACE_POKEUSER.  */
 
@@ -63,7 +58,7 @@ static void (*super_fetch_registers) (struct target_ops *,
 static void (*super_store_registers) (struct target_ops *,
                                      struct regcache *, int);
 
-static void (*super_close) (void);
+static void (*super_close) (struct target_ops *);
 
 /* Map gdb internal register number to ptrace ``address''.
    These ``addresses'' are normally defined in <asm/ptrace.h>. 
@@ -440,6 +435,7 @@ mips_linux_read_description (struct target_ops *ops)
       if (tid == 0)
        tid = ptid_get_pid (inferior_ptid);
 
+      errno = 0;
       ptrace (PTRACE_PEEKUSER, tid, DSP_CONTROL, 0);
       switch (errno)
        {
@@ -589,7 +585,8 @@ mips_linux_stopped_data_address (struct target_ops *t, CORE_ADDR *paddr)
    the specified region can be covered by the watch registers.  */
 
 static int
-mips_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+mips_linux_region_ok_for_hw_watchpoint (struct target_ops *self,
+                                       CORE_ADDR addr, int len)
 {
   struct pt_watch_regs dummy_regs;
   int i;
@@ -645,7 +642,8 @@ mips_linux_new_thread (struct lwp_info *lp)
    watch.  Return zero on success.  */
 
 static int
-mips_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
+mips_linux_insert_watchpoint (struct target_ops *self,
+                             CORE_ADDR addr, int len, int type,
                              struct expression *cond)
 {
   struct pt_watch_regs regs;
@@ -688,7 +686,7 @@ mips_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
   watch_mirror = regs;
   retval = write_watchpoint_regs ();
 
-  if (maint_show_dr)
+  if (show_debug_regs)
     mips_show_dr ("insert_watchpoint", addr, len, type);
 
   return retval;
@@ -698,7 +696,8 @@ mips_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
    Return zero on success.  */
 
 static int
-mips_linux_remove_watchpoint (CORE_ADDR addr, int len, int type,
+mips_linux_remove_watchpoint (struct target_ops *self,
+                             CORE_ADDR addr, int len, int type,
                              struct expression *cond)
 {
   int retval;
@@ -735,7 +734,7 @@ mips_linux_remove_watchpoint (CORE_ADDR addr, int len, int type,
 
   retval = write_watchpoint_regs ();
 
-  if (maint_show_dr)
+  if (show_debug_regs)
     mips_show_dr ("remove_watchpoint", addr, len, type);
 
   return retval;
@@ -761,7 +760,7 @@ mips_linux_close (struct target_ops *self)
   current_watches = NULL;
 
   if (super_close)
-    super_close ();
+    super_close (self);
 }
 
 void _initialize_mips_linux_nat (void);
@@ -772,7 +771,7 @@ _initialize_mips_linux_nat (void)
   struct target_ops *t;
 
   add_setshow_boolean_cmd ("show-debug-regs", class_maintenance,
-                          &maint_show_dr, _("\
+                          &show_debug_regs, _("\
 Set whether to show variables that mirror the mips debug registers."), _("\
 Show whether to show variables that mirror the mips debug registers."), _("\
 Use \"on\" to enable, \"off\" to disable.\n\
This page took 0.035989 seconds and 4 git commands to generate.