Fix static initialization order problem in windows-nat.c
authorTom Tromey <tromey@adacore.com>
Tue, 8 Nov 2022 19:14:20 +0000 (12:14 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 17 Nov 2022 18:44:30 +0000 (11:44 -0700)
commitc83b95d88feed26eb04f7eca97c08e3ace0b7cbb
tree6a6fc18e21888feaac051ce5895d0ae2a2ef6a08
parent2368c6bf61cc815e124a88f3414c35aff2022b6d
Fix static initialization order problem in windows-nat.c

This patch fixes a static initialization order problem in
windows-nat.c that was pointed out by Jon Turney.  The underlying
problem is that the windows_nat_target constructor relies on
serial_logfile already being constructed, but this is not enforced by
C++ rules.  This patch fixes the problem by initializing the global
windows_nat_target later.
gdb/windows-nat.c