Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Doug Evans <xdje42@gmail.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Improve and fix catch-syscall.exp
Date: Mon, 16 Dec 2013 04:24:00 -0000	[thread overview]
Message-ID: <m3zjo12zkd.fsf@redhat.com> (raw)
In-Reply-To: <CAP9bCMSDiTjTrQo-G7OBEBYcjxPCzhnmY8-s_ZWdhdNeGf6k5A@mail.gmail.com>	(Doug Evans's message of "Sun, 15 Dec 2013 10:44:40 -0800")

On Sunday, December 15 2013, Doug Evans wrote:

> Alternatively, gdb knows the numbers.  IWBN to provide a way to print
> them, and then the .exp file could get the numbers from that.
> OTOH, one could just have the .exp do the catch and process the output
> to get the number.
>
> (gdb) catch syscall 6
> Catchpoint 2 (syscall 'close' [6])
> (gdb) catch syscall close
> Catchpoint 1 (syscall 'close' [6])

Yes, it can be done.  But testing for the correctness of this number is
also part of the test, IMO...

> One might even check the .c __NR_ value with gdb's value computed from
> the .exp for extra paranoid testing, but I'm guessing there's
> insufficient benefit.

... and maybe it isn't an insufficient benefit.  I mean, currently
"catch syscall" works on the host only, but it's being implemented in
gdbserver and eventually I guess it'll be a good idea to really check
those numbers against the hard-coded ones.  Currently, they are
hard-coded in the .exp file, but as you said, one could check the __NR_*
value too...

Anyway, just my opinion of why we should keep those numbers hard-coded
somewhere.

-- 
Sergio


  reply	other threads:[~2013-12-16  4:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13 23:06 Sergio Durigan Junior
2013-12-15 18:31 ` Doug Evans
2013-12-15 18:44   ` Doug Evans
2013-12-16  4:24     ` Sergio Durigan Junior [this message]
2013-12-16  4:20   ` Sergio Durigan Junior
2013-12-16 23:09   ` Sergio Durigan Junior
2013-12-17 10:24     ` Pedro Alves
2013-12-17 17:35       ` Sergio Durigan Junior
2013-12-18 21:10         ` Doug Evans
2013-12-18 22:26           ` Sergio Durigan Junior
2013-12-16 17:50 ` Pedro Alves
2013-12-16 17:59   ` Sergio Durigan Junior

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=m3zjo12zkd.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=xdje42@gmail.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