1 00:00:01,070 --> 00:00:04,340 Hello and welcome to today's lecture. 2 00:00:04,340 --> 00:00:11,210 In this lecture, we are going to delve into the fascinating world of debugging and code execution analysis 3 00:00:11,210 --> 00:00:16,580 using a powerful tool known as data display debugger or triple D. 4 00:00:16,850 --> 00:00:22,310 So if you are a Linux enthusiast or software developer looking to enhance your debugging skills, you 5 00:00:22,310 --> 00:00:24,530 will learn that topic in this course. 6 00:00:24,530 --> 00:00:32,810 So let's jump right in the data display debugger, often abbreviated as d, d d is an indispensable 7 00:00:32,810 --> 00:00:38,750 debugging tool that comes with a user friendly graphical interface tailored for the Linux operating 8 00:00:38,750 --> 00:00:39,380 system. 9 00:00:39,380 --> 00:00:46,070 Its primary objective is to assist developers in diagnosing, understanding and rectifying issues with 10 00:00:46,070 --> 00:00:51,380 their code by providing an intuitive visual representation of program execution. 11 00:00:51,380 --> 00:00:57,710 So triple D, d, d, d, also known as the empowers developers to analyze the behavior of their code 12 00:00:57,710 --> 00:01:03,120 step by step, making the debugging process more efficient and productive. 13 00:01:03,150 --> 00:01:09,570 So before we dive deeper, uh, let's ensure you have a d d d up and running on your system. 14 00:01:10,020 --> 00:01:11,580 Installation is a breeze. 15 00:01:11,580 --> 00:01:15,690 Just open your terminal and execute this sudo here. 16 00:01:15,690 --> 00:01:22,350 Sudo apt install d d d and enter your password for account. 17 00:01:22,350 --> 00:01:23,430 And that's it. 18 00:01:23,430 --> 00:01:28,740 So this will fetch and install the package from your linux package manager. 19 00:01:28,740 --> 00:01:35,430 And once installed you will be ready to harness the power of triple D to its fullest potential. 20 00:01:35,430 --> 00:01:42,330 So before we proceed further, let's take a moment to understand why debugging is such a crucial aspect 21 00:01:42,330 --> 00:01:43,920 of software development. 22 00:01:43,920 --> 00:01:51,840 So even most experienced developers encounter bugs, unexpected behaviors and logical errors in their 23 00:01:51,840 --> 00:01:52,260 code. 24 00:01:52,260 --> 00:02:00,540 So debugging helps us identify, isolate and correct these issues, ensuring our programs run smoothly 25 00:02:00,540 --> 00:02:02,520 and reliably d d. 26 00:02:02,520 --> 00:02:11,040 D acts as a guiding light in this process, allowing us to gain insights into how our code is executed 27 00:02:11,040 --> 00:02:13,800 and where potential pitfalls lie. 28 00:02:14,010 --> 00:02:22,050 So to give you practical examples of D these capabilities, we will embark on our coding journey together. 29 00:02:22,050 --> 00:02:27,060 So in this section we will be working on a program that might not produce any visible output. 30 00:02:27,090 --> 00:02:32,550 However, our goal is not to see the output, but to explore the intricacies of the code, execution 31 00:02:32,550 --> 00:02:34,680 and concepts registers here. 32 00:02:34,680 --> 00:02:45,110 So but we will also, um, we might add some outputs here, but now we will need to open our this system 33 00:02:45,120 --> 00:02:47,100 and start our. 34 00:02:47,950 --> 00:02:49,440 Uh, process here. 35 00:02:49,450 --> 00:02:55,510 But, uh, here now, we will need to open the system, so we will name our. 36 00:02:59,630 --> 00:03:04,890 Then click on Create new project, delete this existing project here and that's it. 37 00:03:04,910 --> 00:03:12,140 So here, after installing the data display debugger, we will just write this short code here, which 38 00:03:12,800 --> 00:03:17,680 we will move this here and we will name it move that ASM here. 39 00:03:17,690 --> 00:03:27,650 So add the command, move that ASM, add the section data here so we will add almost six numbers be 40 00:03:27,800 --> 00:03:34,640 nom nom de nom and ki nam one ki nam two and ki nam three. 41 00:03:34,640 --> 00:03:35,300 Here. 42 00:03:35,930 --> 00:03:45,860 Now let's add this here be Nam db here DB one, two, three, W num. 43 00:03:45,860 --> 00:03:49,040 So these are the data variables here that we will use. 44 00:03:49,250 --> 00:03:53,720 W d is one, two, three, 45D num. 45 00:03:54,510 --> 00:04:00,390 Uh DD1, two, three, four, five, six, seven, 890. 46 00:04:00,660 --> 00:04:03,660 And q num one. 47 00:04:05,250 --> 00:04:07,560 D Q Here is. 48 00:04:09,650 --> 00:04:15,830 Is going to be like, you know, from 1 to 0 and 1 to 9, one to. 49 00:04:17,880 --> 00:04:18,270 Here. 50 00:04:21,520 --> 00:04:22,180 That's it. 51 00:04:22,210 --> 00:04:26,380 And we will also add M2 and M3 here. 52 00:04:27,250 --> 00:04:31,270 M2 is again available to the queue here. 53 00:04:31,450 --> 00:04:35,380 And one, two, three, four, five, six here. 54 00:04:35,500 --> 00:04:38,860 And queue number three is going to be the queue. 55 00:04:38,890 --> 00:04:43,620 This is going to be our number point 14. 56 00:04:43,630 --> 00:04:48,130 So we will also add this section VSS here. 57 00:04:49,630 --> 00:04:51,030 Action BS. 58 00:04:51,070 --> 00:04:55,690 We will not write anything for it and we will also add action text. 59 00:04:55,720 --> 00:04:57,670 Then we will create a global main. 60 00:04:59,240 --> 00:05:01,820 And in main function here. 61 00:05:02,440 --> 00:05:04,150 They will firstly pass. 62 00:05:05,680 --> 00:05:06,190 Uh, we will. 63 00:05:06,190 --> 00:05:08,200 Firstly, in this main function, we will pass the. 64 00:05:08,230 --> 00:05:12,970 Yes, uh, we will push the RPC and. 65 00:05:16,520 --> 00:05:17,180 Here. 66 00:05:17,660 --> 00:05:19,210 Posh RB. 67 00:05:20,610 --> 00:05:21,270 He. 68 00:05:22,360 --> 00:05:25,960 Who RSVP'd to RSVP. 69 00:05:27,940 --> 00:05:28,870 Racks. 70 00:05:31,310 --> 00:05:32,000 And this one. 71 00:05:32,000 --> 00:05:33,740 So this is to. 72 00:05:35,000 --> 00:05:36,350 Uh, this is Phil. 73 00:05:37,210 --> 00:05:39,480 The racks with once. 74 00:05:41,610 --> 00:05:46,080 And move a little bit. 75 00:05:46,980 --> 00:05:50,550 And here we will enter the byte num here. 76 00:05:51,300 --> 00:05:53,320 The p norm. 77 00:05:53,790 --> 00:06:08,160 This is this actually does not clear upper bits of rax so does not does not clear upper bits of Rax. 78 00:06:08,160 --> 00:06:14,610 So you can also write the crucial points like upper case here. 79 00:06:15,560 --> 00:06:17,360 Uh, to make attention. 80 00:06:19,450 --> 00:06:24,220 So we will also add X or here. 81 00:06:35,020 --> 00:06:39,370 Better so x or racks rax here. 82 00:06:39,460 --> 00:06:44,050 So this is for the, uh, clearing the rax. 83 00:06:47,300 --> 00:06:52,220 Clear the racks and move again. 84 00:06:59,690 --> 00:07:02,930 L and bite here. 85 00:07:03,640 --> 00:07:11,830 So again, we will pass this beenham here to make the rags to have the correct value here with this. 86 00:07:13,270 --> 00:07:21,070 In in here we have now racks has the correct value. 87 00:07:21,910 --> 00:07:25,720 And after that we will move the racks minus one. 88 00:07:25,720 --> 00:07:27,880 So we will fill the. 89 00:07:28,880 --> 00:07:30,720 Racks with ones. 90 00:07:32,980 --> 00:07:35,710 And here, Rex. 91 00:07:37,000 --> 00:07:37,690 One. 92 00:07:39,380 --> 00:07:43,630 Or will racks with once. 93 00:07:44,930 --> 00:07:51,800 And after that, move the axe here to war here. 94 00:07:51,800 --> 00:07:54,260 And we will also pass the numb here. 95 00:07:55,440 --> 00:07:56,370 W nom. 96 00:07:56,670 --> 00:08:00,600 This does not clear the upper bits of rax again. 97 00:08:01,820 --> 00:08:03,710 Actually, since we are. 98 00:08:04,700 --> 00:08:08,180 Again copying this here so it will be better. 99 00:08:09,140 --> 00:08:11,630 As one spaces new lines here. 100 00:08:13,220 --> 00:08:23,630 So fill racks with once and again this does does not clear does not clear upper bits of racks. 101 00:08:24,970 --> 00:08:27,480 And again XOR here. 102 00:08:27,970 --> 00:08:28,740 Racks. 103 00:08:28,810 --> 00:08:31,330 Racks Here we are clearing the racks. 104 00:08:31,330 --> 00:08:34,930 You you learned that X or in lecture actually. 105 00:08:34,930 --> 00:08:38,740 But it's same here and now. 106 00:08:38,740 --> 00:08:42,910 We will move the ax word. 107 00:08:44,150 --> 00:08:45,530 W name again. 108 00:08:45,530 --> 00:08:55,580 And here again our now racks again here now Racks has the correct value. 109 00:08:57,360 --> 00:08:59,700 And after that we will move the. 110 00:09:01,980 --> 00:09:04,350 We will move the racks. 111 00:09:06,960 --> 00:09:09,210 Rags minus one. 112 00:09:09,480 --> 00:09:10,680 This is for. 113 00:09:12,200 --> 00:09:17,720 Uh, fill racks with ones and move racks. 114 00:09:22,250 --> 00:09:23,630 He walked here. 115 00:09:25,170 --> 00:09:28,350 In this case, we will also pass the Num one. 116 00:09:28,440 --> 00:09:29,490 This again. 117 00:09:29,490 --> 00:09:34,380 Uh, does does this actually, uh, does clear upper. 118 00:09:35,490 --> 00:09:43,350 It's off racks and you will learn why these are not actually, this one is clear. 119 00:09:43,440 --> 00:09:43,950 Right. 120 00:09:44,460 --> 00:09:50,880 So now we're going to do after that is we will, uh, make that one apparent. 121 00:09:50,880 --> 00:09:51,380 Um. 122 00:09:52,380 --> 00:09:54,120 Always in a register. 123 00:09:54,120 --> 00:09:59,310 And after that we will need to source operand to an immediate value. 124 00:09:59,400 --> 00:10:02,030 So we'll learn that here. 125 00:10:02,730 --> 00:10:04,530 Or here. 126 00:10:05,260 --> 00:10:07,090 You numb to. 127 00:10:08,790 --> 00:10:10,440 Racks here. 128 00:10:11,160 --> 00:10:13,500 One operand. 129 00:10:13,500 --> 00:10:17,490 Always a register. 130 00:10:20,120 --> 00:10:22,880 And move here Cracks. 131 00:10:28,590 --> 00:10:33,330 This is the source of her. 132 00:10:36,310 --> 00:10:36,680 Um. 133 00:10:37,390 --> 00:10:40,060 Immediate value. 134 00:10:42,090 --> 00:10:42,390 Move. 135 00:10:42,510 --> 00:10:46,380 KXM0 here. 136 00:10:48,360 --> 00:10:48,750 And. 137 00:10:52,360 --> 00:10:52,500 X. 138 00:10:52,590 --> 00:10:53,980 X zero. 139 00:10:55,590 --> 00:10:58,460 And we'll here Paascu Norm three. 140 00:11:02,830 --> 00:11:04,310 The instruction. 141 00:11:05,440 --> 00:11:09,840 And floating point. 142 00:11:09,840 --> 00:11:13,290 And after that we will move RSP. 143 00:11:14,960 --> 00:11:15,140 To. 144 00:11:18,220 --> 00:11:20,800 And pop here. 145 00:11:21,590 --> 00:11:23,810 And after that, we'll finally read. 146 00:11:23,840 --> 00:11:25,990 So we will save the source file. 147 00:11:26,010 --> 00:11:32,480 A source file as the move that move that RSM. 148 00:11:33,740 --> 00:11:39,890 And we will build and run it to see if it works in the next lecture. 149 00:11:39,890 --> 00:11:41,090 So actually, let's. 150 00:11:42,690 --> 00:11:44,410 Create a new folder. 151 00:11:44,430 --> 00:11:45,270 Move. 152 00:11:48,240 --> 00:11:50,880 And I will save it. 153 00:11:51,120 --> 00:11:52,830 Move that --. 154 00:11:53,700 --> 00:11:54,420 So that's it. 155 00:11:54,420 --> 00:11:56,430 And I'm waiting you in next lecture.