This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Support command "catch syscall" properly on different targets
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Fri, 27 Feb 2015 18:50:19 +0000
- Subject: Re: [RFC] Support command "catch syscall" properly on different targets
- Authentication-results: sourceware.org; auth=none
- References: <1425047015-1906-1-git-send-email-qiyaoltc at gmail dot com>
On 02/27/2015 02:23 PM, Yao Qi wrote:
> (gdb) target remote :1234
> Remote debugging using :1234
> Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
> 0x00007ffff7ddb2d0 in ?? () from /lib64/ld-linux-x86-64.so.2
> (gdb) catch syscall close
> The feature 'catch syscall' is not supported on this target yet.
>
> which looks more reasonable to me. However, this patch causes some
> regressions in catch-syscall.exp,
>
> catch syscall nonsense_syscall^M
> The feature 'catch syscall' is not supported on this target yet.^M
> (gdb) FAIL: gdb.base/catch-syscall.exp: catch syscall to a nonsense syscall is prohibited
>
> because syscall catchpoint isn't supported on exec target.
> I can move these tests to the place where inferior is created, before
> I go too far, I'd like to hear what do you think of this.
Yes, I guess we should do that. If we're not connected to a
target yet, we have no clue whether the target that ends up
connected supports catch syscall or not.
Do we actually need to do anything when the inferior is created?
Supposedly once the inferior is created, we'll try to insert
the catchpoint, and that will fail is the target does not
support it.
Thanks,
Pedro Alves