This is the mail archive of the
mailing list for the GDB project.
[binutils-gdb] Factor out mi_ui_out instantiation logic
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 13 Mar 2019 13:50:03 -0400
- Subject: [binutils-gdb] Factor out mi_ui_out instantiation logic
*** TEST RESULTS FOR COMMIT 8e5e5494f8653dd83ce1413d141e26c09dddab7b ***
Author: Simon Marchi <firstname.lastname@example.org>
Factor out mi_ui_out instantiation logic
When re-reviewing this  I noticed that there were two spots encoding
the logic of instantiating an mi_ui_out object based on the interpreter
name ("mi", "mi1", "mi2" or "mi3"):
Both encode the logic to choose what the default version is when the
interpreter name is "mi". I had forgotten the one in mi_load_progress.
Therefore, I propose extracting that logic to a single function. I
started to add a new overload of mi_out_new, then realized the current
mi_out_new wasn't very useful, being just a thing wrapper around "new
mi_ui_out". So I ended up with just an mi_out_new function taking the
interp name as parameter.
I ran the gdb.mi tests, and verified manually the behavior (including
the load command).
* mi/mi-out.h (mi_out_new): Change parameter to const char *.
* mi/mi-out.c (mi_out_new): Change parameter to const char *,
instantiate mi_ui_out based on interpreter name.
* mi/mi-interp.c (mi_interp::init): Use the new mi_out_new.
* mi/mi-main.c (mi_load_progress): Likewise.
- Failures on RHEL-s390x-m64, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Debian-s390x-m64, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master