Re: [RFA] fix *stopped for CLI commands

Pedro Alves
2009-02-15T15:47:53Z

Oops, I'm seeing this:

Running ../../../src/gdb/testsuite/gdb.gdb/observer.exp ...
FAIL: gdb.gdb/observer.exp: second observer attached; check second observer counter value
FAIL: gdb.gdb/observer.exp: 1st observer added; check first observer counter value
FAIL: gdb.gdb/observer.exp: 2nd observer added; check first observer counter value
FAIL: gdb.gdb/observer.exp: 2nd observer added; check second observer counter value
FAIL: gdb.gdb/observer.exp: 3rd observer added; check first observer counter value
FAIL: gdb.gdb/observer.exp: 3rd observer added; check second observer counter value
FAIL: gdb.gdb/observer.exp: 3rd observer added; check third observer counter value
FAIL: gdb.gdb/observer.exp: 2nd observer removed; check first observer counter value
FAIL: gdb.gdb/observer.exp: 2nd observer removed; check third observer counter value
FAIL: gdb.gdb/observer.exp: 1st observer removed; check third observer counter value
FAIL: gdb.gdb/observer.exp: three observers added; check first observer counter value
FAIL: gdb.gdb/observer.exp: three observers added; check second observer counter value
FAIL: gdb.gdb/observer.exp: three observers added; check third observer counter value
FAIL: gdb.gdb/observer.exp: third observer removed; check first observer counter value
FAIL: gdb.gdb/observer.exp: third observer removed; check second observer counter value
FAIL: gdb.gdb/observer.exp: second observer removed; check first observer counter value

Due to:

(gdb) PASS: gdb.gdb/observer.exp: second observer attached; reset third observer counter
call observer_notify_normal_stop (0)
Too few arguments in function call.
(gdb) PASS: gdb.gdb/observer.exp: second observer attached; sending notification

(outch, that should have been a FAIL)

The test needs to be adjusted to the new extra argument this
notification takes.

Alternatively, we could use a safer and more future proof test specific
notification in doc/observer.texi, instead of reusing the normal_stop
notification. Say,

@deftypefun void test_notification (int @var{somearg})
For internal testing. Do not use. See testsuite/gdb.gdb/observer.exp.
@end deftypefun

--
Pedro Alves