This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 08/11] gdb/linux-record: Fix newfstatat handling


The struct stat pointer is in the third argument, not the second.
---
 gdb/linux-record.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gdb/linux-record.c b/gdb/linux-record.c
index 25cbda1..9f38c0b 100644
--- a/gdb/linux-record.c
+++ b/gdb/linux-record.c
@@ -1112,13 +1112,19 @@ Do you want to stop the program?"),
     case gdb_sys_newstat:
     case gdb_sys_newlstat:
     case gdb_sys_newfstat:
-    case gdb_sys_newfstatat:
       regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
       if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					 tdep->size_stat))
         return -1;
       break;
 
+    case gdb_sys_newfstatat:
+      regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
+      if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+					 tdep->size_stat))
+        return -1;
+      break;
+
     case gdb_sys_uname:
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
-- 
2.6.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]