public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: Pedro Alves <palves@redhat.com>,  Yao Qi <qiyaoltc@gmail.com>,
	 gdb-patches@sourceware.org
Subject: Re: [RFC] Support command "catch syscall" properly on different targets
Date: Fri, 06 Mar 2015 16:36:00 -0000	[thread overview]
Message-ID: <868ufahylt.fsf@gmail.com> (raw)
In-Reply-To: <87bnkaklbe.fsf@redhat.com> (Sergio Durigan Junior's message of	"Tue, 03 Mar 2015 13:06:13 -0500")

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 (齐尧)

  parent reply	other threads:[~2015-03-06 16:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 14:23 Yao Qi
2015-02-27 18:49 ` Doug Evans
2015-03-03 11:56   ` Yao Qi
2015-03-03 12:14     ` Pedro Alves
2015-02-27 18:50 ` Pedro Alves
2015-03-03 12:06   ` Yao Qi
2015-03-03 12:38     ` Pedro Alves
2015-02-27 21:04 ` Sergio Durigan Junior
2015-03-03 12:11   ` Yao Qi
2015-03-03 12:29     ` Pedro Alves
2015-03-03 18:06       ` Sergio Durigan Junior
2015-03-03 18:18         ` Pedro Alves
2015-03-06 16:36         ` Yao Qi [this message]
2015-03-06 22:04           ` Sergio Durigan Junior
2015-03-09 14:29             ` Yao Qi
2015-03-10  4:53               ` Sergio Durigan Junior
2015-03-09 14:10         ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868ufahylt.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=sergiodj@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).