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: Yao Qi <qiyaoltc at gmail dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: Pedro Alves <palves at redhat dot com>, Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Fri, 06 Mar 2015 16:36:30 +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> <877fv3kqx1 dot fsf at redhat dot com> <86lhjei8md dot fsf at gmail dot com> <54F5A90E dot 8050704 at redhat dot com> <87bnkaklbe dot fsf at redhat dot com>
Sergio Durigan Junior <sergiodj@redhat.com> writes:
> Anyway, I just raised this point because we shouldn't "return 1" when
> asked if inf-ttrace.c supports "catch syscall".
Sergio,
I'll remove inf_ttrace_supports_syscall_catchpoint from my updated
patch. Thanks for pointing this out.
In my patch, "catch syscall" command is allowed on the target which
supports catch syscall. On exec target, GDB will error on command
"catch syscall", so it causes regressions in catch-syscall.exp.
The proc test_catch_syscall_multi_arch in catch-syscall.exp tests
syscall number is mapped to different syscall number on different
gdbarch, but it has:
# We are not interested in loading any binary here, and in
# some systems (PowerPC, for example), if we load a binary
# there is no way to set other architecture.
As you mentioned in
https://sourceware.org/bugzilla/show_bug.cgi?id=10737#c4 , when GDB
starts an inferior, the arch is set correspondingly, so it is unable
reproduce the bug. test_catch_syscall_multi_arch is the simpler
reproducer, IMO. How about 'upgrade' test_catch_syscall_multi_arch like
this?
- file 32-bit program
- run to main
- catch syscall 5
- kill
- file 64-bit program
- run to main
- catch syscall 5
--
Yao (éå)