Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: David Carlton <carlton@math.stanford.edu>
To: Joel Brobecker <brobecker@gnat.com>
Cc: gdb@sources.redhat.com
Subject: Re: Need suggestions on how to test observer.c
Date: Tue, 11 Mar 2003 20:31:00 -0000	[thread overview]
Message-ID: <ro1adg1r6gn.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <20030310224356.GG972@gnat.com>

On Mon, 10 Mar 2003 14:43:56 -0800, Joel Brobecker <brobecker@gnat.com> said:

> The ideal solution would be to use this little program as the unit-test
> driver, and have a dejagnu testcase check its output. Unfortunately,
> this program would of course depend on observer.o, which depends on
> utils.o which depends on [... etc]. Not easy to put in place. One
> possible approach would be to link the test program against libgdb.a
> and dependents. In fine, we would more or less link the test program
> with the same command as for gdb itself. This is a rather brutal approach,
> but this should be easy to use to generate other unit-test drivers.
> This would require a large change in the testsuite Makefiles, and
> I haven't looked at how this could be done.

I agree that GDB should have more unit tests, and the idea of linking
libgdb.a was the best idea I could come up with.  Some difficulties
that might arise:

* Getting the Makefiles to work.  Probably not too hard, but who
  knows.

* Making sure that we can generate output that dejagnu likes.  dejagnu
  actually comes with a header file dejagnu.h that could be helpful
  here (though that might be a C++-only thing; I'm not sure).

* Would linking against libgdb.a take a long time?  If so, that would
  pose problems.  On the other hand, if the alternative is to run GDB
  on itself, then that's not the speediest thing to do either.

* And, of course, GDB isn't always modular enough to make writing unit
  tests easy, but there's not much we can do about that.

David Carlton
carlton@math.stanford.edu


      parent reply	other threads:[~2003-03-11 20:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-10 22:43 Joel Brobecker
2003-03-10 23:26 ` Daniel Jacobowitz
2003-03-11 19:09   ` Joel Brobecker
2003-03-11 20:31 ` David Carlton [this message]

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=ro1adg1r6gn.fsf@jackfruit.Stanford.EDU \
    --to=carlton@math.stanford.edu \
    --cc=brobecker@gnat.com \
    --cc=gdb@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