aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-04-28 22:30:08 -0600
committerTom Tromey <tom@tromey.com>2018-04-30 12:59:04 -0600
commit2038b7fdf30c39bc4d528cc2e5fbf5403e0ba79e (patch)
treee1603d9597a18496a01f86c230f9e77c4aa5c04b /gdb
parent4904c3c6b69d5c7b5e4682220c1d9503e00a457e (diff)
downloadbinutils-2038b7fdf30c39bc4d528cc2e5fbf5403e0ba79e.zip
binutils-2038b7fdf30c39bc4d528cc2e5fbf5403e0ba79e.tar.gz
binutils-2038b7fdf30c39bc4d528cc2e5fbf5403e0ba79e.tar.bz2
Remove some uses of is_mi_like_p from py-framefilter.c
Some uses of is_mi_like_p in py-framefilter.c were not needed. In general a call to ui_out::text, ui_out::message, or ui_out::spaces does not need to be guarded -- these are already ignored by MI. ChangeLog 2018-04-30 Tom Tromey <tom@tromey.com> * python/py-framefilter.c (py_print_single_arg) (enumerate_locals, py_print_args, py_print_frame): Remove some uses of is_mi_like_p.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/python/py-framefilter.c23
2 files changed, 13 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b2a8b79..69a43d6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2018-04-30 Tom Tromey <tom@tromey.com>
+ * python/py-framefilter.c (py_print_single_arg)
+ (enumerate_locals, py_print_args, py_print_frame): Remove some
+ uses of is_mi_like_p.
+
+2018-04-30 Tom Tromey <tom@tromey.com>
+
* ui-out.c: Update.
* cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
* ui-out.h (ui_out::is_mi_like_p): Now const.
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
index 698fd87..4edefd4 100644
--- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c
@@ -368,8 +368,7 @@ py_print_single_arg (struct ui_out *out,
annotate_arg_name_end ();
- if (! out->is_mi_like_p ())
- out->text ("=");
+ out->text ("=");
if (print_args_field)
out->field_int ("arg", 1);
@@ -602,16 +601,11 @@ enumerate_locals (PyObject *iter,
if (print_args_field || args_type != NO_VALUES)
tuple.emplace (out, nullptr);
}
- if (! out->is_mi_like_p ())
- {
- /* If the output is not MI we indent locals. */
- out->spaces (local_indent);
- }
+ /* If the output is not MI we indent locals. */
+ out->spaces (local_indent);
out->field_string ("name", sym_name.get ());
-
- if (! out->is_mi_like_p ())
- out->text (" = ");
+ out->text (" = ");
if (args_type == MI_PRINT_SIMPLE_VALUES)
py_print_type (out, val);
@@ -717,16 +711,14 @@ py_print_args (PyObject *filter,
out->wrap_hint (" ");
annotate_frame_args ();
- if (! out->is_mi_like_p ())
- out->text (" (");
+ out->text (" (");
if (args_iter != Py_None
&& (enumerate_args (args_iter.get (), out, args_type, 0, frame)
== EXT_LANG_BT_ERROR))
return EXT_LANG_BT_ERROR;
- if (! out->is_mi_like_p ())
- out->text (")");
+ out->text (")");
return EXT_LANG_BT_OK;
}
@@ -996,8 +988,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
ui_out_emit_list inner_list_emiter (out, "children");
- if (! out->is_mi_like_p ())
- indent++;
+ indent++;
while ((item = PyIter_Next (elided.get ())))
{