Use errno value of first openp failure
authorHannes Domani <ssbssa@yahoo.de>
Wed, 13 May 2020 10:41:51 +0000 (12:41 +0200)
committerHannes Domani <ssbssa@yahoo.de>
Wed, 27 May 2020 17:41:07 +0000 (19:41 +0200)
commit96445f0b66af20343e2ffed08c4da8cfac101a03
tree92fa1c9c93b5b931c3c96da1e93a6a54b4058c86
parent6479bf854a468c0270bb0fcdc9d0271cca3eb5b5
Use errno value of first openp failure

Fixes this testsuite fail on Windows:
FAIL: gdb.base/bad-file.exp: directory

If both tries to open the file fail (without and with ".exe"), use the
errno value of the first try.

gdb/ChangeLog:

2020-05-27  Hannes Domani  <ssbssa@yahoo.de>

* exec.c (exec_file_attach): Use errno value of first openp failure.
gdb/ChangeLog
gdb/exec.c