From: Simon Marchi <simon.marchi@efficios.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org, Tom de Vries <tdevries@suse.de>
Subject: Re: [PATCH] Fix GDB build when using --disable-gdbmi
Date: Fri, 10 May 2019 18:57:00 -0000 [thread overview]
Message-ID: <08bf3e6b-11c5-2a90-fb66-d1eced683116@efficios.com> (raw)
In-Reply-To: <87a7fu9me8.fsf@tromey.com>
On 2019-05-10 2:47 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
>
> Simon> To fix it, I added a config.h macro, HAVE_GDBMI, defined if we build
> Simon> with GDB/MI support. We can then use it in breakpoint.c to
> Simon> conditionally use mi_multi_location_breakpoint_output_fixed. If
> Simon> building without GDB/MI, the value of use_fixed_output is not really
> Simon> important, as it is only used to fix an issue when printing breakpoints
> Simon> in MI.
>
> I'm not sure if it's better or not, but ui_out has a "flags" feature
> that could be applied to this. This would mean not having to have a #if.
I don't think this will work (or I don't understand what you suggest).
If we do
bool use_fixed_output = ui_out->test_flags(ui_out_flag::fixed_breakpoint_output);
That would require the mi_ui_out object to be created with that flag. However,
this option can be toggled on after the mi_ui_out object has been created (through
the MI command -fix-multi-location-breakpoint-output).
One way to make it work would be, when the -fix-multi-location-breakpoint-output
command is issued, we go through all existing ui_out objects and set that flag.
But I don't think there's an easy way of going through all existing ui_out objects.
If you have any ideas for a more elegant way to make it work, I would be up for it,
because it's true that sprinkling #ifdefs is not the best idea.
Simon
next prev parent reply other threads:[~2019-05-10 18:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-10 18:35 Simon Marchi
2019-05-10 18:48 ` Tom Tromey
2019-05-10 18:57 ` Simon Marchi [this message]
2019-05-10 19:11 ` Tom Tromey
2019-05-10 20:19 ` Simon Marchi
2019-05-10 21:16 ` Tom Tromey
2019-05-10 22:07 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=08bf3e6b-11c5-2a90-fb66-d1eced683116@efficios.com \
--to=simon.marchi@efficios.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox