From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51278 invoked by alias); 22 Oct 2015 13:45:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 51243 invoked by uid 89); 22 Oct 2015 13:45:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (109.74.193.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Oct 2015 13:45:16 +0000 Received: from hogfather.0x04.net (89-65-84-110.dynamic.chello.pl [89.65.84.110]) by xyzzy.0x04.net (Postfix) with ESMTPS id 4AA7A40151; Thu, 22 Oct 2015 15:39:57 +0200 (CEST) Received: by hogfather.0x04.net (Postfix, from userid 1000) id 3AF6E5800CD; Thu, 22 Oct 2015 15:39:43 +0200 (CEST) From: =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= To: palves@redhat.com, qiyaoltc@gmail.com Cc: gdb-patches@sourceware.org, =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= Subject: [PATCH v2 09/13] gdb/linux-record: Fix newfstatat handling Date: Thu, 22 Oct 2015 15:07:00 -0000 Message-Id: <1445521166-14492-9-git-send-email-koriakin@0x04.net> In-Reply-To: <1445521166-14492-1-git-send-email-koriakin@0x04.net> References: <5628E5D6.5020706@0x04.net> <1445521166-14492-1-git-send-email-koriakin@0x04.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2015-10/txt/msg00466.txt.bz2 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 + * linux-record.c (record_linux_system_call): Fix newstatat. + +2015-10-22 Marcin Kościelnicki + * linux-record.c (record_linux_system_call): Fix [gs]etgroups16. 2015-10-22 Marcin Kościelnicki 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