Re: [PATCH v12 01/14] unwind_user: Add user space unwinding API

From: Mathieu Desnoyers
Date: Fri Jul 04 2025 - 13:58:51 EST


On 2025-06-30 20:53, Steven Rostedt wrote:
[...]
diff --git a/include/linux/unwind_user.h b/include/linux/unwind_user.h
new file mode 100644
index 000000000000..aa7923c1384f
--- /dev/null
+++ b/include/linux/unwind_user.h
[...]
+
+int unwind_user(struct unwind_stacktrace *trace, unsigned int max_entries);
+
+#define for_each_user_frame(state) \
+ for (unwind_user_start((state)); !(state)->done; unwind_user_next((state)))

You can remove the () around "state" when it's already surrounded by parentheses:

+#define for_each_user_frame(state) \
+ for (unwind_user_start(state); !(state)->done; unwind_user_next(state))

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com