Board index » cppbuilder » debugging system dll

debugging system dll

Hello!

Would like to debug a system dll loaded by a system service.  This
system_dll has been converted from MSVC to BCB4.  The problem is the BCB4
de{*word*81}.  It will not attach to a running system process (snmp.exe),
returning "unable to create process".

Previously, the system_dll was debugged by running MSVC under the system
account.  This was done by scheduling MSVC to run using the 'at' command.
This cannot be done in BCB4.

Any direction would be appreciated.
TIA UKO.

 

Re:debugging system dll


Quote
: "UTan" <u...@erols.com> wrote:
>Would like to debug a system dll loaded by a system service.  This
>system_dll has been converted from MSVC to BCB4.  The problem is the BCB4
>de{*word*81}.  It will not attach to a running system process (snmp.exe),
>returning "unable to create process".

In the Win32Sdk.hlp. go to

  Service Installation, Removal, and Enumeration

in the Index. Browse forward. Find "Debugging a Service".

--
Stefan Hoffmeister (TeamB)     http://www.econos.de/
Please do apply judgement when sending email.

Re:debugging system dll


Thanks Stefan, but all I found was the procedure to attach to a running
process ... that's the problem.  It's not that simple ...

The snmp service must run under the system account.  Impersonation is not
possible.  Modifications to the service code is also not possible as no
souce code is available.

With this snmp service running under the system account, the BCB4 IDE will
not allow me to attach to the process (thru the run | attach to process"
option.)   It returns that "unable to create process error".  What is
puzzling is that the de{*word*81} will show the process pid on its dialog box,
it just doesn't correctly attach.  (actually it doesn't have the right
permissions, and I can't see anyway of providing the de{*word*81} with the
correct permissions).

Note also that BCB4 will not allow me to attach to any process if it is
running under the system account.  The option to attach to a process simply
isn't on the menu.

I'm sure it's something simple being overlooked.  How can BCB4 be used to
develop system processes, if it can't debug a system loaded dll ???

Stefan Hoffmeister (TeamB) <Stefan.Hoffmeis...@Econos.de> wrote in message
news:5M7nN6PTxNAnC1UpAkvAQJjulUlr@4ax.com...

Quote
> : "UTan" <u...@erols.com> wrote:

> >Would like to debug a system dll loaded by a system service.  This
> >system_dll has been converted from MSVC to BCB4.  The problem is the BCB4
> >de{*word*81}.  It will not attach to a running system process (snmp.exe),
> >returning "unable to create process".

> In the Win32Sdk.hlp. go to

>   Service Installation, Removal, and Enumeration

> in the Index. Browse forward. Find "Debugging a Service".

> --
> Stefan Hoffmeister (TeamB)     http://www.econos.de/
> Please do apply judgement when sending email.

Re:debugging system dll


You need to use the remote de{*word*81} ( available in the Enterprise SKU; I
know it should be in the Pro and I let Borland know about this ). The
remote de{*word*81} can be started as a service, so you could attach to
services. I used this technique to debug spooler-related code.

Alex

Quote
UTan wrote:

[snip]

Other Threads