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

Daniel,


> > +gdb_test "step" "function4.*at .*$srcfile:\[0-9\]+.*"
> > +
> > +gdb_test "step 3" ".*${decimal}.*y = x.* y;.*"
>
> That's a lot of wildcards.  Can't you put a marker comment on the lines
> you want to reach?
>

I want to test vanilla step and step with value separately, this is why I
did what I did. Also, I referred some of the existing testcases and
followed the style of doing things there. Anyways here is the patch with
most of the mods.

2005-05-05  Manoj Iyer  <manjo@austin.ibm.com>

        * gdb.server/server-run.exp: Added new testcases
        * gdb.server/server.c: Added nested function call for backtrace
        testing.

Common subdirectories: ./new/src/gdb/testsuite/gdb.server/CVS and ./old/src/gdb/testsuite/gdb.server/CVS
diff ./new/src/gdb/testsuite/gdb.server/server-run.exp ./old/src/gdb/testsuite/gdb.server/server-run.exp
41d40
< # test setting a breakpoint
43,65c42
<
< gdb_test "continue" ".*Continuing\\..*Breakpoint \[0-9\]+, main.*at.*$srcfile:\[0-9\].*"
<
< # test if list command displays source code
< gdb_test "list\n" ".*main.*\{.*"
<
< # set breakpoint at a function and test backtrace command
< gdb_test "break function3" "Breakpoint 2 at.*file .*$srcfile, line \[0-9\]+.*"
<
< gdb_test "continue" ".*Continuing\\..*Breakpoint \[0-9\]+, function3.*at.*$srcfile:\[0-9\].*"
<
< gdb_test "backtrace" "\#0.*function3.*at.*server.c:\[0-9\]+.*\#1.*function2.*at.*server.c:\[0-9\]+.*\#2.*function1.*at.*server.c:\[0-9\]+.*\#3.*main.*at.*server.c:\[0-9\]+"
<
< # test vanilla step
< gdb_test "step" "function4.*at .*$srcfile:\[0-9\]+.*"
<
< # test step with a count
< gdb_test "step 3" ".*${decimal}.*y = x.* y;.*"
<
< # test if print command can display value of variable.
< gdb_test "print x" ".\[0-9\]* = 3.*"
<
< gdb_exit
---
> gdb_test "continue" "Breakpoint.* main .*" "continue to main"
diff ./new/src/gdb/testsuite/gdb.server/server.c ./old/src/gdb/testsuite/gdb.server/server.c
20,52d19
< static void
< function4()
< {
<
<    int x = 1;
<    int y = 2;
<
<    x = x + y;
<    y = x * y;
<    return;
< }
<
<
< static void
< function3()
< {
<    function4();
< }
<
<
< static void
< function2()
< {
<     function3();
< }
<
<
< static void
< function1()
< {
<     function2();
< }
<
56,57c23
<     function1();
<     return 0;
---
>   return 0;


Thanks
Manjo


  reply	other threads:[~2005-05-04 21:59 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
2005-05-04 18:39   ` Manoj Iyer
2005-05-04 18:46     ` Daniel Jacobowitz
2005-05-04 21:59       ` Manoj Iyer [this message]
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=Pine.LNX.4.58.0505041653220.30511@lazy \
    --to=manjo@austin.ibm.com \
    --cc=gdb-patches@sources.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