Scale Posted March 27, 2009 Posted March 27, 2009 I am a beginner in c++ but i noticed that when i wrote a c++ dll and then loaded it into olly so i could check if everything worked, it would also display the source of what every operand does.It happens completely automatic however this time it does not, so how can i load my source code into olly?thanks
Killboy Posted March 27, 2009 Posted March 27, 2009 You have to generate debug data. There should be an option inside whatever compiler you're using.This will generate .pdb files Olly can read the source/symbols from.
Scale Posted March 28, 2009 Author Posted March 28, 2009 The pdb file is in the same folder (the release folder from visual studio) where the actual dll file is located, how do i load it into olly?Debug > select symbol path, didn't seem to work.
Killboy Posted March 28, 2009 Posted March 28, 2009 Olly automatically loads pdb files from the same folder as the debuggee. You shouldnt have to set any extra options if it worked before :s Perhaps your debug data is out of date and Olly checks against an md5 or something. I'm not that familiar with the pdb format tbh. Try deleting the pdb and recompiling, otherwise upload the file + pdb somewhere if it's not topsecret ****
Scale Posted March 28, 2009 Author Posted March 28, 2009 Olly automatically loads pdb files from the same folder as the debuggee.You shouldnt have to set any extra options if it worked before :s Perhaps your debug data is out of date and Olly checks against an md5 or something. I'm not that familiar with the pdb format tbh. Try deleting the pdb and recompiling, otherwise upload the file + pdb somewhere if it's not topsecret **** Ahh i get it now, the pdb loads everything under view > source files and all the files are absent because it was compiled on an former windows installation. it's not secret It's a very boring detour but maybe you can help me with it This is probably the worst code you will ever see, i am currently using a counter that when count == 11 return and it works but i am not happy with that, That's just bad coding int (__cdecl *sub_check_o)(int x);string zxc = "";size_t found;int __cdecl sub_check(int x){ __asm { pushad mov zxc, eax } found = zxc.find("test", 0); if (found == string::npos) { __asm { popad } return sub_check_o(x); } else { __asm { popad } return; }}
high6 Posted March 28, 2009 Posted March 28, 2009 Olly automatically loads pdb files from the same folder as the debuggee.You shouldnt have to set any extra options if it worked before :s Perhaps your debug data is out of date and Olly checks against an md5 or something. I'm not that familiar with the pdb format tbh. Try deleting the pdb and recompiling, otherwise upload the file + pdb somewhere if it's not topsecret **** Ahh i get it now, the pdb loads everything under view > source files and all the files are absent because it was compiled on an former windows installation. it's not secret It's a very boring detour but maybe you can help me with it This is probably the worst code you will ever see, i am currently using a counter that when count == 11 return and it works but i am not happy with that, That's just bad coding int (__cdecl *sub_check_o)(int x); string zxc = ""; size_t found; int __cdecl sub_check(int x) { __asm { pushad mov zxc, eax } found = zxc.find("test", 0); if (found == string::npos) { __asm { popad } return sub_check_o(x); } else { __asm { popad } return; } } int (__cdecl *sub_check_o)(int x); string zxc = ""; size_t found; int __cdecl sub_check(int x) { found = zxc.find("test", 0); if (found == string::npos) return sub_check_o(x); return 0; } If you redirect a call, you don't have to popad/pushad. Also you don't even need popad/pushad with a non call redirection. My method is void HandleHere(){//Real code here}void RedirectHere(){ HandleHere(); _asm { jmp Return }} (Haven't used it in awhile, you may need to change the calling convention) Of course you can do this 100s of ways. That personally is how I like doing it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now