Skip to content

Commit

Permalink
test commit to check pc
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-samsung committed Nov 26, 2024
1 parent abe3c75 commit 7dd52c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/examples/hello/hello_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 7dd52c0

Please sign in to comment.