Support more syscalls in linux-record: pipe2 epoll_create1 eventfd2 fallocate dup3...
authorYao Qi <yao.qi@linaro.org>
Fri, 19 Feb 2016 15:51:03 +0000 (15:51 +0000)
committerYao Qi <yao.qi@linaro.org>
Mon, 29 Feb 2016 16:44:50 +0000 (16:44 +0000)
This patch adds more syscalls in linux-record.

gdb:

2016-02-29  Yao Qi  <yao.qi@linaro.org>

* linux-record.h (enum gdb_syscall) <gdb_sys_fallocate>: New.
<gdb_sys_eventfd2, gdb_sys_epoll_create1, gdb_sys_dup3>: New.
<gdb_sys_pipe2, gdb_sys_inotify_init1>: New.
* linux-record.c (record_linux_system_call): Handle them.

gdb/ChangeLog
gdb/linux-record.c
gdb/linux-record.h

index bc6a713d01a3d027c9082f86ed277080981471be..aa5bb97ab448e9f2f1c4565372742ed2b1d4f59c 100644 (file)
@@ -1,3 +1,10 @@
+2016-02-29  Yao Qi  <yao.qi@linaro.org>
+
+       * linux-record.h (enum gdb_syscall) <gdb_sys_fallocate>: New.
+       <gdb_sys_eventfd2, gdb_sys_epoll_create1, gdb_sys_dup3>: New.
+       <gdb_sys_pipe2, gdb_sys_inotify_init1>: New.
+       * linux-record.c (record_linux_system_call): Handle them.
+
 2016-02-28  Iain Buclaw  <ibuclaw@gdcproject.org>
 
        * d-namespace.c (d_lookup_symbol_imports): Avoid recursive lookups from
index 29e299d4eb896cda6456d95290c952a3d1403b9e..a40845af9cb72f8ff4e9fa2fbd4ae25680ce2943 100644 (file)
@@ -2302,6 +2302,21 @@ Do you want to stop the program?"),
         }
       break;
 
+    case gdb_sys_fallocate:
+    case gdb_sys_eventfd2:
+    case gdb_sys_epoll_create1:
+    case gdb_sys_dup3:
+      break;
+
+    case gdb_sys_pipe2:
+      regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
+      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+                                        tdep->size_int * 2))
+      break;
+
+    case gdb_sys_inotify_init1:
+      break;
+
     default:
       printf_unfiltered (_("Process record and replay target doesn't "
                            "support syscall number %d\n"), syscall);
index ca6a11704767ae89794f78508541d5331e0c4618..b317ab106e4d31c8cbdf9e632694101ddd86192a 100644 (file)
@@ -504,6 +504,12 @@ enum gdb_syscall {
   gdb_sys_move_pages = 317,
   gdb_sys_getcpu = 318,
   gdb_sys_epoll_pwait = 319,
+  gdb_sys_fallocate = 324,
+  gdb_sys_eventfd2 = 328,
+  gdb_sys_epoll_create1 = 329,
+  gdb_sys_dup3 = 330,
+  gdb_sys_pipe2 = 331,
+  gdb_sys_inotify_init1 = 332,
   gdb_sys_socket = 500,
   gdb_sys_connect = 501,
   gdb_sys_accept = 502,