From 7dd52c0c3c5bed82632cfe026c66b419b096931b Mon Sep 17 00:00:00 2001 From: Abhishek Akkabathula Date: Tue, 26 Nov 2024 12:45:52 +0530 Subject: [PATCH] test commit to check pc --- apps/examples/hello/hello_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/examples/hello/hello_main.c b/apps/examples/hello/hello_main.c index ada58ad5d5..c5ff57114d 100644 --- a/apps/examples/hello/hello_main.c +++ b/apps/examples/hello/hello_main.c @@ -61,12 +61,15 @@ * hello_main ****************************************************************************/ +__attribute__ ((__noinline__)) +void * get_pc () { return __builtin_return_address(0); } + #ifdef CONFIG_BUILD_KERNEL int main(int argc, FAR char *argv[]) #else int hello_main(int argc, char *argv[]) #endif { - printf("Hello, World!!\n"); + printf("Hello, World!!, pc : %p\n", get_pc()); return 0; }