Skip to content

Commit

Permalink
Add dbgConstructorFn
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbiesek committed Jun 22, 2023
1 parent 649a537 commit efc54de
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1879,6 +1879,20 @@ getSettings(bool attachedFlag)
return settings;
}

/*
* This is a helper function designed to facilitate the debugging process
* of the constructor. To utilize this function, place a call to dbgConstructorFn()
* in the code section that needs to be debugged. By running the code with a debugger,
* you can modify the value of dbgConstructor to break out of the initialization loop.
*/
// static void
// dbgConstructorFn(void) {
// static int dbgConstructor = 1;
// while (dbgConstructor) {
// sleep(1);
// }
// }

__attribute__((constructor)) void
init(void)
{
Expand Down

0 comments on commit efc54de

Please sign in to comment.