u_debug_stack_test: Fix MSVC compiling by using ATTRIBUTE_NOINLINE
Fixes: d0d14f3f
("util: Add unit test for stack backtrace caputure")
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6303>
This commit is contained in:
parent
493298528a
commit
58af31186a
|
@ -24,9 +24,10 @@
|
|||
#include <stdio.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "util/macros.h"
|
||||
#include "util/u_debug_stack.h"
|
||||
|
||||
static void __attribute__((noinline))
|
||||
static void ATTRIBUTE_NOINLINE
|
||||
func_a(void)
|
||||
{
|
||||
struct debug_stack_frame backtrace[16];
|
||||
|
@ -36,7 +37,7 @@ func_a(void)
|
|||
debug_backtrace_dump(backtrace, 16);
|
||||
}
|
||||
|
||||
static void __attribute__((noinline))
|
||||
static void ATTRIBUTE_NOINLINE
|
||||
func_b(void)
|
||||
{
|
||||
struct debug_stack_frame backtrace[16];
|
||||
|
@ -48,7 +49,7 @@ func_b(void)
|
|||
debug_backtrace_dump(backtrace, 16);
|
||||
}
|
||||
|
||||
static void __attribute__((noinline))
|
||||
static void ATTRIBUTE_NOINLINE
|
||||
func_c(struct debug_stack_frame *frames)
|
||||
{
|
||||
debug_backtrace_capture(frames, 0, 16);
|
||||
|
|
Loading…
Reference in New Issue