|
Hello everyone,
I am using "Debug --> Attach to a process" to debug a process on my local computer. The process is not started from my VC project, but already run as a Windows service for a while and I want to attach to it to see some of its variables' status or something.
I have the related source codes, symbol files (PDB) and the binary file (running binary, including an exe and several dlls) of the same version.
I opened the project in VC and using Debug --> Attach to attach the process, it is successful -- but the running binary exe and related dynamically loaded DLLs are not run from the VC project (I mean from Debug/Release directory of the VC project).
My problem is when I set break point in some source codes for the dlls (the dlls are dynamically loaded by the exe using LoadLibrary) , there is error message like -- "The breakpoint will not currently be hit. No symbols have been loaded for this document."
Do I need to set some symbols? Anything wrong or check point for this issue?
thanks in advance,
George
|
|
|
|
|
Are the .pdb files in the same folder as the binaries?
Are you attaching to a release build that doesn't have debug info?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks Mark!
1.
What do you mean "attaching to a release build that doesn't have debug info"?
2.
".pdb files in the same folder as the binaries" -- you mean the same folder as the running binaries (exe/dll)?
regards,
George
|
|
|
|
|
George_George wrote: What do you mean "attaching to a release build that doesn't have debug info"?
Release builds typically don't have debug info associated with them.
George_George wrote: you mean the same folder as the running binaries (exe/dll)?
Yes - up-to-date ones.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks Mark!
"Release builds typically don't have debug info associated with them." -- I am confused about what do you mean debug info? Associated PDB file or something else?
regards,
George
|
|
|
|
|
|
Hi Mark,
1.
I want to confirm with you all debug symbol information are all contained in PDB file -- not in binary itself?
2.
What is the differences between /PDB and /Fd? They both specify the PDB file name, differences are?
regards,
George
|
|
|
|
|
Read the docs at the links.
It's the same info I'd give you.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I did not find any links in your post? Which link do you mean?
regards,
George
|
|
|
|
|
George_George wrote: I did not find any links in your post?
Four links here![^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks Mark,
The document I need is how debugger will utilize PDB file to resolve symbol names and also how debugger will use PDB to match the value with the related variable names.
I read your recommended documents, but they do not cover this topic. Do you have any documents about this topic to recommend? I did some search, but not find any.
regards,
George
|
|
|
|
|
By reading this description I think the Running Service uses the binary from the different location (Eg : C:\Program Files) and you kept your changes in Debug/Release folder of the project.
You have to replace changed binary at the location from where service initiates. Keep the PDB files related to it in same folder.
Then Start the service and try to debug .
Hope this will work for u....
Best Of luck.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
Thanks Mahesh,
Does optimization setting in compiler impacts whether I could use PDB/source files opened in VS to attach and debug a running process?
regards,
George
|
|
|
|
|
Hi,
I want a custome button in which the top left and right border are visible i.e (non transparent)
but the bottom border border should be transparent not visible so that it can look like a tab control
Can any one give me code for this.
Thanks & Regards.
Dhiraj Kumar Saini
|
|
|
|
|
Use an owner-drawn button. You can make it look any way you want.
|
|
|
|
|
hi,
Can u just help me out how use an owner draw button.
Thanks and regards.
Dhiraj Kumar Saini
|
|
|
|
|
|
Did you see Button section on the codeproject?
|
|
|
|
|
Hi,
Yes I hace seen button section on the codeproject.
There are severla custome button codes available but not the kind which i want where the side and upper border is visible and the bottom border is not visible.
Kindly help me.
Thanks & Regards.
Dhiraj Kumar Saini
|
|
|
|
|
Actually i want to know that How can i Make a setup of MFC(VC++) in visual studio 6?
Also I want to add a flash screen at the beggning. Can any one help.
|
|
|
|
|
Sk Mohiuddin wrote: ...How can i Make a setup of MFC(VC++)...
Please explain.
Sk Mohiuddin wrote: Also I want to add a flash screen...
Are you referring to a "splash screen?"
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
This question has only just been asked, and I suspect by you.
Search for "Splash Screen" && !FlashScreen...
The answers were clearly given. You do realise that it's not a picture of a search button that we have here?? It is in fact a fully functional bells-n-whistles Search Button, that strangely enough lets you search for things.
|
|
|
|
|
|
What is wrong in this strcpy()?
I tried this function call, no compile time errors, but results in error during runtime.
What could be the problem in that function call?
char *s= "TEST";
char *s1= NULL;
char * s_cpy(char * s,char * s1)
{
char * p=(char*) malloc(strlen(s));
p=s;
printf("%s\n",p); // prints TEST
printf("%s\n",s1); // prints <null>
printf("%s\n",s); // prints TEST
strcpy(s1,p); //error, test.exe has encountered a problem
return s1;
}
|
|
|
|
|
Member 5502879 wrote: printf("%s\n",s1); // prints
Prints what? Junk? Zero? Null?
Member 5502879 wrote: strcpy(s1,p); //error, test.exe has encountered a problem
You never allocated memory to s1, but are trying to write to something to it.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|