* gdb.base/pending.exp failures
@ 2004-02-05 0:06 David Carlton
2004-02-05 0:21 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: David Carlton @ 2004-02-05 0:06 UTC (permalink / raw)
To: gdb; +Cc: Jeff Johnston
[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]
I'm getting testsuite failures from gdb.base/pending.exp. This is
i686-pc-linux-gnu (Red Hat 8.0, if that matters), lots of different
GCC's.
Usually, I get this:
FAIL: gdb.base/pending.exp: set pending breakpoint
FAIL: gdb.base/pending.exp: single pending breakpoint info
FAIL: gdb.base/pending.exp: pending plus real breakpoint info
FAIL: gdb.base/pending.exp: pending plus condition
FAIL: gdb.base/pending.exp: pending disabled
FAIL: gdb.base/pending.exp: pending disabled plus commands
FAIL: gdb.base/pending.exp: multiple pending breakpoints
FAIL: gdb.base/pending.exp: re-enabling pending breakpoint that can resolve instantly
but sometimes I get this:
FAIL: gdb.base/pending.exp: set pending breakpoint
FAIL: gdb.base/pending.exp: single pending breakpoint info
FAIL: gdb.base/pending.exp: pending plus real breakpoint info
FAIL: gdb.base/pending.exp: pending plus condition
FAIL: gdb.base/pending.exp: pending disabled
FAIL: gdb.base/pending.exp: pending disabled plus commands
FAIL: gdb.base/pending.exp: Set pending breakpoint 2
ERROR: Got interactive prompt.
ERROR: Got interactive prompt.
FAIL: gdb.base/pending.exp: re-enabling pending breakpoint that can resolve instantly
FAIL: gdb.base/pending.exp: continue to resolved breakpoint 2
FAIL: gdb.base/pending.exp: continue to resolved breakpoint 1
Log attached.
David Carlton
carlton@kealia.com
[-- Attachment #2: gdb.log --]
[-- Type: text/plain, Size: 7787 bytes --]
Test Run By carlton on Wed Feb 4 15:59:24 2004
Native configuration is i686-pc-linux-gnu
=== gdb tests ===
Schedule of variations:
unix
Running target unix
Using /usr/local/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/local/share/dejagnu/config/unix.exp as generic interface file for target.
Using ./config/unix.exp as tool-and-target-specific interface file.
Running ./gdb.base/pending.exp ...
get_compiler_info: gcc-3-2
Executing on host: gcc -c -g -o /gdb/mirror/src/gdb/testsuite/gdb.base/pending.o ./gdb.base/pending.c (timeout = 300)
spawn gcc -c -g -o /gdb/mirror/src/gdb/testsuite/gdb.base/pending.o ./gdb.base/pending.c
Executing on host: gcc -fpic -c -g -o /gdb/mirror/src/gdb/testsuite/gdb.base/pendshr.o ./gdb.base/pendshr.c (timeout = 300)
spawn gcc -fpic -c -g -o /gdb/mirror/src/gdb/testsuite/gdb.base/pendshr.o ./gdb.base/pendshr.c
Executing on host: gcc /gdb/mirror/src/gdb/testsuite/gdb.base/pendshr.o -shared -g -lm -o /gdb/mirror/src/gdb/testsuite/gdb.base/pendshr.sl (timeout = 300)
spawn gcc /gdb/mirror/src/gdb/testsuite/gdb.base/pendshr.o -shared -g -lm -o /gdb/mirror/src/gdb/testsuite/gdb.base/pendshr.sl
Executing on host: gcc /gdb/mirror/src/gdb/testsuite/gdb.base/pending.o /gdb/mirror/src/gdb/testsuite/gdb.base/pendshr.sl -g -lm -o /gdb/mirror/src/gdb/testsuite/gdb.base/pending (timeout = 300)
spawn gcc /gdb/mirror/src/gdb/testsuite/gdb.base/pending.o /gdb/mirror/src/gdb/testsuite/gdb.base/pendshr.sl -g -lm -o /gdb/mirror/src/gdb/testsuite/gdb.base/pending
spawn /gdb/mirror/src/gdb/testsuite/../../gdb/gdb -nw -nx
GNU gdb 2004-02-04-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
(gdb) set height 0
(gdb) set width 0
(gdb) dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir ./gdb.base
Source directories searched: /gdb/mirror/src/gdb/testsuite/./gdb.base:$cdir:$cwd
(gdb) file /gdb/mirror/src/gdb/testsuite/gdb.base/pending
Reading symbols from /gdb/mirror/src/gdb/testsuite/gdb.base/pending...done.
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) break pendfunc1
Breakpoint 1 at 0x804839c
(gdb) FAIL: gdb.base/pending.exp: set pending breakpoint
info break
Num Type Disp Enb Address What
1 breakpoint keep y 0x0804839c
(gdb) FAIL: gdb.base/pending.exp: single pending breakpoint info
list pending.c:1,1
1 /* This testcase is part of GDB, the GNU debugger.
(gdb) search break main here
30 pendfunc1 (3); /* break main here */
(gdb) break main
Breakpoint 2 at 0x804847c: file gdb.base/pending.c, line 30.
(gdb) PASS: gdb.base/pending.exp: breakpoint function
info break
Num Type Disp Enb Address What
1 breakpoint keep y 0x0804839c
2 breakpoint keep y 0x0804847c in main at gdb.base/pending.c:30
(gdb) FAIL: gdb.base/pending.exp: pending plus real breakpoint info
break pendfunc2
Function "pendfunc2" not defined.
Make breakpoint pending on future shared library load? (y or n) n
(gdb) PASS: gdb.base/pending.exp: Don't set pending breakpoint
condition 1 k == 1
(gdb) PASS: gdb.base/pending.exp: condition 1 k == 1
(gdb) info break
Num Type Disp Enb Address What
1 breakpoint keep y 0x0804839c
stop only if k == 1
2 breakpoint keep y 0x0804847c in main at gdb.base/pending.c:30
(gdb) FAIL: gdb.base/pending.exp: pending plus condition
disable 1
(gdb)
(gdb) PASS: gdb.base/pending.exp: disable 1
info break
Num Type Disp Enb Address What
1 breakpoint keep n 0x0804839c
stop only if k == 1
2 breakpoint keep y 0x0804847c in main at gdb.base/pending.c:30
(gdb) FAIL: gdb.base/pending.exp: pending disabled
commands 1
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just "end".
print k
end
>print k
>end
(gdb) PASS: gdb.base/pending.exp: Set commands for pending breakpoint
info break
Num Type Disp Enb Address What
1 breakpoint keep n 0x0804839c
stop only if k == 1
print k
2 breakpoint keep y 0x0804847c in main at gdb.base/pending.c:30
(gdb) FAIL: gdb.base/pending.exp: pending disabled plus commands
break pendshr.c:26 if x > 3
No source file named pendshr.c.
Make breakpoint pending on future shared library load? (y or n) y
Breakpoint 3 (pendshr.c:26 if x > 3) pending.
(gdb) PASS: gdb.base/pending.exp: Set pending breakpoint 2
info break
Num Type Disp Enb Address What
1 breakpoint keep n 0x0804839c
stop only if k == 1
print k
2 breakpoint keep y 0x0804847c in main at gdb.base/pending.c:30
3 breakpoint keep y <PENDING> pendshr.c:26 if x > 3
(gdb) FAIL: gdb.base/pending.exp: multiple pending breakpoints
run
Starting program: /gdb/mirror/src/gdb/testsuite/gdb.base/pending
Breakpoint 1 at 0x4001470f: file gdb.base/pendshr.c, line 26.
Note: breakpoint 1 (disabled) also set at pc 0x4001470f.
Breakpoint 4 at 0x4001470f: file gdb.base/pendshr.c, line 26.
Pending breakpoint "pendshr.c:26 if x > 3" resolved
Breakpoint 2, main () at gdb.base/pending.c:30
30 pendfunc1 (3); /* break main here */
(gdb) PASS: gdb.base/pending.exp: running to main
enable 1
(gdb) FAIL: gdb.base/pending.exp: re-enabling pending breakpoint that can resolve instantly
continue
Continuing.
in pendfunc1, x is 3
Breakpoint 4, pendfunc1 (x=4) at gdb.base/pendshr.c:26
26 int y = x + 4;
(gdb) PASS: gdb.base/pending.exp: continue to resolved breakpoint 2
continue
Continuing.
in pendfunc1, x is 4
Breakpoint 1, pendfunc1 (x=3) at gdb.base/pendshr.c:26
26 int y = x + 4;
$1 = 1
(gdb) PASS: gdb.base/pending.exp: continue to resolved breakpoint 1
delete breakpoints
Delete all breakpoints? (y or n) y
(gdb) info breakpoints
No breakpoints or watchpoints.
(gdb) break main
Breakpoint 5 at 0x804847c: file gdb.base/pending.c, line 30.
(gdb) break imaginary
Function "imaginary" not defined.
Make breakpoint pending on future shared library load? (y or n) y
Breakpoint 6 (imaginary) pending.
(gdb) PASS: gdb.base/pending.exp: set imaginary pending breakpoint
run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /gdb/mirror/src/gdb/testsuite/gdb.base/pending
Breakpoint 5, main () at gdb.base/pending.c:30
30 pendfunc1 (3); /* break main here */
(gdb) PASS: gdb.base/pending.exp: rerun to main
info break
Num Type Disp Enb Address What
5 breakpoint keep y 0x0804847c in main at gdb.base/pending.c:30
breakpoint already hit 1 time
6 breakpoint keep y <PENDING> imaginary
(gdb) PASS: gdb.base/pending.exp: verify pending breakpoint after restart
testcase ./gdb.base/pending.exp completed in 1 seconds
=== gdb Summary ===
# of expected passes 12
# of unexpected failures 8
Executing on host: /gdb/mirror/src/gdb/testsuite/../../gdb/gdb -nw --command gdb_cmd (timeout = 300)
spawn /gdb/mirror/src/gdb/testsuite/../../gdb/gdb -nw --command gdb_cmd
GNU gdb 2004-02-04-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
/gdb/mirror/src/gdb/testsuite/../../gdb/gdb version 2004-02-04-cvs -nx
runtest completed at Wed Feb 4 15:59:25 2004
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb.base/pending.exp failures
2004-02-05 0:06 gdb.base/pending.exp failures David Carlton
@ 2004-02-05 0:21 ` Daniel Jacobowitz
2004-02-05 1:03 ` Jeff Johnston
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2004-02-05 0:21 UTC (permalink / raw)
To: David Carlton; +Cc: gdb, Jeff Johnston
Just a note of probable-cause: Jeff, on which platforms did you test
this testcase? I bet it wasn't i386-linux.
On Wed, Feb 04, 2004 at 04:01:21PM -0800, David Carlton wrote:
> (gdb) break pendfunc1
>
> Breakpoint 1 at 0x804839c
>
> (gdb) FAIL: gdb.base/pending.exp: set pending breakpoint
This function is in a shared library that hasn't been loaded yet.
However, on i386-linux (and many other platforms), the call will go
through a PLT entry, and the entry in the application's symbol table
will appear as an SHN_UNDEF symbol with a non-zero address pointing at
the PLT entry. GDB will re-resolve the breakpoint after shared
libraries have been loaded. This is already-existing functionality.
If you don't want to use dlopen in the test, try setting breakpoints on
a function not called directly from the executable (i.e. called from
within the library).
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb.base/pending.exp failures
2004-02-05 0:21 ` Daniel Jacobowitz
@ 2004-02-05 1:03 ` Jeff Johnston
2004-02-05 1:22 ` [PATCH]: " Jeff Johnston
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Johnston @ 2004-02-05 1:03 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: David Carlton, gdb
Daniel Jacobowitz wrote:
>Just a note of probable-cause: Jeff, on which platforms did you test
>this testcase? I bet it wasn't i386-linux.
>
>
You're right. I tested ia64, not i386.
>On Wed, Feb 04, 2004 at 04:01:21PM -0800, David Carlton wrote:
>
>
>>(gdb) break pendfunc1
>>
>>Breakpoint 1 at 0x804839c
>>
>>(gdb) FAIL: gdb.base/pending.exp: set pending breakpoint
>>
>>
>
>This function is in a shared library that hasn't been loaded yet.
>However, on i386-linux (and many other platforms), the call will go
>through a PLT entry, and the entry in the application's symbol table
>will appear as an SHN_UNDEF symbol with a non-zero address pointing at
>the PLT entry. GDB will re-resolve the breakpoint after shared
>libraries have been loaded. This is already-existing functionality.
>
>If you don't want to use dlopen in the test, try setting breakpoints on
>a function not called directly from the executable (i.e. called from
>within the library).
>
>
>
Thanks for the explanation.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH]: Re: gdb.base/pending.exp failures
2004-02-05 1:03 ` Jeff Johnston
@ 2004-02-05 1:22 ` Jeff Johnston
2004-02-05 1:48 ` David Carlton
2004-02-05 4:25 ` Daniel Jacobowitz
0 siblings, 2 replies; 6+ messages in thread
From: Jeff Johnston @ 2004-02-05 1:22 UTC (permalink / raw)
To: Jeff Johnston; +Cc: Daniel Jacobowitz, David Carlton, gdb
[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]
I have just checked in the accompanying patch which takes Daniel's suggestion of
indirectly calling pendfunc1 from the main program. I have tested it on both
ia64-linux and i686-linux.
-- Jeff J.
2004-02-04 Jeff Johnston <jjohnstn@redhat.com>
* gdb.base/pendshr.c (pendfunc): New function that calls
pendfunc1.
* gdb.base/pending.c: Call pendfunc instead of pendfunc1.
Jeff Johnston wrote:
> Daniel Jacobowitz wrote:
>
>> Just a note of probable-cause: Jeff, on which platforms did you test
>> this testcase? I bet it wasn't i386-linux.
>>
>>
>
> You're right. I tested ia64, not i386.
>
>> On Wed, Feb 04, 2004 at 04:01:21PM -0800, David Carlton wrote:
>>
>>
>>> (gdb) break pendfunc1
>>>
>>> Breakpoint 1 at 0x804839c
>>>
>>> (gdb) FAIL: gdb.base/pending.exp: set pending breakpoint
>>>
>>
>>
>> This function is in a shared library that hasn't been loaded yet.
>> However, on i386-linux (and many other platforms), the call will go
>> through a PLT entry, and the entry in the application's symbol table
>> will appear as an SHN_UNDEF symbol with a non-zero address pointing at
>> the PLT entry. GDB will re-resolve the breakpoint after shared
>> libraries have been loaded. This is already-existing functionality.
>>
>> If you don't want to use dlopen in the test, try setting breakpoints on
>> a function not called directly from the executable (i.e. called from
>> within the library).
>>
>>
>>
> Thanks for the explanation.
>
>
[-- Attachment #2: pendfix.patch --]
[-- Type: text/plain, Size: 1000 bytes --]
Index: pending.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/pending.c,v
retrieving revision 1.1
diff -u -p -r1.1 pending.c
--- pending.c 2 Feb 2004 21:14:33 -0000 1.1
+++ pending.c 5 Feb 2004 01:17:48 -0000
@@ -23,13 +23,13 @@
int k = 0;
-extern void pendfunc1 (int x);
+extern void pendfunc (int x);
int main()
{
- pendfunc1 (3); /* break main here */
- pendfunc1 (4);
+ pendfunc (3); /* break main here */
+ pendfunc (4);
k = 1;
- pendfunc1 (3);
+ pendfunc (3);
return 0;
}
Index: pendshr.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/pendshr.c,v
retrieving revision 1.1
diff -u -p -r1.1 pendshr.c
--- pendshr.c 2 Feb 2004 21:14:33 -0000 1.1
+++ pendshr.c 5 Feb 2004 01:17:48 -0000
@@ -26,3 +26,8 @@ void pendfunc1 (int x)
int y = x + 4;
printf ("in pendfunc1, x is %d\n", x);
}
+
+void pendfunc (int x)
+{
+ pendfunc1 (x);
+}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH]: Re: gdb.base/pending.exp failures
2004-02-05 1:22 ` [PATCH]: " Jeff Johnston
@ 2004-02-05 1:48 ` David Carlton
2004-02-05 4:25 ` Daniel Jacobowitz
1 sibling, 0 replies; 6+ messages in thread
From: David Carlton @ 2004-02-05 1:48 UTC (permalink / raw)
To: Jeff Johnston; +Cc: Daniel Jacobowitz, gdb
On Wed, 04 Feb 2004 20:22:32 -0500, Jeff Johnston <jjohnstn@redhat.com> said:
> I have just checked in the accompanying patch which takes Daniel's
> suggestion of indirectly calling pendfunc1 from the main program. I
> have tested it on both ia64-linux and i686-linux.
Much better, thanks.
David Carlton
carlton@kealia.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH]: Re: gdb.base/pending.exp failures
2004-02-05 1:22 ` [PATCH]: " Jeff Johnston
2004-02-05 1:48 ` David Carlton
@ 2004-02-05 4:25 ` Daniel Jacobowitz
1 sibling, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2004-02-05 4:25 UTC (permalink / raw)
To: gdb
On Wed, Feb 04, 2004 at 08:22:32PM -0500, Jeff Johnston wrote:
> I have just checked in the accompanying patch which takes Daniel's
> suggestion of indirectly calling pendfunc1 from the main program. I have
> tested it on both ia64-linux and i686-linux.
Thanks, Jeff. This works fine for me also.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-02-05 4:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-05 0:06 gdb.base/pending.exp failures David Carlton
2004-02-05 0:21 ` Daniel Jacobowitz
2004-02-05 1:03 ` Jeff Johnston
2004-02-05 1:22 ` [PATCH]: " Jeff Johnston
2004-02-05 1:48 ` David Carlton
2004-02-05 4:25 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox