This is the mail archive of the gdb-patches@sourceware.org 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] validate binary before use


On Fri, 22 Mar 2013 14:12:18 +0100, Aleksandar Ristovski wrote:
> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/solib-mismatch.exp
[...]
> +  send_gdb "set args \"${binlibfiledirrun}\"\n"

This is another reason why this testcase could ever run with gdbserver, you
would need to use gdbserver_run as normally "args" are not passed through.
Did you follow this advice?
	http://sourceware.org/gdb/wiki/TestingGDB#Testing_gdbserver_in_a_native_configuration

I always get:
	(gdb) break solib-mismatch.c:55
	Reading in symbols for ./gdb.base/solib-mismatch.c...done.
	Breakpoint 1 at 0x400830: file ./gdb.base/solib-mismatch.c, line 55.
	(gdb) kill
	The program is not being run.
	(gdb) spawn ../gdbserver/gdbserver --once :2346 /home/jkratoch/redhat/gdb-qnx/gdb/testsuite/gdb.base/solib-mismatch
	Process /home/jkratoch/redhat/gdb-qnx/gdb/testsuite/gdb.base/solib-mismatch created; pid = 30827
	Listening on port 2346
	target remote localhost:2346
	Remote debugging using localhost:2346
	Remote debugging from host 127.0.0.1
	Reading symbols from system-supplied DSO at 0x7ffff7ffa000...(no debugging symbols found)...done.
	0x00007ffff7ddd420 in ?? () from /lib64/ld-linux-x86-64.so.2
	Created trace state variable $trace_timestamp for target's variable 1.
	(gdb) continue
	Continuing.
	ERROR - CWD not provided

	Child exited with status 1
	GDBserver exiting
	[Inferior 1 (process 30827) exited with code 01]
	(gdb) sharedlibrary

Which understandable breaks all the later tests.


The testcases currently rather define a macro in the testcase using:
	additional_flags=-DSOMEVAR=\"${binlibfiledirrun}\"

It then works both with local and gdbserver testsuite run the same.


Thanks,
Jan


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