File tree 3 files changed +49
-9
lines changed
3 files changed +49
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ OUTS := $(addsuffix $(OUT_EXT), $(basename $(INS)))
13
13
INS_CPP := $(wildcard * $(IN_EXT_CPP ) )
14
14
OUTS_CPP := $(addsuffix $(OUT_EXT ) , $(basename $(INS_CPP ) ) )
15
15
16
-
17
16
.PHONY : all clean run
18
17
19
18
all : $(OUTS ) $(OUTS_CPP )
Original file line number Diff line number Diff line change
1
+ #include <stdio.h>
1
2
#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 );
2
49
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 ;
11
50
return EXIT_SUCCESS ;
12
51
}
Original file line number Diff line number Diff line change
1
+
1
2
start
2
3
record
4
+ # TODO same as target record-full ?
3
5
4
6
continue
5
7
reverse-continue
You can’t perform that action at this time.
0 commit comments