1 00:00:00,180 --> 00:00:06,990 So the previous year, we have written out our program, assembly language, and now we are going to 2 00:00:07,440 --> 00:00:09,980 see how to rebuild our program. 3 00:00:10,620 --> 00:00:14,460 For that, we need to have a debugger to develop the program. 4 00:00:14,850 --> 00:00:22,320 And the GDP is one of the typical duty which stands for Guerrouj bonus debugger and duty is the common. 5 00:00:22,320 --> 00:00:28,980 And the worker for Linux come and the worker means we need to give some comments in order to deploy 6 00:00:28,980 --> 00:00:29,670 the program. 7 00:00:31,590 --> 00:00:36,450 Like means we need to do the command to see the sebu instructions. 8 00:00:36,900 --> 00:00:42,840 We need to give the command to see the registered values and like that. 9 00:00:43,740 --> 00:00:46,950 First, we need to do some comments to you, anything. 10 00:00:47,760 --> 00:00:56,460 But if you're debugging a lot of complex code and you need to enter again and again, that's why they 11 00:00:56,460 --> 00:01:04,080 have created so many guys have created the plugins and one of the protagonists para plugin, it helps 12 00:01:04,080 --> 00:01:05,910 to visualize the resistance and step. 13 00:01:06,630 --> 00:01:12,360 It means that when you step stepping through the program, this program will show you the rejecters 14 00:01:12,960 --> 00:01:15,290 and the CPU instructions and the stack. 15 00:01:16,350 --> 00:01:23,160 So you don't need to type more commands to do the ridiculousness that this will do it for you. 16 00:01:23,430 --> 00:01:27,210 Actually, this project uses the concept of GDP Hooke's. 17 00:01:27,420 --> 00:01:33,690 So whenever you step through the program, the scripts and the hooks are being executed. 18 00:01:35,160 --> 00:01:42,000 First in this video, we'll be seeing how normal you comment and then we really start to propagate and 19 00:01:42,000 --> 00:01:46,630 we will see how serious are these features and stuff. 20 00:01:47,160 --> 00:01:49,410 So GDP is the user, the worker. 21 00:01:50,610 --> 00:01:56,480 So I know up up to my knowledge, I think the derivs user, more debugger. 22 00:01:57,300 --> 00:02:00,290 It cannot be what the kernel programs. 23 00:02:00,990 --> 00:02:03,420 And also there are many good. 24 00:02:03,960 --> 00:02:05,200 Which is just better. 25 00:02:05,610 --> 00:02:11,610 So if you take a look at this UDP debugger for Linux, it has some graphical user interface. 26 00:02:12,480 --> 00:02:18,870 So it's it's like sort of the military budget, which is also a graphical user interface. 27 00:02:19,620 --> 00:02:25,920 So this is a graphical user interface debugger which uses GDP as bakin. 28 00:02:26,190 --> 00:02:31,260 So when you click the button button next button, then it will use the GDP as well. 29 00:02:32,190 --> 00:02:39,090 So guess now we'll move on to our virtual machine and then we will deploy the program. 30 00:02:39,240 --> 00:02:44,320 Oh, we have our program binary and the source code and the clip. 31 00:02:45,030 --> 00:02:50,220 Now we can deploy the device with this binary file. 32 00:02:56,570 --> 00:03:06,860 Now, what I'm going to do is I'm going to space and Carandiru, I want to find this beautiful Goodbee 33 00:03:07,190 --> 00:03:08,210 space filename. 34 00:03:08,540 --> 00:03:14,990 Now, if I hit Enter now, the prompt has been changed to some brackets. 35 00:03:14,990 --> 00:03:20,990 And here this is the duty we from you need to enter the comments relative to GDP. 36 00:03:22,460 --> 00:03:25,880 So the first comment I'm going to show is in four functions. 37 00:03:28,900 --> 00:03:34,820 So if you type in for functions, the functions in our program will be shown here. 38 00:03:36,160 --> 00:03:38,830 So there are different functions. 39 00:03:39,160 --> 00:03:47,320 So we do not explicitly define a function, but there is some symbol, Carlstadt underscore, because 40 00:03:47,680 --> 00:03:55,970 this is the starting point of the program and you can see the address of this function. 41 00:03:57,460 --> 00:04:05,310 Now, if I want to use the code from the start function, I can disassemble UDP has some basic because 42 00:04:05,320 --> 00:04:09,790 I'm ready to disassemble the code and convert it to the assembly language. 43 00:04:10,180 --> 00:04:12,610 Now, what I want to say is this is No. 44 00:04:14,790 --> 00:04:19,910 Not if I take business and then if I hit the button, it will come for us. 45 00:04:21,210 --> 00:04:23,040 I learned that the system will start. 46 00:04:24,900 --> 00:04:32,190 Now, you can see the summary court for our program and if you can see the syntax is somewhat different 47 00:04:32,190 --> 00:04:36,330 because it is reality and this index, it is much harder to learn. 48 00:04:38,070 --> 00:04:42,420 Now, we can convert this index into the index index. 49 00:04:44,110 --> 00:04:46,210 By doing this said disassembly flivver. 50 00:04:54,900 --> 00:05:02,190 Said this is somebody forever to know what we're going to lose, we need to disassemble the start function 51 00:05:02,190 --> 00:05:02,470 again. 52 00:05:03,660 --> 00:05:08,230 Now you can see our simple assembly syntax, which is in this index. 53 00:05:09,180 --> 00:05:13,180 Now, this is the exact way our code we have written in our source code. 54 00:05:13,800 --> 00:05:21,210 You can see moving Ebix Syriacs, the arguments of the right system and then, yes, the actual number 55 00:05:21,210 --> 00:05:28,920 of the system and then guardedness of the printer and then across we are moving the exit and the register. 56 00:05:29,400 --> 00:05:33,660 So I did not tell this before I went where I I'm debugging. 57 00:05:33,660 --> 00:05:34,820 I have got an error. 58 00:05:34,890 --> 00:05:39,130 So I have put the exit of Geto and then I have Cardus after. 59 00:05:39,180 --> 00:05:47,070 And so in order to step through this instruction by instruction, we need to set the breakpoint at the 60 00:05:47,070 --> 00:05:48,780 start of this address. 61 00:05:49,450 --> 00:05:58,980 We can set the breakpoint by Longbrake and the address of the instruction, or if you don't know the 62 00:05:58,980 --> 00:06:03,060 address, you can simply state can simply say the function name. 63 00:06:03,740 --> 00:06:05,510 He said a break and start. 64 00:06:06,510 --> 00:06:12,510 So it will set the breakpoint at this address which used this address, which is our first instruction. 65 00:06:13,860 --> 00:06:21,900 Now, if you want to see the registers, I mean earthquakes and UTX and so on, we need to type in four 66 00:06:21,900 --> 00:06:22,560 registers. 67 00:06:24,990 --> 00:06:30,420 So since our program is not running, we have no resistance, no, no, I'm going to run the program. 68 00:06:30,630 --> 00:06:31,410 I say run. 69 00:06:33,290 --> 00:06:37,580 So our break point one has been hit and the program has been stopped. 70 00:06:38,330 --> 00:06:49,310 Now, if you see the registers now you can see IAP has been shown to the starting of instruction not 71 00:06:49,310 --> 00:06:51,650 to see the other instructions again. 72 00:06:51,660 --> 00:06:54,050 We need to disassemble the start function again. 73 00:07:03,600 --> 00:07:10,920 So I said this is a start, and then you can see one thing newly here is the arrow mark. 74 00:07:11,310 --> 00:07:17,210 This arrow points to the next section to be executed, which is this one, which is our first section. 75 00:07:18,480 --> 00:07:23,020 So up to now, our program has never been executed. 76 00:07:23,040 --> 00:07:26,160 Now we are going to execute the fashion section. 77 00:07:27,100 --> 00:07:35,100 So to execute the only one instruction step by step, we need to sit next ay, which is next. 78 00:07:35,290 --> 00:07:38,070 Exactly, it's the next instruction. 79 00:07:38,080 --> 00:07:41,130 Only now if I the next day and you turn to. 80 00:07:42,870 --> 00:07:50,040 Now, it's just this one, this addresses the second instruction and the breakpoint has been heated, 81 00:07:50,760 --> 00:07:51,610 this instruction. 82 00:07:52,440 --> 00:08:00,110 Now, if I disassemble again the start, you can see the ademar change it from disastrous to second 83 00:08:00,120 --> 00:08:00,570 address. 84 00:08:02,070 --> 00:08:07,170 So it means that the first section has already been executed. 85 00:08:08,010 --> 00:08:09,840 What is the fashion section means? 86 00:08:09,840 --> 00:08:10,640 More e-books. 87 00:08:10,650 --> 00:08:11,210 Come on. 88 00:08:12,870 --> 00:08:15,300 It means that we are copying one value into it. 89 00:08:15,840 --> 00:08:21,030 So let's check whether our image has value, one or not, to do that. 90 00:08:21,450 --> 00:08:30,390 I mean, for instance, and you can see your works and ethics and so on up to Evertz and then Ebix, 91 00:08:30,390 --> 00:08:31,140 where there is one. 92 00:08:31,920 --> 00:08:36,810 So that construction has been executed and the value of one is comparable ebooks. 93 00:08:37,620 --> 00:08:42,380 Now, as you can see, the next instruction is more you see on this address. 94 00:08:43,350 --> 00:08:44,520 So I don't know what that do. 95 00:08:44,970 --> 00:08:46,260 So let me copy this. 96 00:08:46,650 --> 00:08:52,250 So to get a value at that address, we have the XCOM extends, for example. 97 00:08:52,680 --> 00:08:58,260 And what you want to do is actually slash you need to do the British. 98 00:09:01,120 --> 00:09:06,340 Sorry, OK, we are going with David address, so I want to bring to the. 99 00:09:09,440 --> 00:09:15,050 So I want to bring the contents of this address and I have got this, so it's not readable format because 100 00:09:15,050 --> 00:09:20,690 we don't know what it is I'm going to say, yes, it stands for string. 101 00:09:21,320 --> 00:09:25,010 So examined spring at this address. 102 00:09:25,370 --> 00:09:33,560 If I hit enter, we get the hollow world, which is our actual string that is stored in the argument 103 00:09:34,340 --> 00:09:35,690 of the right system called. 104 00:09:37,980 --> 00:09:45,540 So this year, this is how you view the contents of that address, using the examine and examine at 105 00:09:45,540 --> 00:09:51,870 the top of the data you need to print and address. 106 00:09:54,000 --> 00:10:03,330 And we can also say, excuse me, I want to bring Turbit's from that address and we can see the first 107 00:10:03,330 --> 00:10:08,490 one is horrible and then it will print Leventhal's because there is no date at the. 108 00:10:11,630 --> 00:10:14,390 OK, now I again disassemble the. 109 00:10:15,570 --> 00:10:16,200 Start. 110 00:10:18,360 --> 00:10:21,610 And then this injunction is going to be executed next. 111 00:10:21,930 --> 00:10:23,610 Now let's run that construction. 112 00:10:25,650 --> 00:10:33,360 Now you can see the another breakpoint is in the year, and now if I get disassemble the start, we 113 00:10:33,360 --> 00:10:40,590 can see the arrow more to the disvalue and then suction more. 114 00:10:40,590 --> 00:10:43,530 This atrous into the X has been completed. 115 00:10:44,250 --> 00:10:48,340 And you can see I have mentioned the injection pointer. 116 00:10:48,690 --> 00:10:49,260 Which point? 117 00:10:49,260 --> 00:10:53,100 RECONNECTION instruction since the zero mark is pointing to this address. 118 00:10:53,130 --> 00:10:58,680 Let's see if our Yabe resistor how these orders are not to do that you need to search in for. 119 00:11:00,900 --> 00:11:09,420 Registers, as you can see, the EPA's injunction points and addresses the exactly that amount pointing 120 00:11:09,420 --> 00:11:12,450 to because it's the next instruction to be executed. 121 00:11:13,140 --> 00:11:21,360 Now, as you can see, since this instruction has been executed, we must help you see where you as 122 00:11:21,360 --> 00:11:21,970 deserters. 123 00:11:22,140 --> 00:11:24,570 Let's take that so easy here. 124 00:11:24,570 --> 00:11:27,540 And the value of these orders has been placed here. 125 00:11:29,820 --> 00:11:35,310 So the next injection is going to be this one, and if I say next, I. 126 00:11:37,450 --> 00:11:43,330 Again, this is only the start we can see this this instruction has been executed and the next is going 127 00:11:43,330 --> 00:11:44,400 to be this one. 128 00:11:45,400 --> 00:11:55,720 So if I execute again next instruction and then the next instruction is going to be our software and 129 00:11:55,740 --> 00:11:56,060 drop. 130 00:11:56,440 --> 00:11:59,890 And at this point, our registers content. 131 00:11:59,890 --> 00:12:00,550 Exactly. 132 00:12:00,550 --> 00:12:02,860 The arguments of our rail system. 133 00:12:04,990 --> 00:12:07,320 No, I'm going to do the next instruction. 134 00:12:07,740 --> 00:12:17,380 Now, this internal software will involve the system, Koranda and our rights to execute it when order 135 00:12:17,680 --> 00:12:26,150 system is executed, our arguments and the size and those that will be printed onto the screen. 136 00:12:26,320 --> 00:12:29,100 That is how the world is going to be printed on the screen. 137 00:12:31,030 --> 00:12:32,170 I'm going to hit enter. 138 00:12:33,190 --> 00:12:40,630 As you can see, the whole world is printed because this involves the system and then our system has 139 00:12:40,630 --> 00:12:41,680 been executed. 140 00:12:42,640 --> 00:12:48,040 Now, if I disassemble the start, you can see this is the system called. 141 00:12:49,820 --> 00:12:56,560 No story, no one is the number of the right to call and exit of it safe registered program. 142 00:12:57,600 --> 00:13:04,270 The next day, next day and then again, it is a somber note. 143 00:13:04,280 --> 00:13:11,010 We are going to call this if Tom Kahaner and it was in the system, call it system call. 144 00:13:11,570 --> 00:13:13,550 Now, the program exists normally. 145 00:13:17,040 --> 00:13:24,520 Now, you can see in the process the process already existed normally, so we have learned how to set 146 00:13:24,520 --> 00:13:32,070 the breakpoint and how to step through the program and how to check the various registers and so on. 147 00:13:33,030 --> 00:13:35,900 So this is very somewhat tedious task. 148 00:13:35,910 --> 00:13:43,580 The need to tie up the command every time, whenever you are stepping through the program, know what 149 00:13:43,590 --> 00:13:47,040 they're going to do is I'm going to quit the derivative of that. 150 00:13:49,410 --> 00:13:52,770 No, I'm going to install a project called again. 151 00:13:56,380 --> 00:14:02,650 So in Google, you take the GDP and the first one is the public click on that. 152 00:14:06,550 --> 00:14:11,120 Now, if you come down, this is the installation process, these planes are installation process. 153 00:14:11,140 --> 00:14:13,310 This is just printing output. 154 00:14:13,660 --> 00:14:15,160 So let me copy this. 155 00:14:20,670 --> 00:14:21,770 I am sorry. 156 00:14:28,720 --> 00:14:30,280 I don't know, it's not coming. 157 00:14:38,840 --> 00:14:41,600 OK, just let me open the browser in Firefox. 158 00:14:55,040 --> 00:15:00,250 I think maybe was has been not installed recently. 159 00:15:00,320 --> 00:15:04,450 This one two machine has been updated without my permission. 160 00:15:05,680 --> 00:15:06,890 That's what we want to use. 161 00:15:10,630 --> 00:15:16,510 And that update has been crashed, the young drivers. 162 00:15:30,130 --> 00:15:34,780 So now we are going to crown this repository to our home for the. 163 00:15:41,380 --> 00:15:45,010 It is also not installed, let us install that. 164 00:16:40,480 --> 00:16:45,310 So there is no hard that has been installed that has grown in the past three. 165 00:16:49,620 --> 00:17:00,240 So now we need to point the bird up, I don't feel to be in it so that when out of the GDP our pet gets 166 00:17:00,240 --> 00:17:00,630 Rodek. 167 00:17:02,600 --> 00:17:07,910 Now we are going to repeat the same process as returning the normal GDP. 168 00:17:13,010 --> 00:17:24,600 As you can see in the previous normal GDP, it has the GDP current, but now the problem has been Janica 169 00:17:24,620 --> 00:17:31,010 GDP, Fonterra, it means that there are now some functions. 170 00:17:31,280 --> 00:17:32,360 I mean, commands. 171 00:17:32,570 --> 00:17:35,360 We can execute them also. 172 00:17:37,280 --> 00:17:42,780 This can also be helpful in the experiment perspective also, but that's another topic. 173 00:17:43,170 --> 00:17:50,240 Now we have to get the same comments as in our previous regular GDP. 174 00:17:52,160 --> 00:17:56,240 So if I say in full function, it says that there is a underscore. 175 00:17:57,260 --> 00:18:04,340 Now, let me discuses, disassemble it and have completion. 176 00:18:06,680 --> 00:18:08,610 I and it is. 177 00:18:10,450 --> 00:18:18,630 It shows us some real, but the you can see the default when we first excluded the decision to start, 178 00:18:18,640 --> 00:18:22,090 we have the Energy and peace index, we got data in this index. 179 00:18:22,450 --> 00:18:30,370 But this will already set the default assembly forever as intended. 180 00:18:30,430 --> 00:18:35,860 So whenever you run, the discussion will start, you get automatically the entire flavor. 181 00:18:36,940 --> 00:18:44,040 Now, there is one more comment, which is like modification of this has no comment. 182 00:18:44,080 --> 00:18:45,190 That is predecessor. 183 00:19:09,760 --> 00:19:17,750 I guess this also disassembles our function, but I don't know why there is no color syntax. 184 00:19:18,100 --> 00:19:20,840 OK, now let's let's skip that. 185 00:19:22,330 --> 00:19:26,980 Now, what I'm going to do is I'm going to set the breakpoint at our start function. 186 00:19:29,630 --> 00:19:34,670 Now, as you can see, Breakpoint has been set at this address, which is our first financial action, 187 00:19:35,270 --> 00:19:36,610 not what I'm going to lose. 188 00:19:37,130 --> 00:19:42,390 I'm going to sit next to I'm sorry I did not run the program. 189 00:19:44,130 --> 00:19:50,960 OK, now you can see whenever we run the program, the program has been started from the absolute final 190 00:19:50,960 --> 00:19:51,260 part. 191 00:19:51,650 --> 00:19:59,120 And then here, this program has already executed some court and that court shows us the registers, 192 00:19:59,450 --> 00:20:05,840 as you can see, X, Ebix and so on, up to including extended flight registers. 193 00:20:10,040 --> 00:20:15,620 And this here, you can see the CPU instructions, this is our first. 194 00:20:16,190 --> 00:20:24,560 We have seen that this is somebody it you come on as you can see this and there are also highlights 195 00:20:24,560 --> 00:20:27,410 the instruction that is going to be executed. 196 00:20:28,910 --> 00:20:30,380 You can see the atmosphere here. 197 00:20:30,530 --> 00:20:33,370 That means that decisions are going to be executed next. 198 00:20:33,560 --> 00:20:39,680 And it also highlights this instruction in the green color and the remaining as a white color. 199 00:20:42,180 --> 00:20:42,630 And. 200 00:20:45,420 --> 00:20:53,760 It also shows us the stack, the stack, and this is the starting of the stack and the stack grows from 201 00:20:53,760 --> 00:20:55,620 higher interest to the right address. 202 00:20:56,460 --> 00:21:03,510 And if you can see the first, the program's absolute file part has been loaded onto the stack. 203 00:21:04,530 --> 00:21:08,730 And then you can see the stack whenever you will be seeing this stack. 204 00:21:09,420 --> 00:21:16,860 When we encounter the push and pop operations now at the down, you can see the breakpoint, one at 205 00:21:17,040 --> 00:21:17,890 addressing the stack. 206 00:21:18,690 --> 00:21:24,950 So this in this way, you can easily no need to type the info registers because there is just because 207 00:21:24,950 --> 00:21:30,720 operation registers for you and you don't need to disassemble again to see the instructions because 208 00:21:30,720 --> 00:21:34,900 barisha in the instructions for you and you can also see the stack at the same point. 209 00:21:35,580 --> 00:21:38,110 So I can simply sit next to you next time. 210 00:21:39,210 --> 00:21:45,190 No, I can simply see this registers and also the stack at the same time. 211 00:21:46,650 --> 00:21:49,590 So this is like automating some duty books. 212 00:21:50,880 --> 00:22:00,570 So next, I know we can see that UTX value is the address and ADR does it also, which is the contents 213 00:22:00,570 --> 00:22:02,450 of that address and it displays. 214 00:22:02,460 --> 00:22:03,840 As for us, the PA. 215 00:22:04,470 --> 00:22:04,850 Hello. 216 00:22:05,400 --> 00:22:09,860 So it's somewhat so much easier and convenience than normal duty. 217 00:22:10,890 --> 00:22:17,040 I recommend you to also use the GDP first and then of bringing. 218 00:22:20,620 --> 00:22:28,750 And now if we are going to invoke the right system, if I hit enter and know how the Harold has been 219 00:22:28,760 --> 00:22:35,830 murdered, so I just hit enter because the previous instruction in each day, no, I did not give any 220 00:22:36,160 --> 00:22:36,640 comment. 221 00:22:36,640 --> 00:22:44,950 And then if I had under the previous instruction, would it be that our new instruction, I mean previous 222 00:22:44,950 --> 00:22:48,040 comment will be the our new command. 223 00:22:48,400 --> 00:22:56,020 So it will invoke it will execute the last command and then now we are invoking the system. 224 00:22:56,380 --> 00:22:58,210 Now our program exists. 225 00:22:59,770 --> 00:23:08,930 You can see programming normally and not running, and you can also could be using good command. 226 00:23:10,120 --> 00:23:18,110 So in this way, we can just debug the program with GDP and also with better plugging. 227 00:23:19,660 --> 00:23:26,630 So from this we rely on what if I want to debugging new program I will be showing in the. 228 00:23:30,670 --> 00:23:37,270 But I also suggest you to learn some basic GDP comments, those will be very helpful.