Fix mingw build of gdb
authorTom Tromey <tromey@adacore.com>
Tue, 26 Nov 2019 22:14:57 +0000 (15:14 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 26 Nov 2019 22:14:57 +0000 (15:14 -0700)
Christian pointed out on irc that the threading series broke the build
on mingw.  This patch fixes the problem, by moving the initialization
of gdb_demangle_attempt_core_dump into the appropriate #if.

gdb/ChangeLog
2019-11-26  Tom Tromey  <tromey@adacore.com>

* cp-support.c (_initialize_cp_support): Conditionally initialize
gdb_demangle_attempt_core_dump.

Change-Id: I9ace0bea75a51f317ea933b607f6b5a94d651eea

gdb/ChangeLog
gdb/cp-support.c

index d2e9adf34305bc81ba6a3d305de95db42f913f19..6c6c000f7b5ec1119be3a6c5edb5d4373b4cbec1 100644 (file)
@@ -1,3 +1,8 @@
+2019-11-26  Tom Tromey  <tromey@adacore.com>
+
+       * cp-support.c (_initialize_cp_support): Conditionally initialize
+       gdb_demangle_attempt_core_dump.
+
 2019-11-26  Tom Tromey  <tom@tromey.com>
 
        * python/py-function.c (fnpy_init): Update.
index 4de2a98e87ac548693451890ce53cb0356cecd53..bec8dc8615719e64655176abf4434b0a8b06ab7f 100644 (file)
@@ -2199,6 +2199,8 @@ display the offending symbol."),
                           NULL,
                           &maintenance_set_cmdlist,
                           &maintenance_show_cmdlist);
+
+  gdb_demangle_attempt_core_dump = can_dump_core (LIMIT_CUR);
 #endif
 
 #if GDB_SELF_TEST
@@ -2207,6 +2209,4 @@ display the offending symbol."),
   selftests::register_test ("cp_remove_params",
                            selftests::test_cp_remove_params);
 #endif
-
-  gdb_demangle_attempt_core_dump = can_dump_core (LIMIT_CUR);
 }