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>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 03 Mar 2015 12:38:34 +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> <54F0BC6B dot 8070901 at redhat dot com> <86pp8qi8ui dot fsf at gmail dot com>
On 03/03/2015 12:06 PM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
>
>> 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.
>
> No, but we need to tweak test case to emit UNSUPPORTED instead of FAIL
> if the target doesn't support "catch syscall".
Yeah, I'm imagining that we'll just detect it like we detect failures
to insert hardware breakpoints / watchpoints, at resume time.
Something like:
set test "continue with catch syscall"
gdb_test_multiple "continue" $test {
-re "Could not insert syscall catchpoint.*$gdb_prompt $" {
...
}
-re "Breakpoint .*$gdb_prompt $" {
...
}
}
Thanks,
Pedro Alves