From 287de65625a667b6403d0606fa75b67926ec7230 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 9 Mar 2023 14:56:09 -0500 Subject: gdb, gdbserver, gdbsupport: fix whitespace issues Replace spaces with tabs in a bunch of places. Change-Id: If0f87180f1d13028dc178e5a8af7882a067868b0 --- gdbsupport/fileio.h | 2 +- gdbsupport/filestuff.cc | 2 +- gdbsupport/gdb_tilde_expand.cc | 6 ++---- gdbsupport/observable.h | 20 ++++++++++---------- gdbsupport/parallel-for.h | 4 +--- 5 files changed, 15 insertions(+), 19 deletions(-) (limited to 'gdbsupport') diff --git a/gdbsupport/fileio.h b/gdbsupport/fileio.h index 690ee21..846fb66 100644 --- a/gdbsupport/fileio.h +++ b/gdbsupport/fileio.h @@ -59,7 +59,7 @@ #define FILEIO_S_IRWXO 07 #define FILEIO_S_SUPPORTED (FILEIO_S_IFREG|FILEIO_S_IFDIR| \ FILEIO_S_IRWXU|FILEIO_S_IRWXG| \ - FILEIO_S_IRWXO) + FILEIO_S_IRWXO) /* lseek(2) flags */ #define FILEIO_SEEK_SET 0 diff --git a/gdbsupport/filestuff.cc b/gdbsupport/filestuff.cc index d733210..1724bc5 100644 --- a/gdbsupport/filestuff.cc +++ b/gdbsupport/filestuff.cc @@ -527,7 +527,7 @@ read_text_file_to_string (const char *path) gdb_assert (n < chunk_size); /* Less than CHUNK means EOF or error. If it's an error, return - no value. */ + no value. */ if (ferror (file.get ())) return {}; diff --git a/gdbsupport/gdb_tilde_expand.cc b/gdbsupport/gdb_tilde_expand.cc index d6bdb87..6107121 100644 --- a/gdbsupport/gdb_tilde_expand.cc +++ b/gdbsupport/gdb_tilde_expand.cc @@ -90,10 +90,8 @@ gdb_tilde_expand (const char *dir) /* Look for the first dir separator (if any) and split d around it. */ const auto first_sep = std::find_if (d.cbegin (), d.cend(), - [] (const char c) -> bool - { - return IS_DIR_SEPARATOR (c); - }); + [] (const char c) -> bool + { return IS_DIR_SEPARATOR (c); }); const std::string to_expand (d.cbegin (), first_sep); const std::string remainder (first_sep, d.cend ()); diff --git a/gdbsupport/observable.h b/gdbsupport/observable.h index 1a009ef..f1504c8 100644 --- a/gdbsupport/observable.h +++ b/gdbsupport/observable.h @@ -194,14 +194,14 @@ private: for (const token *dep : m_observers[index].dependencies) { /* ... find the observer that has token DEP. If found, visit it. */ - auto it_dep - = std::find_if (m_observers.begin (), m_observers.end (), - [&] (observer o) { return o.token == dep; }); - if (it_dep != m_observers.end ()) - { - int i = std::distance (m_observers.begin (), it_dep); - visit_for_sorting (sorted_observers, visit_states, i); - } + auto it_dep + = std::find_if (m_observers.begin (), m_observers.end (), + [&] (observer o) { return o.token == dep; }); + if (it_dep != m_observers.end ()) + { + int i = std::distance (m_observers.begin (), it_dep); + visit_for_sorting (sorted_observers, visit_states, i); + } } visit_states[index] = detail::visit_state::VISITED; @@ -226,11 +226,11 @@ private: } void attach (const func_type &f, const token *t, const char *name, - const std::vector &dependencies) + const std::vector &dependencies) { observer_debug_printf ("Attaching observable %s to observer %s", - name, m_name); + name, m_name); m_observers.emplace_back (t, f, name, dependencies); diff --git a/gdbsupport/parallel-for.h b/gdbsupport/parallel-for.h index de9ebb1..b57f7ea 100644 --- a/gdbsupport/parallel-for.h +++ b/gdbsupport/parallel-for.h @@ -271,9 +271,7 @@ parallel_for_each (unsigned n, RandomIt first, RandomIt last, debug_printf (_("\n")); } results.post (i, [=] () - { - return callback (first, end); - }); + { return callback (first, end); }); first = end; } -- cgit v1.1