forked from srinirad/IA1-Revision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
p2debuglog.txt
103 lines (102 loc) · 2.4 KB
/
p2debuglog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
gcc -g p2final.c
gdb a.out
GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from a.out...done.
(gdb) b main
Breakpoint 1 at 0x82f: file p2final.c, line 24.
(gdb) r
Starting program: /home/runner/IA1-Revision/a.out
warning: Error disabling address space randomization: Operation not permitted
Breakpoint 1, main () at p2final.c:24
24 printf("enter any three integers\n");
(gdb) n
enter any three integers
25 a=input();
(gdb) s
input () at p2final.c:3
3 {
(gdb) n
5 scanf("%d",&a);
(gdb) n
1
6 return a;
(gdb) n
7 }
(gdb) n
main () at p2final.c:26
26 b=input();
(gdb) s
input () at p2final.c:3
3 {
(gdb) n
5 scanf("%d",&a);
(gdb) n
3
6 return a;
(gdb) n
7 }
(gdb) n
main () at p2final.c:27
27 c=input();
(gdb) s
input () at p2final.c:3
3 {
(gdb) n
5 scanf("%d",&a);
(gdb) n
2
6 return a;
(gdb) n
7 }
(gdb) n
main () at p2final.c:28
28 largest=cmp(a,b,c);
(gdb) s
cmp (a=1, b=3, c=2) at p2final.c:10
10 if(a>b && a>c)
(gdb) p a
$1 = 1
(gdb) p b
$2 = 3
(gdb) p c
$3 = 2
(gdb) n
12 else if(b>a && b>c)
(gdb) n
13 return b;
(gdb) n
16 }
(gdb) n
main () at p2final.c:29
29 output(a,b,c,largest);
(gdb) s
output (a=1, b=3, c=2, largest=3) at p2final.c:19
19 printf("greatest among %d , %d and %d is %d \n",a,b,c,largest);
(gdb) n
greatest among 1 , 3 and 2 is 3
20 }
(gdb) n
main () at p2final.c:30
30 return 0;
(gdb) n
31 }(gdb) n
__libc_start_main (main=0x556d09600827 <main>, argc=1, argv=0x7ffd679fad78,
init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7ffd679fad68) at ../csu/libc-start.c:344
344 ../csu/libc-start.c: No such file or directory.
(gdb) n
[Inferior 1 (process 213) exited normally]
(gdb)