This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH v3 5/5] btrace, testsuite: fix extended-remote fail

> -----Original Message-----
> From: Pedro Alves []
> Sent: Tuesday, January 31, 2017 2:00 PM
> To: Metzger, Markus T <>; gdb-
> Subject: Re: [PATCH v3 5/5] btrace, testsuite: fix extended-remote fail
> On 01/30/2017 10:05 AM, Markus Metzger wrote:
> > Parts of gdb.btrace/enable.exp are only valid for native debug.  The check for
> > skip_gdbserver_tests is done while GDB is running, though, which causes it to
> > fail with --target_board=native-extended-gdbserver.  Exit GDB before that
> check.
> >
> Can you clarify how it fails?  It's not obvious to me from looking at
> skip_gdbserver_tests.

spawn /nfs/site/disks/idb_team/mmetzger/gdb/build/ulll001/gdb/testsuite/../gdbserver/gdbserver --once --multi :2349
Listening on port 2349
target extended-remote localhost:2349
Already connected to a remote target.  Disconnect? (y or n) ^CQuit
(gdb) set tdesc filename /nfs/site/disks/idb_team/mmetzger/gdb/build/ulll001/gdb/testsuite/outputs/gdb.btrace/enable/tri
(gdb) n
The program is not being run.
(gdb) FAIL: gdb.btrace/enable.exp: set tdesc filename /nfs/site/disks/idb_team/mmetzger/gdb/build/ulll001/gdb/testsuite/outputs/gdb.btrace/enable/trivial.xml (got interactive prompt)
monitor exit

There's a comment in lib/gdb.exp before gdb_skip_xml_test, which is called
by skip_gdbserver_tests:

	# Return true if a test should be skipped due to lack of XML support
	# in the host GDB.
	# NOTE: This must be called while gdb is *not* running.

	gdb_caching_proc gdb_skip_xml_test {

I thought this is supposed to be general knowledge so I didn't bother to go into more
detail in the commit message.

> Should we add something like:
>     global gdb_spawn_id
>     if {[info exists gdb_spawn_id]} {
>       	error "....."
> 	return
>     }
> ... to skip_gdbserver_tests ?

That would certainly make it more obvious:

	Running .../gdb.btrace/enable.exp ...
	ERROR: tcl error sourcing .../gdb.btrace/enable.exp.
	ERROR: GDB must not be running in skip_gdbserver_tests.
	    while executing
	"error "GDB must not be running in skip_gdbserver_tests.""
	    (procedure "skip_gdbserver_tests" line 9)
	    invoked from within
	    invoked from within
	"if [skip_gdbserver_tests] {
	    unsupported "target does not support gdbserver"
	    return 0
	    (file ".../gdb.btrace/enable.exp" line 83)
	    invoked from within
	"source .../gdb.btrace/enable.exp"
	    ("uplevel" body line 1)
	    invoked from within
	"uplevel #0 source /.../gdb.btrace/enable.exp"
	    invoked from within
	"catch "uplevel #0 source $test_file_name""

Looks like we don't need the return, though.  And the check should
probably go into skip_xml_tests.  Let me add a separate patch for this.

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0,
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]