Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch] Add tests for JIT debugging interface
Date: Wed, 12 Jan 2011 07:02:00 -0000	[thread overview]
Message-ID: <4D2D3E94.4070509@codesourcery.com> (raw)
In-Reply-To: <20110111232641.AE3D5190C55@elbrus2.mtv.corp.google.com>

On 01/11/2011 05:26 PM, Paul Pluzhnikov wrote:
> +
> +int main(int argc, char *argv[])
> +{
> +  if (argc<  2)
> +    usage(argv[0]);
> +  else
> +    {
> +      const char *const libname = argv[1];
> +      int i, fd, count = 1;
> +      struct stat st;
> +
> +      if (argc>  2)
> +        count = atoi (argv[2]);
> +
> +      if ((fd = open (libname, O_RDONLY)) == -1)
> +        {
> +          fprintf (stderr, "open (\"%s\", O_RDONLY): %s\n", libname, strerror (errno));

This line is too long.

> +          exit (1);
> +        }
> +
> +      if (fstat (fd,&st) != 0)
> +        {
> +          fprintf (stderr, "fstat (\"%d\"): %s\n", fd, strerror (errno));
> +          exit (1);
> +        }
> +
> +      for (i = 0; i<  count; ++i)
> +        {
> +          const void *const addr = mmap (0, st.st_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);

This line is too long as well.

> +# Start with a fresh gdb.
> +
> +gdb_exit
> +gdb_start
> +gdb_reinitialize_dir $srcdir/$subdir
> +gdb_load $binfile
> +
We can use "clean_restart" here.

> +proc one_test {count match_str} {
> +    global solib_binfile gdb_prompt

I don't find any usage of "gdb_prompt", we probably remove it.


Test cases work well in native GDB.  Does gdbserver have JIT debugging 
interface also?  If not, we probably should skip this test for remote 
mode or kfail it.

-- 
Yao Qi


  reply	other threads:[~2011-01-12  5:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 23:28 Paul Pluzhnikov
2011-01-12  7:02 ` Yao Qi [this message]
2011-01-12 10:44   ` Pedro Alves
2011-01-12 15:19     ` Paul Pluzhnikov
2011-01-12 16:12       ` Pedro Alves
2011-01-12 17:23       ` Yao Qi
2011-01-12 17:33         ` Paul Pluzhnikov
2011-01-18 17:07           ` Paul Pluzhnikov
2011-01-19 19:27           ` Pedro Alves
2011-01-19 20:30             ` Paul Pluzhnikov
2011-01-19 21:04               ` Pedro Alves
2011-01-19 21:09               ` Yao Qi
2011-01-12 10:03 ` Pedro Alves

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=4D2D3E94.4070509@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ppluzhnikov@google.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