Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

using windbg to debug a dll?

1,106 views
Skip to first unread message

alan sinclair

unread,
Apr 15, 2002, 1:59:50 PM4/15/02
to
Hi ... please can anyone advise me how to begin ... i'm reading the docs but can't find the info (so
far?)

I need to debug a dll which will be lunched by Windows Installer ... that is, I can't start the
program under Windbg (Windows Installer runs as a sevice). The dll is written in C++ in Visual
Studio ... I've done some preliminary debugging in VS (using Rundll32 to start the dll) but now need
to move to the target machine, which has special hardware. The Dll runs in user space, not kernel
mode, so I'm hoping to use a single machine.

How do I set things up so the dll will break into Windbg on entry?

tia
alan

Timur Safin

unread,
Apr 15, 2002, 4:27:38 PM4/15/02
to
Hi Alan,

AFAIK msiexec.exe process stay running once you would start any .MSI package at the session. Hence I
would connect to msiexec.exe with the windbg, set the persistent breakpoints via 'bu
yourdll!yourfunction', and then I would start the MSI package being debugged in the Explorer.
Hopefully it would work.

--
Happy coding,
Timur Safin
Support Programmer
InterSystems Russia

"alan sinclair" <al...@nospam.deterministicnetworks.com> сообщил/сообщила в новостях следующее:
news:Ogu6ecK5BHA.2272@tkmsftngp05...
: Hi ... please can anyone advise me how to begin ... i'm reading the docs but can't find the info

:
:
:


alan sinclair

unread,
Apr 15, 2002, 7:16:28 PM4/15/02
to
Timur ... thanks, running msiexec under WinDbg does start the install
of the MSI, and the dll runs correctly ... but it doesn't break or step.

List breakpoints shows:
0:002> bl
0 eu 0001 (0001) (infca!DN_Install_INF)

(my entry point is DN_Install_INF)

Windbg lists the DLLs which are opened when running
msiexec /i bpd.msi
as:
SFC.DLL / VERSION.DLL / LZ32.DLL and CABINET.dll
these look like ones used in unpacking an install package
... but they don't include my Infca.dll

"Symbol file path" points to the Infca.pdb file

The dll was compiled by VisStudio6 with normal debug switches
-- it loads & steps in debug under Visual Studio with Rundll32.exe,
but for various reasons i can't run VS on the test machine, hence
trying windbg. Do I need something extra for Windbg to recognise
it, or is the dll and the pdb enough?

This is using WinDbg 4.0.0018.0 (Ver 5.0 build 2195 sp 2) just downloaded
from M$, and running on W2000. I've also tried older "windbg v 5.00.2195.11"
from the DDK but it doesn't break either.

thanks again
alan

"Timur Safin" <timurDOGintersystemsPERIODru> wrote in message news:eyxS#vL5BHA.568@tkmsftngp05...

Andre Vachon [MS]

unread,
Apr 16, 2002, 3:17:43 AM4/16/02
to
This means your breakpoint remained "uninstantiated". Either the DLL did
not get loaded at all, or the symbol name you passed is wrong.

-Andre
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ╘ 2001 Microsoft Corporation. All rights
reserved.

"alan sinclair" <al...@nospam.deterministicnetworks.com> wrote in message
news:uEyaaNN5BHA.1660@tkmsftngp05...

alan sinclair

unread,
Apr 17, 2002, 2:20:25 PM4/17/02
to
the dll definitely was loaded (it displayed a message box) so i guess must be something wrong with
the symbols ...
how can i check that the sybmols are ok (i'm a novice at this)

thanks
alan


"Andre Vachon [MS]" <and...@online.microsoft.com> wrote in message
news:uiQoleR5BHA.2196@tkmsftngp07...

alan sinclair

unread,
Apr 17, 2002, 4:41:00 PM4/17/02
to
giving up on windbg and switching over to softice for simplicity ...

"alan sinclair" <al...@nospam.deterministicnetworks.com> wrote in message

news:u7x3Kxj5BHA.392@tkmsftngp05...

0 new messages