Click here to get back home

Debugging into a .dll

 HomeNewsGroups | Search | About
 microsoft.public.smartphone.developer    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Debugging into a .dll J144 12-18-2007
Get Chitika Premium
Posted by J144 on December 18, 2007, 7:42 pm
Please log in for more thread options
Hi - I tried searching through the newsgroups for an answer to this but have
been unable to locate a similar problem. Seems like it could be a fairly
common mistake on my part, but the searches come up empty.

Anyway...

I have an app that calls in to a .dll. I build both the app and the .dll
with debug information turned on, and I have both the .exe and the .dll in
the same folder on the target device. Using the debugger (VS 2005
Professional) I am able to step through the code of the app, but am unable
to step into the .dll code. All source code is in plain old native c, no
c++ or c# code at all.

If I open a source file from the .dll while the app is running in the
debugger, and try to set a breakpoint in that file, VS immediately switches
to the Disassembly window and sets a breakpoint, but there are no symbols
listed anywhere nearby.

I have tried copying the .pdb file to multiple locations on the target
device and locally, but am running in to a roadblock.

Does anyone have any idea what I might be missing here? I need to debug in
to the .dll but it won't let me in source mode.

Thanks,
J144




Posted by dbgrick on December 19, 2007, 10:49 am
Please log in for more thread options
You can debug into the dll by selecting the Debug->Attach to Process menu
option. Then select Smart Device as your Transport. Next select the device
in the qualifier. You should then get a list of Processes. You may need to
select the Show processes from all users check box. Then select the
application that is using the dll and click Attach. This will attach to the
process and allow you to debug into your dll. NOTE: you have to compile
your dll in debug mode. I hope this helps.

Regards,
Rick D.
Contractor

"J144" wrote:

> Hi - I tried searching through the newsgroups for an answer to this but have
> been unable to locate a similar problem. Seems like it could be a fairly
> common mistake on my part, but the searches come up empty.
>
> Anyway...
>
> I have an app that calls in to a .dll. I build both the app and the .dll
> with debug information turned on, and I have both the .exe and the .dll in
> the same folder on the target device. Using the debugger (VS 2005
> Professional) I am able to step through the code of the app, but am unable
> to step into the .dll code. All source code is in plain old native c, no
> c++ or c# code at all.
>
> If I open a source file from the .dll while the app is running in the
> debugger, and try to set a breakpoint in that file, VS immediately switches
> to the Disassembly window and sets a breakpoint, but there are no symbols
> listed anywhere nearby.
>
> I have tried copying the .pdb file to multiple locations on the target
> device and locally, but am running in to a roadblock.
>
> Does anyone have any idea what I might be missing here? I need to debug in
> to the .dll but it won't let me in source mode.
>
> Thanks,
> J144
>
>
>
>

Posted by J144 on December 19, 2007, 1:33 pm
Please log in for more thread options
I build both the app and the .dll with debug information turned on. I am
able to step through the code of the app, but am unable to step into the
.dll code. I am already attached to the process. The .dll is not in use by
any other process.

Any other ideas?

>> to step into the .dll code.
> You can debug into the dll by selecting the Debug->Attach to Process menu
> option. Then select Smart Device as your Transport. Next select the
> device
> in the qualifier. You should then get a list of Processes. You may need
> to
> select the Show processes from all users check box. Then select the
> application that is using the dll and click Attach. This will attach to
> the
> process and allow you to debug into your dll. NOTE: you have to compile
> your dll in debug mode. I hope this helps.
>
> Regards,
> Rick D.
> Contractor
>
> "J144" wrote:
>
>> Hi - I tried searching through the newsgroups for an answer to this but
>> have
>> been unable to locate a similar problem. Seems like it could be a fairly
>> common mistake on my part, but the searches come up empty.
>>
>> Anyway...
>>
>> I have an app that calls in to a .dll. I build both the app and the .dll
>> with debug information turned on, and I have both the .exe and the .dll
>> in
>> the same folder on the target device. Using the debugger (VS 2005
>> Professional) I am able to step through the code of the app, but am
>> unable
>> to step into the .dll code. All source code is in plain old native c, no
>> c++ or c# code at all.
>>
>> If I open a source file from the .dll while the app is running in the
>> debugger, and try to set a breakpoint in that file, VS immediately
>> switches
>> to the Disassembly window and sets a breakpoint, but there are no symbols
>> listed anywhere nearby.
>>
>> I have tried copying the .pdb file to multiple locations on the target
>> device and locally, but am running in to a roadblock.
>>
>> Does anyone have any idea what I might be missing here? I need to debug
>> in
>> to the .dll but it won't let me in source mode.
>>
>> Thanks,
>> J144
>>
>>
>>
>>
>




Posted by dbgrick on December 19, 2007, 10:45 pm
Please log in for more thread options
Is your dll a managed dll or unmanaged. For unmanaged you may need to start
the app and then attach to the process. I've written pocket outlook rule
dll's, service dlls and others and am able to debug into these dll's using
the procedure below. For managed dll's the debugger will directly link into
the dll.

Regards,
Rick D.
Contractor

"J144" wrote:

> I build both the app and the .dll with debug information turned on. I am
> able to step through the code of the app, but am unable to step into the
> ..dll code. I am already attached to the process. The .dll is not in use by
> any other process.
>
> Any other ideas?
>
> >> to step into the .dll code.
> > You can debug into the dll by selecting the Debug->Attach to Process menu
> > option. Then select Smart Device as your Transport. Next select the
> > device
> > in the qualifier. You should then get a list of Processes. You may need
> > to
> > select the Show processes from all users check box. Then select the
> > application that is using the dll and click Attach. This will attach to
> > the
> > process and allow you to debug into your dll. NOTE: you have to compile
> > your dll in debug mode. I hope this helps.
> >
> > Regards,
> > Rick D.
> > Contractor
> >
> > "J144" wrote:
> >
> >> Hi - I tried searching through the newsgroups for an answer to this but
> >> have
> >> been unable to locate a similar problem. Seems like it could be a fairly
> >> common mistake on my part, but the searches come up empty.
> >>
> >> Anyway...
> >>
> >> I have an app that calls in to a .dll. I build both the app and the .dll
> >> with debug information turned on, and I have both the .exe and the .dll
> >> in
> >> the same folder on the target device. Using the debugger (VS 2005
> >> Professional) I am able to step through the code of the app, but am
> >> unable
> >> to step into the .dll code. All source code is in plain old native c, no
> >> c++ or c# code at all.
> >>
> >> If I open a source file from the .dll while the app is running in the
> >> debugger, and try to set a breakpoint in that file, VS immediately
> >> switches
> >> to the Disassembly window and sets a breakpoint, but there are no symbols
> >> listed anywhere nearby.
> >>
> >> I have tried copying the .pdb file to multiple locations on the target
> >> device and locally, but am running in to a roadblock.
> >>
> >> Does anyone have any idea what I might be missing here? I need to debug
> >> in
> >> to the .dll but it won't let me in source mode.
> >>
> >> Thanks,
> >> J144
> >>
> >>
> >>
> >>
> >
>
>
>
>

Similar ThreadsPosted
Application Debugging September 5, 2005, 3:08 am
Debugging / Run / F5 / Deploy August 27, 2007, 1:04 pm
tools for debugging October 31, 2008, 2:06 am
about debugging PhoneIme project August 8, 2005, 10:09 pm
mixed mode debugging February 17, 2006, 5:49 pm
General debugging question April 2, 2007, 8:34 pm
Debugging Breakpoint failure, help! September 19, 2007, 7:26 am
Debugging eVC 4.0 compiled code with VS 5.0 debugger? October 18, 2005, 4:16 pm
Debugging camera code in emulator in WM5.0? November 5, 2005, 10:26 am
How to debugging TCP/IP based program in emulator? January 4, 2006, 4:43 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap