How to debug .dll, .exe written in C 
Author Message
 How to debug .dll, .exe written in C

Quote:
> Hi,

> I have an Application.exe (in C) which uses the server.dll. The
> server.dll is also written in C. I want to walk through the code from the
> Application to the server code. What I did is starting the
> Application.exe, go to "Windows Task Manager", find the Application
> process and debug the process in Visual Studio. I opened the
> Application .c file, try to set the break point. It does not let me.  Same

thing happened in .c file in server.dll. I have the .pdb file and .exe or
.dll in the directory.

Quote:

> Can anyone point out what I did wrong?

Thanks in advance!
Sandy


Mon, 31 Oct 2005 00:42:45 GMT  
 How to debug .dll, .exe written in C

Quote:

> What I did is starting the Application.exe, go to "Windows Task
> Manager", find the Application process and debug the process in
> Visual Studio. I opened the Application .c file, try to set the
> break point. It does not let me. Same thing happened in .c file
> in server.dll. I have the .pdb file and .exe or .dll in the
> directory.

> Can anyone point out what I did wrong?

Not with any certainty on this information, but the PDB needs to be in the
directory where the linker created it. The EXE/DLL has a hard-coded
pathname to the PDB embedded in it, which the linker uses to locate the
PDB. Copying an EXE/DLL and the corresponding PDB to the same directory
doesn't work.

---

          "C++ - the fortran of the early 21st century."



Mon, 31 Oct 2005 06:41:00 GMT  
 How to debug .dll, .exe written in C

Quote:



>> What I did is starting the Application.exe, go to "Windows Task
>> Manager", find the Application process and debug the process in
>> Visual Studio. I opened the Application .c file, try to set the
>> break point. It does not let me. Same thing happened in .c file
>> in server.dll. I have the .pdb file and .exe or .dll in the
>> directory.

>> Can anyone point out what I did wrong?

>Not with any certainty on this information, but the PDB needs to be in the
>directory where the linker created it. The EXE/DLL has a hard-coded
>pathname to the PDB embedded in it, which the linker uses to locate the
>PDB. Copying an EXE/DLL and the corresponding PDB to the same directory
>doesn't work.

>---

>          "C++ - the FORTRAN of the early 21st century."

OK, this is not really true.  While the hardcoded name is the default, the
de{*filter*} can work around that by specifying PDB search paths.  To do this
go into the exe project options and add the search path of the PDB file.

--
Robert Sanchez, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.



Sat, 05 Nov 2005 02:24:55 GMT  
 How to debug .dll, .exe written in C


Quote:
> >Not with any certainty on this information, but the PDB needs to be in
> >the directory where the linker created it. The EXE/DLL has a
> >hard-coded pathname to the PDB embedded in it, which the linker uses
> >to locate the PDB. Copying an EXE/DLL and the corresponding PDB to the
> >same directory doesn't work.
> OK, this is not really true.  While the hardcoded name is the default,
> the de{*filter*} can work around that by specifying PDB search paths.  To
> do this go into the exe project options and add the search path of the
> PDB file.

Ah, thanks. I work with the command line, and only start the IDE to use
the de{*filter*}, so I don't tend to play with the project settings.

---

          "C++ - the FORTRAN of the early 21st century."



Sat, 05 Nov 2005 03:03:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Debugging child process, Startup .EXE for debugging DLL

2. Write some info to a DLL or exe

3. how a dll get notification from ActiveX exe(written in vb)

4. Howto debug a DLL that kicks off from an EXE

5. Cannot debug VB DLL directly from VC++ (unless it implements a seperate interface in an exe)

6. Debugging a VC dll used in VB exe

7. Debugging DLL from harness exe

8. Debugging DLL from EXE

9. Property page : Debug exe not working with Release DLL (vc6)

10. Release/Debug, a DLL and the EXE !!

11. Changing the *.EXE used for debugging a DLL

12. Debugging ISAPI DLL's written in Visual C++ 6.0

 

 
Powered by phpBB® Forum Software