Hello and welcome to today's lecture.
In this lecture, we are going to delve into the fascinating world of debugging and code execution analysis
using a powerful tool known as data display debugger or triple D.
So if you are a Linux enthusiast or software developer looking to enhance your debugging skills, you
will learn that topic in this course.
So let's jump right in the data display debugger, often abbreviated as d, d d is an indispensable
debugging tool that comes with a user friendly graphical interface tailored for the Linux operating
system.
Its primary objective is to assist developers in diagnosing, understanding and rectifying issues with
their code by providing an intuitive visual representation of program execution.
So triple D, d, d, d, also known as the empowers developers to analyze the behavior of their code
step by step, making the debugging process more efficient and productive.
So before we dive deeper, uh, let's ensure you have a d d d up and running on your system.
Installation is a breeze.
Just open your terminal and execute this sudo here.
Sudo apt install d d d and enter your password for account.
And that's it.
So this will fetch and install the package from your linux package manager.
And once installed you will be ready to harness the power of triple D to its fullest potential.
So before we proceed further, let's take a moment to understand why debugging is such a crucial aspect
of software development.
So even most experienced developers encounter bugs, unexpected behaviors and logical errors in their
code.
So debugging helps us identify, isolate and correct these issues, ensuring our programs run smoothly
and reliably d d.
D acts as a guiding light in this process, allowing us to gain insights into how our code is executed
and where potential pitfalls lie.
So to give you practical examples of D these capabilities, we will embark on our coding journey together.
So in this section we will be working on a program that might not produce any visible output.
However, our goal is not to see the output, but to explore the intricacies of the code, execution
and concepts registers here.
So but we will also, um, we might add some outputs here, but now we will need to open our this system
and start our.
Uh, process here.
But, uh, here now, we will need to open the system, so we will name our.
Then click on Create new project, delete this existing project here and that's it.
So here, after installing the data display debugger, we will just write this short code here, which
we will move this here and we will name it move that ASM here.
So add the command, move that ASM, add the section data here so we will add almost six numbers be
nom nom de nom and ki nam one ki nam two and ki nam three.
Here.
Now let's add this here be Nam db here DB one, two, three, W num.
So these are the data variables here that we will use.
W d is one, two, three, 45D num.
Uh DD1, two, three, four, five, six, seven, 890.
And q num one.
D Q Here is.
Is going to be like, you know, from 1 to 0 and 1 to 9, one to.
Here.
That's it.
And we will also add M2 and M3 here.
M2 is again available to the queue here.
And one, two, three, four, five, six here.
And queue number three is going to be the queue.
This is going to be our number point 14.
So we will also add this section VSS here.
Action.
We will not write anything for it and we will also add action text.
Then we will create a global main.
And in main function here.
They will firstly pass.
Uh, we will.
Firstly, in this main function, we will pass the.
Yes, uh, we will push the RPC and.
Here?
Uh parsh.
RB.
He.
Who RSVP'd to RSVP.
Racks.
And this one.
So this is to.
Uh, this is Phil.
The racks with once.
And move a little bit.
And here we will enter the byte num here.
The p norm.
This is this actually does not clear upper bits of rax so does not does not clear upper bits of Rax.
So you can also write the crucial points like upper case here.
Uh, to make attention.
So we will also add X or here.
Better so x or racks rax here.
So this is for the, uh, clearing the rax.
Clear the racks and move again.
L and bite here.
So again, we will pass this beenham here to make the rags to have the correct value here with this.
In in here we have now racks has the correct value.
And after that we will move the racks minus one.
So we will fill the.
Racks with ones.
And here, Rex.
One.
Or will racks with once.
And after that, move the axe here to war here.
And we will also pass the numb here.
W nom.
This does not clear the upper bits of rax again.
Actually, since we are.
Again copying this here so it will be better.
As one spaces new lines here.
So fill racks with once and again this does does not clear does not clear upper bits of racks.
And again XOR here.
Racks.
Racks Here we are clearing the racks.
You you learned that X or in lecture actually.
But it's same here and now.
We will move the ax word.
W name again.
And here again our now racks again here now Racks has the correct value.
And after that we will move the.
We will move the racks.
Rags minus one.
This is for.
Uh, fill racks with ones and move racks.
He walked here.
In this case, we will also pass the Num one.
This again.
Uh, does does this actually, uh, does clear upper.
It's off racks and you will learn why these are not actually, this one is clear.
Right.
So now we're going to do after that is we will, uh, make that one apparent.
Um.
Always in a register.
And after that we will need to source operand to an immediate value.
So we'll learn that here.
Or here.
You numb to.
Racks here.
One operand.
Always a register.
And move here Cracks.
This is the source of her.
Um.
Immediate value.
Move.
KXM0 here.
And.
X.
X zero.
And here.
Paascu Norm three.
The instruction.
And floating point.
And after that we will move RSP.
To.
And pop here.
And after that, we'll finally read.
So we will save the source file.
A source file as the move that move that RSM.
And we will build and run it to see if it works in the next lecture.
So actually, let's.
Create a new folder.
Move.
And I will save it.
Move that --.
So that's it.
And I'm waiting you in next lecture.