Open 8thMage opened 8 years ago
Hey 8thMage, send me mail--it's my firstname.lastname@microsoft.com--and I'll loop you in with the linker dev who can explain these things for you. We've never really documented this area as there are so few people who are interested :-/
I sent it, but you have not responded, please tell if you didn't get it.
Wouldn't it be better to keep the discussion here? So that other people can benefit from it in the future?
@8thMage, I was sleeping :) I sent mail a couple hours ago.
@avakar, email and Skype can be more expedient than GitHub issues. We will roll back anything we've learned or discovered from this conversation to a public forum.
What i think is both the variables are acting as a pointer ..because in memory, u have created only one instance of your image, and first you have stored address of that instance into function parameter and then again into variable used in function, that's why you are not getting any difference in hex places for both variables, since both are pointing to the address of the picture simultaneously.
Yes, the compiler probably reused the incoming argument slot for the local variable (it can do that because you don't use the argument anywhere else) so both point to the same stack location. You can verify by checking the generated assembly.
hello, i'm trying to parse a pdb in order to write a debugger. i've got the following sample function: `static void clear(PictureBuffer buffer,unsigned int Color) { PictureBuffer a = buffer; for(int i=0;i<a.height;i++) { for(int j=0;j<buffer.width;j++) { buffer.picture[i*buffer.pitch+j]=Color;
} ` and you can see in this function 2 instances of PictureBuffer, one of them is passed as a parameter and one is in the function. the function parameter as speced in x64 call convention is passed as a pointer, and the instance in the scope sits as values on the stack well i've got the hex for the places in the pdb here, and i don't see any difference between the two instances, can you point me to how i can know whether it's a pointer or not?
also, is there a place to ask question about the pdb file format that is not in the github issues section? please point me to it if there is one. thanks, the_8th_mage.