|
Hey,
I have seen some similar discussions on this, but thought there might be an answer out there..
My problem:
When I call VirtualAlloc() with a specific memory address, say 0x60abcdef for 100000 bytes, it will fail.
A subsequent virtualQuery sometimes often indicates that it is memory mapped region. The thing is, I haven't loaded any libraries, or memory mapped any regions.
Is there a way to figure out what is in this memory, or who allocated/memory mapped it? And/or strategies for ensuring that as much of the user space virtual memory is as empty as possible?
(I know my process,ntdll and user32.dll aren't mapped to this region either)
|
|
|
|
|
felix15 wrote: The thing is, I haven't loaded any libraries, or memory mapped any regions.
When every you run an application the exe's and dll's associated with that application is loaded into the memory as a memory mapped file. So may be to that locations some dlls is mapped.If you u took the moudle window in the visual studio, you can see from which address to which address each modules are loaded. So take the module window and see if any dll falls in the memory location 0x60abcdef.
|
|
|
|
|
I don't think its the process exe as it was at 0x400000 and the only other two dlls loaded were ntdll and user32 which were in the upper 0x7's... Would a thing like an onboard video card with shared memory use a memory mapped file (or something similar) in user space ?
|
|
|
|
|
felix15 wrote: Would a thing like an onboard video card with shared memory use a memory mapped file (or something similar) in user space ?
Ofcourse no. They steal physical memory, not process memory.
Did you check your process with "Process Explorer". All the memeory mapped files of a process will be listed in it.
|
|
|
|
|
Hi,
I am using VS6 on my xp machine and am not able to my my vs 6 go to definition work.
Can any one tell me if i need to do some settings?
I already checked the generate browser info and generate debug info options.
any advice?
regards,
Ramachandraraju KK
|
|
|
|
|
Try once again by deleting your *.bsc file.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
after closing the project
Greetings from Germany
|
|
|
|
|
I have forget how to create a DOS Window to output some program parameters during its run.
Can anyone post this info please.
Thanks,
Andy.
|
|
|
|
|
It can be done using AllocConsole, AttachConsole etc. if that is what you mean.
« Superman »
|
|
|
|
|
From your profile: In short - Nothing seem to work out the way he wants it.
Welcome to my world.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
« Superman »
|
|
|
|
|
Hi all,
I've done quite a bit of reading over the last few days with regards to analyzing application crash dumps etc. I've got a customer who occasionally gets an application crash that we're unable to reproduce here. The code looks fine, we have no idea whats going on. From what I'm reading, I can have the customer send me the crash dump fro Dr. Watson, then open it up to see where the FAULT is. Understood, no problems so far. As a test, I compiled the code in release, included symbols, forced a crash and was able to see where the fault was.
My question more or less revolves around the SYMBOLS which tell you where the functions are located in the code, (PDB files). When you release a new version of your software, do you always BUILD these symbol files as part of the release configuration and tuck them away until you need them??
Our current process just bulids a simple RELEASE configuration with no map exports & no symbol building.
Questions:
1) Do you build symbols/maps with your software during the RELEASE compile?
2) Is there any disadvantage to ALWAYS creating these files during the RELEASE compile? Is anything else included in the .EXE/DLLs which may assist in the wrong people trying to debug your application?
3) I'm assuming the version of the .exe and the .pdb have to be from the same compile, correct?
Bottom line, what should I be doing as part of my RELEASE configuration to take full advantage of symbols/crash dumps etc.
Sorry, I'm a little green here with this stuff... anything you can contribute would be greatly appreciated.
Mke.
|
|
|
|
|
Mike Doner wrote: When you release a new version of your software, do you always BUILD these symbol files as part of the release configuration and tuck them away until you need them??
Yes, I always keep the symbol files for release builds. If you've got no symbol files releasing is not an option. As to where to put them the best option is to use Microsoft's Symbol Server[^]. Note that the default settings for release builds is not to generate debug information: the first thing I do when starting a new project is change this.
Mike Doner wrote: Is there any disadvantage to ALWAYS creating these files during the RELEASE compile? Is anything else included in the .EXE/DLLs which may assist in the wrong people trying to debug your application?
Not if you use PDB files (as then the symbols are stored separately). The only thing that's in the EXE is the full path to the PDB file on the build system.
Steve
|
|
|
|
|
Stephen Hewitt wrote: As to where to put them the best option is to use Microsoft's Symbol Server[^].
You mean I an upload my symbols to MS symbol server. Any pointer?
-Saurabh
|
|
|
|
|
|
Saurabh.Garg wrote: You mean I an upload my symbols to MS symbol server. Any pointer?
No, you don't upload them. The Symbol Server is a tool that comes with WinDBG for managing symbols and simplifying debugging by automatically locating the correct symbol files.
Steve
|
|
|
|
|
I am aware of symbol server and have been using it for long time. The way you said in your original post it seems that we can upload symbols to symbol server as well.
-Saurabh
|
|
|
|
|
You put your symbols into a centralised symbol server when you do a release.
Steve
|
|
|
|
|
Whenever i want to create a new thread I copy the source code with which i am having problemfrom my c++ compiler to "Text" box with .But the
#include<windows.h>
changes
#include<windows.h>
std::cout<<"winsock startup failed\n"<<WSAGetLastError();
changes to
std::cout<<"winsock startup failed\n"<<WSAGetLastError();
Can anybody tell me the cause </windows.h>
|
|
|
|
|
I don't know if it is what you're looking for, but you should enclose code snippets inside <pre> tags and use < to escape < symbol.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Try using the checkbox that says something like "Ignore HTML tags" or something.
led mike
|
|
|
|
|
I'm currently working on a project that involves modifying certain aspects of pGina [^]source code. Most of my experience in C/C++ has been in command line apps, nothing this deep into the OS. pGina compiles into a DLL that takes over the standard msgina windows logon dialogue.
My problem however is in trying to execute a batch file or command line app from within this code. I've tried CreateProcess/AsUser() and system() neither of which actually execute my code. At this stage I think everything is being run as the system account. My code will be run right after the user is authenticated but it never runs that file (I tested this with a simple batch file that creates another file to see if it was even running).
Can anyone point me in the right direction? Yes I know I'm in over my head
Thanks!
// Steve McLenithan
|
|
|
|
|
Steve McLenithan wrote: I've tried CreateProcess/AsUser() and system()
What does the code look like?
What about something like:
::ShellExecute(NULL, _T("open"), _T("C:\\mybatchfile.bat"), NULL, NULL, SW_SHOWNORMAL);
Mark
|
|
|
|
|
I'll test this tonight and let you know.
// Steve McLenithan
|
|
|
|
|
This worked perfectly. I had done something similar to this, but I omitted the _T macro. I guess it is needed
Thank you!
|
|
|
|