C preprocessor: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
mNo edit summary |
mNo edit summary |
||
Line 30: | Line 30: | ||
alert("\n"); \ |
alert("\n"); \ |
||
} while(0) |
} while(0) |
||
void * malloc(size_t s) { |
void * malloc(size_t s) { |
||
complain((uint32)kernel_heap.first_free->addr); |
complain((uint32)kernel_heap.first_free->addr); |
||
Line 48: | Line 46: | ||
... |
... |
||
Finding death point or program flow |
|||
SYSFAIL: page fault, %eip= 0xc0001d330, %cr2=0x00000000 |
|||
#define lnDbg do { alert("<<"); alert(__func__); alert(" : "); alert_decimal(__LINE__); alert(">>\n"); } while(0) |
|||
13 void a(int i) { |
|||
14 lnDbg; |
|||
15 if (fun(i)) b(i) else a(i-1); |
|||
16 lnDbg; |
|||
17 a(i); |
|||
18} |
|||
19 void b(int i) { |
|||
20 lnDbg; |
|||
21 if (!is(i)) return ; |
|||
22 lnDbg; |
|||
23 b(i+1); |
|||
24 lnDbg; |
|||
25} |
|||
<<a: 14>> |
|||
<<b: 20>> //line 16 wasn't run, fun(i) has returned true |
|||
<<a: 16> //line 22 wasn't run, !is(i) has returned true |
|||