public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "Metzger, Markus T" <markus.t.metzger@intel.com>
To: GDB <gdb@sourceware.org>
Subject: exec-file-mismatch and native-gdbserver testing
Date: Wed, 8 Apr 2020 14:02:36 +0000	[thread overview]
Message-ID: <SN6PR11MB33449A275062A414644B7E4DDEC00@SN6PR11MB3344.namprd11.prod.outlook.com> (raw)

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

             reply	other threads:[~2020-04-08 14:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 14:02 Metzger, Markus T [this message]
2020-04-08 20:54 ` Philippe Waroquiers
2020-04-09  6:30   ` Metzger, Markus T
2020-05-08 10:30     ` Metzger, Markus T
2020-05-08 21:25       ` Philippe Waroquiers
2020-05-16 20:10 ` Pedro Alves
2020-05-17  5:24   ` Philippe Waroquiers
2020-05-17 17:47     ` Pedro Alves
2020-05-17 18:15       ` Philippe Waroquiers
2020-05-17 19:50         ` Pedro Alves
2020-05-17 20:11           ` Philippe Waroquiers
2020-05-17 21:19             ` Pedro Alves
2020-05-17 21:43               ` Philippe Waroquiers
2020-05-17 21:58                 ` Pedro Alves
2020-05-18 10:35                   ` Philippe Waroquiers
2020-05-18 14:05                     ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN6PR11MB33449A275062A414644B7E4DDEC00@SN6PR11MB3344.namprd11.prod.outlook.com \
    --to=markus.t.metzger@intel.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).