aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2024-07-16 16:02:12 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2024-07-16 18:30:45 -0400
commitd9deb60b2e9e94b532f43a7d3ddddf5ddf6dbdd3 (patch)
treeb8897a470d1270148fdee39e16f54baa3907a079 /gdb/nat
parent9153eb8a7f5449c9baa67b2349cdfc0a47104c9a (diff)
downloadgdb-d9deb60b2e9e94b532f43a7d3ddddf5ddf6dbdd3.zip
gdb-d9deb60b2e9e94b532f43a7d3ddddf5ddf6dbdd3.tar.gz
gdb-d9deb60b2e9e94b532f43a7d3ddddf5ddf6dbdd3.tar.bz2
gdb, gdbserver, gdbsupport: use [[noreturn]] instead of ATTRIBUTE_NORETURN
C++ 11 has a built-in attribute for this, no need to use a compat macro. Change-Id: I90e4220d26e8f3949d91761f8a13cd9c37da3875 Reviewed-by: Lancelot Six <lancelot.six@amd.com>
Diffstat (limited to 'gdb/nat')
-rw-r--r--gdb/nat/aarch64-mte-linux-ptrace.c4
-rw-r--r--gdb/nat/fork-inferior.h7
-rw-r--r--gdb/nat/linux-namespaces.c2
3 files changed, 6 insertions, 7 deletions
diff --git a/gdb/nat/aarch64-mte-linux-ptrace.c b/gdb/nat/aarch64-mte-linux-ptrace.c
index ace3e18..9e2a2ce 100644
--- a/gdb/nat/aarch64-mte-linux-ptrace.c
+++ b/gdb/nat/aarch64-mte-linux-ptrace.c
@@ -31,7 +31,7 @@
/* Helper function to display various possible errors when reading
MTE tags. */
-static void ATTRIBUTE_NORETURN
+[[noreturn]] static void
aarch64_mte_linux_peek_error (int error)
{
switch (error)
@@ -53,7 +53,7 @@ aarch64_mte_linux_peek_error (int error)
/* Helper function to display various possible errors when writing
MTE tags. */
-static void ATTRIBUTE_NORETURN
+[[noreturn]] static void
aarch64_mte_linux_poke_error (int error)
{
switch (error)
diff --git a/gdb/nat/fork-inferior.h b/gdb/nat/fork-inferior.h
index f3e2f54..0fd4218 100644
--- a/gdb/nat/fork-inferior.h
+++ b/gdb/nat/fork-inferior.h
@@ -84,13 +84,12 @@ extern void gdb_flush_out_err ();
/* Report an error that happened when starting to trace the inferior
(i.e., when the "traceme_fun" callback is called on fork_inferior)
and bail out. This function does not return. */
-extern void trace_start_error (const char *fmt, ...)
- ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
+[[noreturn]] extern void trace_start_error (const char *fmt, ...)
+ ATTRIBUTE_PRINTF (1, 2);
/* Like "trace_start_error", but the error message is constructed by
combining STRING with the system error message for errno. This
function does not return. */
-extern void trace_start_error_with_name (const char *string)
- ATTRIBUTE_NORETURN;
+[[noreturn]] extern void trace_start_error_with_name (const char *string);
#endif /* NAT_FORK_INFERIOR_H */
diff --git a/gdb/nat/linux-namespaces.c b/gdb/nat/linux-namespaces.c
index 36a245c..9abd3d6 100644
--- a/gdb/nat/linux-namespaces.c
+++ b/gdb/nat/linux-namespaces.c
@@ -548,7 +548,7 @@ mnsh_handle_readlink (int sock, const char *filename)
/* The helper process. Never returns. Must be async-signal-safe. */
-static void mnsh_main (int sock) ATTRIBUTE_NORETURN;
+[[noreturn]] static void mnsh_main (int sock);
static void
mnsh_main (int sock)