File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ OUTS := $(addsuffix $(OUT_EXT), $(basename $(INS)))
1313INS_CPP := $(wildcard * $(IN_EXT_CPP ) )
1414OUTS_CPP := $(addsuffix $(OUT_EXT ) , $(basename $(INS_CPP ) ) )
1515
16-
1716.PHONY : all clean run
1817
1918all : $(OUTS ) $(OUTS_CPP )
Original file line number Diff line number Diff line change 1+ #include <stdio.h>
12#include <stdlib.h>
3+ #include <time.h>
4+
5+ int f () {
6+ int i ;
7+ i = 0 ;
8+ i = 1 ;
9+ i = 2 ;
10+ return i ;
11+ }
12+
13+ int where_return (int i ) {
14+ if (i )
15+ return 0 ;
16+ else
17+ return 1 ;
18+ }
19+
20+ int main (void ) {
21+ int i ;
22+
23+ /* Variable changes. */
24+ i = 0 ;
25+ i = 1 ;
26+ i = 2 ;
27+
28+ /* Local call. */
29+ f ();
30+
31+ /* Where it returns. */
32+ /* https://stackoverflow.com/questions/3649468/setting-breakpoint-in-gdb-where-the-function-returns */
33+ where_return (0 );
34+ where_return (1 );
35+
36+ /* printf. Meh. How dare they ship this crap.
37+ * Use rr instead for now.
38+ * - https://stackoverflow.com/questions/40125154/target-record-full-in-gdb-makes-n-command-fail-on-printf-with-process-recor/46113357#46113357
39+ * - https://stackoverflow.com/questions/2528918/gdb-reverse-debugging-fails-with-process-record-does-not-support-instruction-0x/46113472#46113472
40+ * - https://stackoverflow.com/questions/42451492/disable-avx-optimized-functions-in-glibc-ld-hwcap-mask-etc-ld-so-nohwcap-for/44468494#44468494
41+ * - https://stackoverflow.com/questions/43750603/gdb-reverse-debugging-avx2
42+ * */
43+ printf ("i = %d\n" , i );
44+
45+ /* Is randomness completely removed? */
46+ srand (time (NULL ));
47+ i = rand ();
48+ printf ("rand() = %d\n" , i );
249
3- int main () {
4- int i , j ;
5- i = 0 ;
6- j = 0 ;
7- i = 1 ;
8- j = 1 ;
9- i = 2 ;
10- j = 2 ;
1150 return EXIT_SUCCESS ;
1251}
Original file line number Diff line number Diff line change 1+
12start
23record
4+ # TODO same as target record-full ?
35
46continue
57reverse-continue
You can’t perform that action at this time.
0 commit comments