1 # connect gdb to Valgrind gdbserver:
2 target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-mcvabits
3 echo vgdb launched process attached\n
4 monitor v.set vgdb-error 999999
10 # continue till //1break:
16 # print local string variables:
19 # save address of undefined
20 set $0xundefined = &undefined
22 # Verif A-bits, V-bits, Get V-bits: A,V,G [0..9]
23 eval "monitor check_memory addressable 0x%lx 10", $0xundefined
24 eval "monitor check_memory defined 0x%lx 10", $0xundefined
25 eval "monitor get_vbits 0x%lx 10", $0xundefined
26 eval "monitor xb 0x%lx 10", $0xundefined
28 # continue till //2break:
31 # A,V,G [0..9] after the undefinition of some bytes by executable:
32 eval "monitor check_memory addressable 0x%lx 10", $0xundefined
33 eval "monitor check_memory defined 0x%lx 10", $0xundefined
34 eval "monitor get_vbits 0x%lx 10", $0xundefined
37 set $0xundefined_2 = (char*)$0xundefined + 2
38 eval "monitor make_memory defined 0x%lx 3", $0xundefined_2
40 eval "monitor check_memory addressable 0x%lx 10", $0xundefined
41 eval "monitor check_memory defined 0x%lx 10", $0xundefined
42 eval "monitor get_vbits 0x%lx 10", $0xundefined
45 eval "monitor make_memory undefined 0x%lx 4", $0xundefined_2
47 eval "monitor check_memory addressable 0x%lx 10", $0xundefined
48 eval "monitor check_memory defined 0x%lx 10", $0xundefined
49 eval "monitor get_vbits 0x%lx 10", $0xundefined
52 eval "monitor make_memory noaccess 0x%lx 2", $0xundefined_2
54 eval "monitor check_memory addressable 0x%lx 2", $0xundefined
55 eval "monitor check_memory defined 0x%lx 2", $0xundefined
56 eval "monitor get_vbits 0x%lx 2", $0xundefined
58 eval "monitor check_memory addressable 0x%lx 2", $0xundefined_2
59 eval "monitor check_memory defined 0x%lx 2", $0xundefined_2
60 eval "monitor get_vbits 0x%lx 2", $0xundefined_2
62 set $0xundefined_4 = (char*) $0xundefined_2 + 2
63 eval "monitor check_memory addressable 0x%lx 6", $0xundefined_4
64 eval "monitor check_memory defined 0x%lx 6", $0xundefined_4
65 eval "monitor get_vbits 0x%lx 6", $0xundefined_4
67 # Definedifaddressable undefined[0..9]
68 eval "monitor make_memory Definedifaddressable 0x%lx 10", $0xundefined
70 eval "monitor check_memory addressable 0x%lx 10", $0xundefined
71 eval "monitor check_memory defined 0x%lx 10", $0xundefined
72 eval "monitor get_vbits 0x%lx 10", $0xundefined