linux-record.c:record_linux_system_call: fix -Wpointer-sign
[deliverable/binutils-gdb.git] / gdb / linux-record.c
index 1311f001d263e745ea88c9153ac028b20ff3a4a6..c7697000b833a5cd63893303a82d0f43f27ada83 100644 (file)
@@ -1,6 +1,6 @@
 /* Process record and replay target code for GNU/Linux.
 
-   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2008-2013 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -695,21 +695,26 @@ record_linux_system_call (enum gdb_syscall syscall,
 
     case gdb_sys_munmap:
       {
-        int q;
         ULONGEST len;
 
         regcache_raw_read_unsigned (regcache, tdep->arg1,
                                     &tmpulongest);
         regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
-        target_terminal_ours ();
-        q = yquery (_("The next instruction is syscall munmap.  "
-                      "It will free the memory addr = 0x%s len = %u.  "
-                      "It will make record target get error.  "
-                      "Do you want to stop the program?"),
-                    OUTPUT_REG (tmpulongest, tdep->arg1), (int) len);
-        target_terminal_inferior ();
-        if (q)
-          return 1;
+        if (record_memory_query)
+          {
+           int q;
+
+            target_terminal_ours ();
+            q = yquery (_("\
+The next instruction is syscall munmap.\n\
+It will free the memory addr = 0x%s len = %u.\n\
+It will make record target cannot record some memory change.\n\
+Do you want to stop the program?"),
+                        OUTPUT_REG (tmpulongest, tdep->arg1), (int) len);
+            target_terminal_inferior ();
+            if (q)
+              return 1;
+          }
       }
       break;
 
@@ -765,6 +770,8 @@ record_linux_system_call (enum gdb_syscall syscall,
         if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
           return -1;
       }
+      break;
+
     case gdb_sys_recv:
       {
         ULONGEST size;
@@ -1141,10 +1148,11 @@ record_linux_system_call (enum gdb_syscall syscall,
     case gdb_sys_msgrcv:
       {
         ULONGEST msgp;
+        LONGEST l;
 
-        regcache_raw_read_signed (regcache, tdep->arg3, &tmpulongest);
+        regcache_raw_read_signed (regcache, tdep->arg3, &l);
         regcache_raw_read_unsigned (regcache, tdep->arg2, &msgp);
-        tmpint = (int) tmpulongest + tdep->size_long;
+        tmpint = l + tdep->size_long;
         if (record_arch_list_add_mem ((CORE_ADDR) msgp, tmpint))
           return -1;
       }
@@ -1173,7 +1181,7 @@ record_linux_system_call (enum gdb_syscall syscall,
           break;
         case RECORD_MSGRCV:
           {
-            ULONGEST second;
+            LONGEST second;
             ULONGEST ptr;
 
             regcache_raw_read_signed (regcache, tdep->arg3, &second);
This page took 0.025022 seconds and 4 git commands to generate.