This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v2 09/13] gdb/linux-record: Fix newfstatat handling
- From: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- To: palves at redhat dot com, qiyaoltc at gmail dot com
- Cc: gdb-patches at sourceware dot org, Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- Date: Thu, 22 Oct 2015 15:39:22 +0200
- Subject: [PATCH v2 09/13] gdb/linux-record: Fix newfstatat handling
- Authentication-results: sourceware.org; auth=none
- References: <5628E5D6 dot 5020706 at 0x04 dot net> <1445521166-14492-1-git-send-email-koriakin at 0x04 dot net>
The struct stat pointer is in the third argument, not the second.
gdb/ChangeLog:
* linux-record.c (record_linux_system_call): Fix newstatat.
---
gdb/ChangeLog | 4 ++++
gdb/linux-record.c | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1c3cc04..e3afacd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2015-10-22 Marcin KoÅcielnicki <koriakin@0x04.net>
+ * linux-record.c (record_linux_system_call): Fix newstatat.
+
+2015-10-22 Marcin KoÅcielnicki <koriakin@0x04.net>
+
* linux-record.c (record_linux_system_call): Fix [gs]etgroups16.
2015-10-22 Marcin KoÅcielnicki <koriakin@0x04.net>
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