Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch 2/2] Displaced stepping across fork/vfork : test case
Date: Wed, 14 Sep 2011 12:32:00 -0000	[thread overview]
Message-ID: <201109141255.02766.pedro@codesourcery.com> (raw)
In-Reply-To: <4E708B7E.3040701@codesourcery.com>

On Wednesday 14 September 2011 12:09:50, Yao Qi wrote:
> > Very recent kernels will allow choosing the syscall instruction
> > in the vsyscall page.  It'll be better to make the test
> > skip on !x86-linux at the top, and then, change the test
> > to look for all alternatives of the syscall insn.
> >
> 
> I read some pages on vsyscall, and thought we can fetch the value of 
> AT_SYSINFO in auxv to get the address of __kernel_vsyscall.  However, 
> another simpler way comes up in my mind is to set possible syscall insn 
> to $syscall_insn like this,
> 
>    set syscall_insn "(int|syscall|sysenter)"
> 
> If we match either of them in instruction stream, we are sure program 
> will enter to syscall, so we don't have to worry about vsyscall page.

Yes, exactly what I meant.  Thanks.



> +       "continue to marker ($syscall)"
> +}

> +disp_step_cross_syscall "fork"
> +disp_step_cross_syscall "vfork"

There may be some fail/passes done from within gdb.exp procedures that
won't get that $syscall diferenciator, thus we can end up with
more than one UNTESTED/FAIL/PASS with the same message on gdb.sum/gdb.log.
It'd be better to use $pf_prefix instead (grep for uses in the testsuite).



We need to do something for systems that can't set a breakpoint in
the vsyscall page though (mine can't).  The test is surely failing there.



In the vfork test:

> +      global = 1;

Is the variable used for anything?


Otherwise, this looks okay to me.

-- 
Pedro Alves


  reply	other threads:[~2011-09-14 11:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-11  9:55 Yao Qi
2011-09-12 15:03 ` Pedro Alves
2011-09-14 11:32   ` Yao Qi
2011-09-14 12:32     ` Pedro Alves [this message]
2011-09-15 15:32       ` Yao Qi
2011-09-15 16:13         ` Pedro Alves
2011-09-16  6:49           ` Yao Qi
2011-09-16 10:44             ` Pedro Alves
2011-09-17 14:35               ` [committed]: " 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=201109141255.02766.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.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