From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1118 invoked by alias); 31 Jan 2011 17:50:25 -0000 Received: (qmail 1105 invoked by uid 22791); 31 Jan 2011 17:50:24 -0000 X-SWARE-Spam-Status: No, hits=1.0 required=5.0 tests=AWL,BAYES_00,BOTNET,RDNS_NONE X-Spam-Check-By: sourceware.org Received: from Unknown (HELO mail3.caviumnetworks.com) (12.108.191.235) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 31 Jan 2011 17:50:19 +0000 Received: from caexch01.caveonetworks.com (Not Verified[192.168.16.9]) by mail3.caviumnetworks.com with MailMarshal (v6,7,2,8378) id ; Mon, 31 Jan 2011 09:51:07 -0800 Received: from caexch01.caveonetworks.com ([192.168.16.9]) by caexch01.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 31 Jan 2011 09:50:17 -0800 Received: from dd1.caveonetworks.com ([12.108.191.236]) by caexch01.caveonetworks.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 31 Jan 2011 09:50:17 -0800 Message-ID: <4D46F658.3020302@caviumnetworks.com> Date: Mon, 31 Jan 2011 19:00:00 -0000 From: David Daney User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Ping: [Patch v2] Add mips*-linux* catch syscall support. References: <4D3DD73C.9060201@caviumnetworks.com> In-Reply-To: <4D3DD73C.9060201@caviumnetworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2011-01/txt/msg00590.txt.bz2 If it is not too much trouble, could a Maintainer review this patch? Thanks in advance, David Daney On 01/24/2011 11:47 AM, David Daney wrote: > Change in v2: Simplify memory allocation in > mips_linux_get_syscall_number() as suggested by Nathen Froyd. > > From the original posting: > > This patch adds catch syscall support for all three MIPS Linux ABIs > (o32, n32 and n64). > > For the most part this works as expected, except for one small detail. > The MIPS Linux syscall ABI passes the syscall number in register v0 when > making a syscall, but it also uses the same register to return > information back from the syscall. This clobbering of the syscall number > is currently not well handled by GDB. We PASS all the tests for '(call > to syscall ???)', but FAIL those for (returned from syscall ???), > because GDB expects to be able to obtain the syscall number on syscall > exit. For MIPS Linux it will never be available. > > I think the real fix for this is to improve the core 'catch syscall' > support so that it can either remember the syscall number, or not try to > print out bogus information, but that would be something for a different > patch. > > Tested on mips-linux, and mips64-linux. > > OK to commit? > > 2011-01-24 David Daney > > * mips-linux-tdep.c: Include xml-syscall.h. > (mips_linux_get_syscall_number): New function. > (mips_linux_init_abi): Add calls to > mips_linux_get_syscall_number() and set_xml_syscall_file_name(). > * data-directory/Makefile.in (SYSCALLS_FILES): Add > mips-o32-linux.xml, mips-n32-linux.xml and mips-n64-linux.xml > * syscalls/mips-n32-linux.xml: New file. > * syscalls/mips-n64-linux.xml: New file. > * syscalls/mips-o32-linux.xml: New file. > > 2011-01-24 David Daney > > * gdb.base/catch-syscall.exp: Enable for mips*-linux*.