Skip to content

Commit

Permalink
Remove __gnu_inline function attribute
Browse files Browse the repository at this point in the history
Fixes #18
  • Loading branch information
scottt committed Feb 6, 2021
1 parent 25c15dd commit fe313ac
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions debugbreak.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2011-2018, Scott Tsai
/* Copyright (c) 2011-2021, Scott Tsai
*
* All rights reserved.
*
Expand Down Expand Up @@ -49,7 +49,7 @@ __inline__ static void trap_instruction(void)
#elif defined(__thumb__)
#define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_TRAP_INSTRUCTION
/* FIXME: handle __THUMB_INTERWORK__ */
__attribute__((gnu_inline, always_inline))
__attribute__((always_inline))
__inline__ static void trap_instruction(void)
{
/* See 'arm-linux-tdep.c' in GDB source.
Expand Down Expand Up @@ -81,7 +81,7 @@ __inline__ static void trap_instruction(void)
}
#elif defined(__arm__) && !defined(__thumb__)
#define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_TRAP_INSTRUCTION
__attribute__((gnu_inline, always_inline))
__attribute__((always_inline))
__inline__ static void trap_instruction(void)
{
/* See 'arm-linux-tdep.c' in GDB source,
Expand All @@ -94,7 +94,7 @@ __inline__ static void trap_instruction(void)
#define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_BULTIN_TRAP
#elif defined(__aarch64__)
#define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_TRAP_INSTRUCTION
__attribute__((gnu_inline, always_inline))
__attribute__((always_inline))
__inline__ static void trap_instruction(void)
{
/* See 'aarch64-tdep.c' in GDB source,
Expand All @@ -104,7 +104,7 @@ __inline__ static void trap_instruction(void)
#elif defined(__powerpc__)
/* PPC 32 or 64-bit, big or little endian */
#define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_TRAP_INSTRUCTION
__attribute__((gnu_inline, always_inline))
__attribute__((always_inline))
__inline__ static void trap_instruction(void)
{
/* See 'rs6000-tdep.c' in GDB source,
Expand All @@ -126,20 +126,20 @@ __inline__ static void trap_instruction(void)
#ifndef DEBUG_BREAK_IMPL
#error "debugbreak.h is not supported on this target"
#elif DEBUG_BREAK_IMPL == DEBUG_BREAK_USE_TRAP_INSTRUCTION
__attribute__((gnu_inline, always_inline))
__attribute__((always_inline))
__inline__ static void debug_break(void)
{
trap_instruction();
}
#elif DEBUG_BREAK_IMPL == DEBUG_BREAK_USE_BULTIN_TRAP
__attribute__((gnu_inline, always_inline))
__attribute__((always_inline))
__inline__ static void debug_break(void)
{
__builtin_trap();
}
#elif DEBUG_BREAK_IMPL == DEBUG_BREAK_USE_SIGTRAP
#include <signal.h>
__attribute__((gnu_inline, always_inline))
__attribute__((always_inline))
__inline__ static void debug_break(void)
{
raise(SIGTRAP);
Expand Down

0 comments on commit fe313ac

Please sign in to comment.