From 01add95bed9afd5e7815439c3967db976be53f80 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 27 May 2021 15:01:28 -0400 Subject: gdb: fix some indentation issues I wrote a small script to spot a pattern of indentation mistakes I saw happened in breakpoint.c. And while at it I ran it on all files and fixed what I found. No behavior changes intended, just indentation and addition / removal of curly braces. gdb/ChangeLog: * Fix some indentation mistakes throughout. gdbserver/ChangeLog: * Fix some indentation mistakes throughout. Change-Id: Ia01990c26c38e83a243d8f33da1d494f16315c6e --- gdb/python/py-framefilter.c | 20 ++++++++++---------- gdb/python/py-prettyprint.c | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'gdb/python') diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c index 1807198..54ac907 100644 --- a/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c @@ -780,16 +780,16 @@ py_print_frame (PyObject *filter, frame_filter_flags flags, get_user_print_options (&opts); if (print_frame_info) - { - gdb::optional user_frame_info_print_what; - - get_user_print_what_frame_info (&user_frame_info_print_what); - if (!out->is_mi_like_p () && user_frame_info_print_what.has_value ()) - { - /* Use the specific frame information desired by the user. */ - print_what = *user_frame_info_print_what; - } - } + { + gdb::optional user_frame_info_print_what; + + get_user_print_what_frame_info (&user_frame_info_print_what); + if (!out->is_mi_like_p () && user_frame_info_print_what.has_value ()) + { + /* Use the specific frame information desired by the user. */ + print_what = *user_frame_info_print_what; + } + } /* Get the underlying frame. This is needed to determine GDB architecture, and also, in the cases of frame variables/arguments to diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index fef4dcd..fe33747 100644 --- a/gdb/python/py-prettyprint.c +++ b/gdb/python/py-prettyprint.c @@ -437,10 +437,10 @@ print_children (PyObject *printer, const char *hint, 2. Arrays. Always print a ",". 3. Other. Always print a ",". */ if (i == 0) - { - if (!is_py_none) - fputs_filtered (" = ", stream); - } + { + if (!is_py_none) + fputs_filtered (" = ", stream); + } else if (! is_map || i % 2 == 0) fputs_filtered (pretty ? "," : ", ", stream); -- cgit v1.1