From: Simon Marchi Date: Fri, 28 Feb 2025 02:29:39 +0000 (-0500) Subject: gdb, gdbserver, gdbsupport: fix some namespace comment formatting X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6fb76ec6ef1e6643c87f29594d76c13aa94d876;p=thirdparty%2Fbinutils-gdb.git gdb, gdbserver, gdbsupport: fix some namespace comment formatting I noticed a // namespace selftests comment, which doesn't follow our comment formatting convention. I did a find & replace to fix all the offenders. Change-Id: Idf8fe9833caf1c3d99e15330db000e4bab4ec66c --- diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index 2d156ad659e..5e59941ee48 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -2972,7 +2972,7 @@ aarch64_linux_ltag_tests (void) } } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ void _initialize_aarch64_linux_tdep (); diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 6e712b12b86..f8c9fafb229 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -949,7 +949,7 @@ aarch64_analyze_prologue_test (void) } } } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ /* Implement the "skip_prologue" gdbarch method. */ @@ -5946,7 +5946,7 @@ aarch64_process_record_test (void) deallocate_reg_mem (&aarch64_record); } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ /* Parse the current instruction and record the values of the registers and diff --git a/gdb/addrmap.c b/gdb/addrmap.c index bd5601b063e..9eb330b6e11 100644 --- a/gdb/addrmap.c +++ b/gdb/addrmap.c @@ -480,7 +480,7 @@ test_addrmap () CHECK_ADDRMAP_FIND (map, array, 14, 19, nullptr); } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ void _initialize_addrmap (); diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 0c15215b30c..bdad0779ca7 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -14846,7 +14846,7 @@ arm_analyze_prologue_test () } } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ /* Cleans up local record registers and memory allocations. */ diff --git a/gdb/break-cond-parse.c b/gdb/break-cond-parse.c index 0428cdfa732..65615af3526 100644 --- a/gdb/break-cond-parse.c +++ b/gdb/break-cond-parse.c @@ -684,7 +684,7 @@ create_breakpoint_parse_arg_string_tests () test_error ("task 1xxx", "Junk 'xxx' after task keyword."); } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ void _initialize_break_cond_parse (); diff --git a/gdb/complaints.c b/gdb/complaints.c index 07c0f7e52e5..b50bea84679 100644 --- a/gdb/complaints.c +++ b/gdb/complaints.c @@ -185,7 +185,7 @@ test_complaints () } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ void _initialize_complaints (); diff --git a/gdb/cp-support.c b/gdb/cp-support.c index 3621d685a56..6dd364df1c4 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -2267,7 +2267,7 @@ test_cp_remove_params () #undef CHECK_INCOMPL } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_CHECK */ diff --git a/gdb/disasm-selftests.c b/gdb/disasm-selftests.c index 221b94f0851..ffacf8b02af 100644 --- a/gdb/disasm-selftests.c +++ b/gdb/disasm-selftests.c @@ -329,7 +329,7 @@ memory_error_test (struct gdbarch *gdbarch) SELF_CHECK (saw_memory_error); } -} // namespace selftests +} /* namespace selftests */ void _initialize_disasm_selftests (); void diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c index c11e45bc2bf..67dc5344cee 100644 --- a/gdb/dwarf2/frame.c +++ b/gdb/dwarf2/frame.c @@ -574,7 +574,7 @@ execute_cfa_program_test (struct gdbarch *gdbarch) SELF_CHECK (fs.regs.prev == NULL); } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ diff --git a/gdb/dwarf2/read-gdb-index.c b/gdb/dwarf2/read-gdb-index.c index 80b2931cd60..baa54938653 100644 --- a/gdb/dwarf2/read-gdb-index.c +++ b/gdb/dwarf2/read-gdb-index.c @@ -985,7 +985,7 @@ run_test () test_dw2_expand_symtabs_matching_symbol (); } -}} // namespace selftests::dw2_expand_symtabs_matching +}} /* namespace selftests::dw2_expand_symtabs_matching */ #endif /* GDB_SELF_TEST */ diff --git a/gdb/extract-store-integer.c b/gdb/extract-store-integer.c index 644273c9639..8987cf54652 100644 --- a/gdb/extract-store-integer.c +++ b/gdb/extract-store-integer.c @@ -333,7 +333,7 @@ extract_integer_test () do_extract_tests (0x00, 0x00, 0x00); } -} // namespace selftests +} /* namespace selftests */ #endif diff --git a/gdb/gdbarch-selftests.c b/gdb/gdbarch-selftests.c index dbb93412eea..56ecc381505 100644 --- a/gdb/gdbarch-selftests.c +++ b/gdb/gdbarch-selftests.c @@ -179,7 +179,7 @@ check_stack_growth (struct gdbarch *gdbarch) SELF_CHECK (stack_grows_up != stack_grows_down); } -} // namespace selftests +} /* namespace selftests */ void _initialize_gdbarch_selftests (); void diff --git a/gdb/python/python.c b/gdb/python/python.c index 94b1fc939ae..3fb5fbc742a 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -2634,7 +2634,7 @@ test_python () #undef CHECK_OUTPUT -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ #endif /* HAVE_PYTHON */ diff --git a/gdb/regcache.c b/gdb/regcache.c index c980b6feb34..65e69d25578 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -2228,7 +2228,7 @@ regcache_thread_ptid_changed () gdb_assert (regcaches.empty ()); } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ void _initialize_regcache (); diff --git a/gdb/remote.c b/gdb/remote.c index 87946490a9e..173f4c94075 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -16159,7 +16159,7 @@ test_packet_check_result () SELF_CHECK (packet_check_result ("").status () == PACKET_UNKNOWN); } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ void _initialize_remote (); diff --git a/gdb/scoped-mock-context.h b/gdb/scoped-mock-context.h index 6fd83da4679..9173ecb9efa 100644 --- a/gdb/scoped-mock-context.h +++ b/gdb/scoped-mock-context.h @@ -75,7 +75,7 @@ struct scoped_mock_context } }; -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ #endif /* GDB_SCOPED_MOCK_CONTEXT_H */ diff --git a/gdb/selftest-arch.c b/gdb/selftest-arch.c index a337f76083a..17eeba843e9 100644 --- a/gdb/selftest-arch.c +++ b/gdb/selftest-arch.c @@ -108,5 +108,5 @@ reset () registers_changed (); reinit_frame_cache (); } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ diff --git a/gdb/test-target.h b/gdb/test-target.h index b88c154da8f..e29d659725f 100644 --- a/gdb/test-target.h +++ b/gdb/test-target.h @@ -59,7 +59,7 @@ public: } }; -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ #endif /* GDB_TEST_TARGET_H */ diff --git a/gdb/testsuite/gdb.linespec/cp-replace-typedefs-ns-template.cc b/gdb/testsuite/gdb.linespec/cp-replace-typedefs-ns-template.cc index 2ec402bae40..af2e583bfa8 100644 --- a/gdb/testsuite/gdb.linespec/cp-replace-typedefs-ns-template.cc +++ b/gdb/testsuite/gdb.linespec/cp-replace-typedefs-ns-template.cc @@ -70,9 +70,9 @@ int_Templ1_t_func (int_Templ1_t *) { } -} // namespace NS2 +} /* namespace NS2 */ -} // namespace NS1 +} /* namespace NS1 */ /* These typedefs have the same name as some of the components within NS1 that they alias to, on purpose, to try to confuse GDB and cause diff --git a/gdb/testsuite/gdb.python/py-xmethods.cc b/gdb/testsuite/gdb.python/py-xmethods.cc index 52fa2ff6e59..99753dc8976 100644 --- a/gdb/testsuite/gdb.python/py-xmethods.cc +++ b/gdb/testsuite/gdb.python/py-xmethods.cc @@ -137,7 +137,7 @@ G::mul (const T1 t1) return t1 * t; } -} // namespace dop +} /* namespace dop */ using namespace dop; diff --git a/gdb/unittests/lookup_name_info-selftests.c b/gdb/unittests/lookup_name_info-selftests.c index fe87bedac76..a6b50851cc9 100644 --- a/gdb/unittests/lookup_name_info-selftests.c +++ b/gdb/unittests/lookup_name_info-selftests.c @@ -100,7 +100,7 @@ run_tests () #undef CHECK_INCOMPL } -}} // namespace selftests::lookup_name +}} /* namespace selftests::lookup_name */ void _initialize_lookup_name_info_selftests (); void diff --git a/gdbserver/server.cc b/gdbserver/server.cc index 879ea78779d..3d452f91686 100644 --- a/gdbserver/server.cc +++ b/gdbserver/server.cc @@ -4071,7 +4071,7 @@ test_memory_tagging_functions (void) && tags.size () == 5); } -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ /* Main function. This is called by the real "main" function, @@ -5121,5 +5121,5 @@ void reset () {} -} // namespace selftests +} /* namespace selftests */ #endif /* GDB_SELF_TEST */ diff --git a/gdbsupport/selftest.cc b/gdbsupport/selftest.cc index d3bed68038a..174c45b7032 100644 --- a/gdbsupport/selftest.cc +++ b/gdbsupport/selftest.cc @@ -138,4 +138,4 @@ all_selftests () return selftests_range (tests.cbegin (), tests.cend ()); } -} // namespace selftests +} /* namespace selftests */ diff --git a/gdbsupport/unordered_dense.h b/gdbsupport/unordered_dense.h index 2aaacd617a6..73dc9ace732 100644 --- a/gdbsupport/unordered_dense.h +++ b/gdbsupport/unordered_dense.h @@ -267,7 +267,7 @@ inline void mum(uint64_t* a, uint64_t* b) { return detail::wyhash::mix(x, UINT64_C(0x9E3779B97F4A7C15)); } -} // namespace detail::wyhash +} /* namespace detail::wyhash */ ANKERL_UNORDERED_DENSE_EXPORT template struct hash { @@ -431,7 +431,7 @@ ANKERL_UNORDERED_DENSE_PACK(struct big { size_t m_value_idx; // index into the m_values vector. }); -} // namespace bucket_type +} /* namespace bucket_type */ namespace detail { @@ -492,7 +492,7 @@ struct base_table_type_map { // base type for set doesn't have mapped_type struct base_table_type_set {}; -} // namespace detail +} /* namespace detail */ // Very much like std::deque, but faster for indexing (in most cases). As of now this doesn't implement the full std::vector // API, but merely what's necessary to work as an underlying container for ankerl::unordered_dense::{map, set}. @@ -1918,7 +1918,7 @@ public: } }; -} // namespace detail +} /* namespace detail */ ANKERL_UNORDERED_DENSE_EXPORT template , Bucket, true>; -} // namespace pmr +} /* namespace pmr */ # endif @@ -1992,8 +1992,8 @@ using segmented_set = // deduction guides for alias templates are only possible since C++20 // see https://en.cppreference.com/w/cpp/language/class_template_argument_deduction -} // namespace ANKERL_UNORDERED_DENSE_NAMESPACE -} // namespace ankerl::unordered_dense +} /* namespace ANKERL_UNORDERED_DENSE_NAMESPACE */ +} /* namespace ankerl::unordered_dense */ // std extensions ///////////////////////////////////////////////////////////// @@ -2026,7 +2026,7 @@ auto erase_if(ankerl::unordered_dense::detail::table