Hi,

I'm using the DejaGnu testsuite to test a port of gdb to one of our
company's boards, though this first bug is _not_ related to my port. I
get the same behaviour on a gdb 5.0 checked out 2000-08-09 built for
native (i686-pc-linux-gnu) linux (2.2.15). My gcc is a 2.95.2.

With two test cases, printcmds.exp and setvar.exp, I get an error saying
"Process no longer exists" for several tests in each test case. When I
investigate the function gdb_test in gdb.exp, which displays this error
message, it seems as if an eof is encountered after the command is sent
to the target. Later, the correct output appears, but by then the test
is already considered UNRESOLVED because of the eof.

If I repeat the exact sequence of commands by hand, the problem is not
reproduced, and the test goes well.

The following tests in printcmds.exp all become UNRESOLVED:

p int1dim
p int2dim
p int3dim
p int4dim
p a1
p int1dim[0]@2
p int1dim[0]@2@3
p/x (short [])0x12345678)
print {0,1,2}
print {(long)0,(long)1,(long)2}
print {{0,1,2},{3,4,5}}

I've been unable to figure out who produces this eof (I've looked at the
remote protocol also). I've tried it under different shells (zsh and
bash). Any input on this would be appreciated -- I'm lost.


A significantly smaller problem, related to my port, is with
pointers.exp. In pointers.c there is a double D and a double* pD
declared, and then the following statements:

D = -1.375E-123;
pD = &D;

which assumes that a double is (at least) 8 bytes (yes; my target has 4
byte doubles). The test doesn't explicitly check if the value of D is
correct, just the value of *pD (which fails though the dereferencing
works fine).

If there's a reason for using a really small float I would like to see
something like FLT_MIN from float.h and then testing that *pD == D,
rather than testing that *pD == -1.375E-123. Otherwise, perhaps
something that will fit in _all_ floats (like 0.5) could be used.


Thanks,

Orjan Friberg
Axis Communications AB

Reply via email to