Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Manoj Iyer <manjo@austin.ibm.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] new GDB server testcase
Date: Wed, 04 May 2005 14:43:00 -0000	[thread overview]
Message-ID: <20050504144044.GA14120@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0505040918090.30511@lazy>

On Wed, May 04, 2005 at 09:24:20AM -0500, Manoj Iyer wrote:
> 
> I wrote a testcase for testing basic gdbserver functionality over TCP
> connection. I will add more cases like step, print, etc once the testcase
> is approved.

Thanks for doing this.

Can you find a better name than "basictest.exp"?  Is there a reason not
to add these basic tests to server-run.exp?

> /* File: test basic remote debug functionality through TCP connection.       */
> /* Author: Manoj Iyer <manjo@austin.ibm.com>                                 */

This needs a copyright notice.

> #include <stdio.h>
> #include <stdlib.h>

Why are you using stdio?  We have no easy way to get at the program's
output.

> 
> main()
> {
>     printf("hello gdb\n");
>     function1();
> }

That's not valid C, though many compilers will accept it.  "int main"
and "return 0" please.

> 
> ======================================================================
> 
> ======================= basictest.exp ===============================

Please use server-run.exp as a template instead of whatever you were
using.  For instance, use skip_gdbserver_tests, and don't use
gdb_suppress_entire_file.

> gdb_exit
> global gdbport
> 
> set ret [gdbserver_spawn $binfile ""]
> set gdbport [lindex $ret 1]
> 
> gdb_start
> 
> send_gdb "file $binfile \n "
> 
> gdb_target_cmd "remote" $gdbport

... and don't duplicate any of that.  gdbserver_load.  I went to a lot
of trouble to write the infrastructure, so please use it :-)

-- 
Daniel Jacobowitz
CodeSourcery, LLC


  reply	other threads:[~2005-05-04 14:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-04 14:27 Manoj Iyer
2005-05-04 14:43 ` Daniel Jacobowitz [this message]
2005-05-04 18:39   ` Manoj Iyer
2005-05-04 18:46     ` Daniel Jacobowitz
2005-05-04 21:59       ` Manoj Iyer
2005-05-04 22:07         ` Daniel Jacobowitz
2005-05-05 16:23           ` Manoj Iyer
2005-05-05 16:27             ` Daniel Jacobowitz

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=20050504144044.GA14120@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=manjo@austin.ibm.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