Change reopen_exec_file to check result of stat
authorTom Tromey <tom@tromey.com>
Mon, 6 Jun 2016 19:01:52 +0000 (13:01 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 14 Jul 2016 16:35:37 +0000 (10:35 -0600)
commit537d9b851957475a8122949939023c81b1df1673
tree322af5510c2c4aa16f1311ebce1c9105216e26ee
parentd3e5f6c8f1e58e86689909019a3756d4308b66eb
Change reopen_exec_file to check result of stat

This seems to be a real bug found by -Wunused-but-set-variable.  If
"stat" fails for some reason, gdb would use the uninitialized "st".

2016-07-14  Tom Tromey  <tom@tromey.com>

* corefile.c (reopen_exec_file): Only examine st.st_mtime if stat
succeeded.
gdb/ChangeLog
gdb/corefile.c