* lib/gdb.exp (get_hexadecimal_valueof): New procedure.
[deliverable/binutils-gdb.git] / gdb / procfs.c
index 248dd3acf294ad950d51f65ed7f8d39e13d72eca..bc49ffe3a8d3cca679f6076c3bfae116cb4667df 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine independent support for SVR4 /proc (process file system) for GDB.
 
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006, 2007, 2008
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
 
    Written by Michael Snyder at Cygnus Solutions.
  */
 
 static void procfs_open (char *, int);
-static void procfs_attach (char *, int);
-static void procfs_detach (char *, int);
+static void procfs_attach (struct target_ops *, char *, int);
+static void procfs_detach (struct target_ops *, char *, int);
 static void procfs_resume (ptid_t, int, enum target_signal);
 static int procfs_can_run (void);
 static void procfs_stop (ptid_t);
@@ -123,9 +123,11 @@ static void procfs_store_registers (struct regcache *, int);
 static void procfs_notice_signals (ptid_t);
 static void procfs_prepare_to_store (struct regcache *);
 static void procfs_kill_inferior (void);
-static void procfs_mourn_inferior (void);
-static void procfs_create_inferior (char *, char *, char **, int);
-static ptid_t procfs_wait (ptid_t, struct target_waitstatus *);
+static void procfs_mourn_inferior (struct target_ops *ops);
+static void procfs_create_inferior (struct target_ops *, char *, 
+                                   char *, char **, int);
+static ptid_t procfs_wait (struct target_ops *,
+                          ptid_t, struct target_waitstatus *);
 static int procfs_xfer_memory (CORE_ADDR, gdb_byte *, int, int,
                               struct mem_attrib *attrib,
                               struct target_ops *);
@@ -138,7 +140,7 @@ static LONGEST procfs_xfer_partial (struct target_ops *ops,
 static int procfs_thread_alive (ptid_t);
 
 void procfs_find_new_threads (void);
-char *procfs_pid_to_str (ptid_t);
+char *procfs_pid_to_str (struct target_ops *, ptid_t);
 
 static int proc_find_memory_regions (int (*) (CORE_ADDR,
                                              unsigned long,
@@ -3602,7 +3604,7 @@ procfs_debug_inferior (procinfo *pi)
 }
 
 static void
-procfs_attach (char *args, int from_tty)
+procfs_attach (struct target_ops *ops, char *args, int from_tty)
 {
   char *exec_file;
   int   pid;
@@ -3632,7 +3634,7 @@ procfs_attach (char *args, int from_tty)
 }
 
 static void
-procfs_detach (char *args, int from_tty)
+procfs_detach (struct target_ops *ops, char *args, int from_tty)
 {
   int sig = 0;
   int pid = PIDGET (inferior_ptid);
@@ -3968,7 +3970,8 @@ syscall_is_lwp_create (procinfo *pi, int scall)
  */
 
 static ptid_t
-procfs_wait (ptid_t ptid, struct target_waitstatus *status)
+procfs_wait (struct target_ops *ops,
+            ptid_t ptid, struct target_waitstatus *status)
 {
   /* First cut: loosely based on original version 2.1 */
   procinfo *pi;
@@ -4842,7 +4845,7 @@ procfs_kill_inferior (void)
  */
 
 static void
-procfs_mourn_inferior (void)
+procfs_mourn_inferior (struct target_ops *ops)
 {
   procinfo *pi;
 
@@ -5111,8 +5114,8 @@ procfs_set_exec_trap (void)
  */
 
 static void
-procfs_create_inferior (char *exec_file, char *allargs, char **env,
-                       int from_tty)
+procfs_create_inferior (struct target_ops *ops, char *exec_file,
+                       char *allargs, char **env, int from_tty)
 {
   char *shell_file = getenv ("SHELL");
   char *tryname;
@@ -5269,7 +5272,7 @@ procfs_thread_alive (ptid_t ptid)
 /* Convert PTID to a string.  Returns the string in a static buffer.  */
 
 char *
-procfs_pid_to_str (ptid_t ptid)
+procfs_pid_to_str (struct target_ops *ops, ptid_t ptid)
 {
   static char buf[80];
 
@@ -5790,17 +5793,17 @@ info_mappings_callback (struct prmap *map, int (*ignore) (), void *unused)
 #endif
 
   if (gdbarch_addr_bit (current_gdbarch) == 32)
-    printf_filtered ("\t%#10lx %#10lx %#10x %#10x %7s\n",
+    printf_filtered ("\t%#10lx %#10lx %#10lx %#10x %7s\n",
                     (unsigned long) map->pr_vaddr,
                     (unsigned long) map->pr_vaddr + map->pr_size - 1,
-                    map->pr_size,
+                    (unsigned long) map->pr_size,
                     pr_off,
                     mappingflags (map->pr_mflags));
   else
-    printf_filtered ("  %#18lx %#18lx %#10x %#10x %7s\n",
+    printf_filtered ("  %#18lx %#18lx %#10lx %#10x %7s\n",
                     (unsigned long) map->pr_vaddr,
                     (unsigned long) map->pr_vaddr + map->pr_size - 1,
-                    map->pr_size,
+                    (unsigned long) map->pr_size,
                     pr_off,
                     mappingflags (map->pr_mflags));
 
This page took 0.025741 seconds and 4 git commands to generate.