exec-file-mismatch and native-gdbserver testing

"Metzger, Markus T via Gdb" <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <SN6PR11MB33449A275062A414644B7E4DDEC00@SN6PR11MB3344.namprd11.prod.outlook.com>
Hello,

I noticed an issue when running tests that use standard_temp_file with the native-gdbserver board.

In gdb_remote_download, when called without tofile argument, as it is, for example, when starting gdbserver via gdb_reload, we set the filename to standard_output_file [file tail $fromfile] and copy the file.

GDB and gdbserver now use a copy of the same file at different locations.

This triggers an exec-file-mismatch warning and, with the default “ask” setting, a user prompt that isn’t handled by the tests and eventually leads to a timeout.  This can be seen with all tests that use gdb_simple_compile, e.g. via skip_*_test calls.  An example would be gdb.btrace/*.exp.

In exec.c:validate_exec_file (), we check the filenames and, if they differ, print a warning and re-load the symbol file.

Should validate_exec_file () check more than just the filenames?
Should gdb_simple_compile use standard_output_file instead of standard_temp_file?

Regards,
Markus.

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.