binutils-gdb/gdb/mi
Simon Marchi 1367480341 Fix GDB build when using --disable-gdbmi
Since commit

    b4be1b0648 ("Fix MI output for multi-location breakpoints")

we get this error when building with --disable-gdbmi:

      CXXLD  gdb
    /home/smarchi/src/binutils-gdb/gdb/breakpoint.c:6358: error: undefined reference to 'mi_multi_location_breakpoint_output_fixed(ui_out*)'

This is due to breakpoint.c using a function defined in mi/mi-main.c, even
though mi/mi-main.c isn't included in the build.

To fix it, use the flags feature of ui_out.  mi_ui_out has the new
fix_multi_location_breakpoint_output flag set for versions >= 3.  Also,
move the global variable fix_multi_location_breakpoint_output to
breakpoint.c, so it can be read there even when we build without MI.  I
renamed it to fix_multi_location_breakpoint_output_globally so it
doesn't clash with the new enumerator.

gdb/ChangeLog:

	* breakpoint.h (fix_multi_location_breakpoint_output_globally):
	New variable declaration.
	* breakpoint.c (fix_multi_location_breakpoint_output_globally):
	New variable.
	(print_one_breakpoint): Use ui_out::test_flags and new global
	variable to compute use_fixed_output.
	* mi/mi-main.h (mi_multi_location_breakpoint_output_fixed):
	Remove.
	* mi/mi-main.c (fix_multi_location_breakpoint_output): Remove.
	(mi_multi_location_breakpoint_output_fixed): Remove.
	(mi_cmd_fix_multi_location_breakpoint_output): Adjust to set the
	new variable.
	* mi/mi-out.c (mi_ui_out::mi_ui_out): Set
	fix_multi_location_breakpoint_output flag if version >= 3.
	* ui-out.h (enum ui_out_flag)
	<fix_multi_location_breakpoint_output>: New enumerator.
2019-05-10 17:22:09 -04:00
..
ChangeLog-1999-2003
mi-cmd-break.c Rename gdb exception types 2019-04-08 09:05:40 -06:00
mi-cmd-break.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
mi-cmd-catch.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mi-cmd-disas.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mi-cmd-env.c Normalize includes to use common/ 2019-01-25 15:28:16 -07:00
mi-cmd-file.c Add compunits range adapter to objfile 2019-01-17 15:42:05 -07:00
mi-cmd-info.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mi-cmd-stack.c Rename gdb exception types 2019-04-08 09:05:40 -06:00
mi-cmd-target.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mi-cmd-var.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mi-cmds.c Fix MI output for multi-location breakpoints 2019-03-13 15:14:36 -04:00
mi-cmds.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
mi-common.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mi-common.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
mi-console.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mi-console.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
mi-getopt.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mi-getopt.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
mi-interp.c Remove exception_none 2019-04-25 12:59:35 -06:00
mi-interp.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
mi-main.c Fix GDB build when using --disable-gdbmi 2019-05-10 17:22:09 -04:00
mi-main.h Fix GDB build when using --disable-gdbmi 2019-05-10 17:22:09 -04:00
mi-out.c Fix GDB build when using --disable-gdbmi 2019-05-10 17:22:09 -04:00
mi-out.h Factor out mi_ui_out instantiation logic 2019-03-13 13:26:37 -04:00
mi-parse.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mi-parse.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
mi-symbol-cmds.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00