[RFA]: Fix for pending breakpoints in manually loaded/unloaded shlibs

Michael Chastain mec.gnu@mindspring.com
Mon Aug 23 22:09:00 GMT 2004


The test script is not quite okay.

The test script should match the output from the last released gdb,
gdb 6.2, as well as the current gdb.

When I compare gdb 6.2 with gdb HEAD, or with gdb 6.2.91 (when it
comes out), I use the same current test suite with both the old
and new gdb's.  I can't compare:

  (gdb 6.2, suite 6.2)
  (gdb 6.2.91, suite 6.2.91)
  
... because there are thousands of new tests and test name changes.
So I have to compare:

  (gdb 6.2, suite 6.2.91)
  (gdb 6.2.91, suite 6.2.91)

So it helps me if the test suite continues to match
the messages from the last released gdb.

If you're curious, you can see some of these comparison tables here:

  http://www.shout.net/~mec/sunday/2004-08-18/Compare-by-gdb-branch-HEAD.html

===

You can do this either by fuzzing the pattern up with some wild cards,
or with the "(...|...)" construct, or by using a gdb_test_multiple
with one arm for the old output and one arm for the new.
Personally I would go for gdb_test_multiple:

  set name "continuing to end of program"
  gdb_test_multiple "continue" $name {
    -re "Continuing.*y is 7.*warning: ... disabling unloaded shared library breakpoints ....*$gdb_prompt $" {
      # old gdb 6.2
      pass $name
    }
    -re "Continuing.*y is 7.*warning: ... disabling breakpoints for.*unloadshr.sl.* ... $gdb_prompt $" {
      # new gdb HEAD 2004-08-23
      pass $name
    }
  }

Also, what system did you test on?

===

2004-08-23  Jeff Johnston  <jjohnstn@redhat.com>

	* gdb.base/unload.exp: Fix expected warning message to match
	latest format.



More information about the Gdb-patches mailing list