MCPcopy Create free account
hub / github.com/ElementsProject/lightning / breakpoint_init

Function breakpoint_init

ccan/ccan/breakpoint/breakpoint.c:17–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17void breakpoint_init(void)
18{
19 struct sigaction old, new;
20
21 new.sa_handler = trap;
22 new.sa_flags = 0;
23 sigemptyset(&new.sa_mask);
24 sigaction(SIGTRAP, &new, &old);
25 kill(getpid(), SIGTRAP);
26 sigaction(SIGTRAP, &old, NULL);
27
28 if (!breakpoint_initialized) {
29 breakpoint_initialized = true;
30 breakpoint_under_debug = true;
31 }
32}

Callers 1

breakpointFunction · 0.85

Calls 1

sigactionClass · 0.70

Tested by

no test coverage detected