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]

Ping: [Patch v2] Add mips*-linux* catch syscall support.


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 <ddaney@caviumnetworks.com>

* 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 <ddaney@caviumnetworks.com>

* gdb.base/catch-syscall.exp: Enable for mips*-linux*.


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