Hi,
Faina, you are trying to gdb your provider right. So stop the provider
agent using forceProviderProcesses=false (as far as I know, the agent
loads the provider shared object in a separate thread), and then put a
break point in your provider code (preferably in the initialize
routines) Filename:line number. It will say that "symbol not yet loaded,
want to load in future", type "yes". Then fire your call, anything - ei,
ni, gi, a etc on the classes serviced by your provider 'so', you will
hit the break point.
As Sampige said, if your provider is indication or slp enabled then no
need to fire an explicit call, CIMOM will automatically load your
provider at startup.
But from my experiences, debugging provider code with gdb can be
painful, as a single interface call to a top level class will fork
numerous parallel threads, that is where it becomes really difficult to
keep track of the control. You can build your provider in Visual Studio
C++ and use its debugger (for this use widows version of pegasus), its
really cool and easy to use as compared to gdb.
Regards,
Biswapratap,
Wipro Technologies.
________________________________
From: Sampige, Sahana Prabhakar (STSD) [mailto:[email protected]]
Sent: Wednesday, February 10, 2010 11:32 AM
To: Prager, Faina; [email protected]
Subject: RE: Attaching debugger to Pegasus processes
Hi Faina,
If you trying to debug one of the shared libraries that your provider
loads, then just add a breakpoint in your shared library and make a
request to your provider like getInstance or enumerateInstance. The
provider libraries dont get loaded until a request is made except for
indication provider which get loaded on cimserver bringup. I am not sure
why you would want to add a breakpoint in ProviderModule::load which
only calls dlload to load a library. This is not the right place to add
a breakpoint if you want to debug the shared library which you provider
uses.
Rgds,
Sahana
________________________________
From: Prager, Faina [mailto:[email protected]]
Sent: Wednesday, February 10, 2010 2:19 AM
To: Sampige, Sahana Prabhakar (STSD); [email protected]
Subject: RE: Attaching debugger to Pegasus processes
Thank you, I am trying to see where my library is loaded.
According to OpenPegasus documentation, I should break at
ProviderModule::load, and my providers will be loaded there. But it
never stops there. ANy ideas where is the actual place where the
library is loaded?
Faina
________________________________
From: Sampige, Sahana Prabhakar (STSD) [mailto:[email protected]]
Sent: Monday, February 08, 2010 9:30 PM
To: Prager, Faina; [email protected]
Subject: RE: Attaching debugger to Pegasus processes
Hi Faina,
Like Biswapratap mentioned start cimserver with
forceProviderProcesses=false. This way the provider will run in the
cimserver process and you can debug your provider and any shared library
that your provider loads. I also saw an email from you/your team
regarding the trace file rotation. Looks like you are trying to debug
some failure. You could try running cimserver with
traceFacility="Memory". This will collect the trace messages in a
wrap-around memory buffer. If this memory is part of a dump the trace
message can be found by the eye-catcher "PEGASUSMEMTRACE" at the top of
the memory buffer. For further details regarding this option reger to
http://cvs.opengroup.org/cgi-bin/viewcvs.cgi/*checkout*/pegasus/doc/Buil
dAndReleaseOptions.html?rev=HEAD&content-type=text/html
Rgds,
Sahana
________________________________
From: Prager, Faina [mailto:[email protected]]
Sent: Tuesday, February 09, 2010 10:38 AM
To: Sampige, Sahana Prabhakar (STSD); [email protected]
Subject: RE: Attaching debugger to Pegasus processes
Thank you, Sahana,
The question, actually, is how would you debug your own providers. I am
trying to put a breakpoint on the place where providers shared library
supposedly are loaded, but the debugger does not stop there.
Any idea where the should I try to break?
Thank you,
Faina
-----Original Message-----
From: Sampige, Sahana Prabhakar (STSD) [mailto:[email protected]]
Sent: Mon 2/8/2010 8:22 PM
To: Potakamuri, Sreenivasa; [email protected]
Subject: RE: Attaching debugger to Pegasus processes
Hi Sreeni,
You can attach to a debugger just like it is done for any other process.
This is how I do it :
1. you start the cimserver
2. ps -ef | grep cimservermain
3. gdb --pid=<cimservermainpid>
4. b <Where ever you want to debug>
5. type c on the gdb prompt.
6. Run your test program and ddebug cimserver.
Rgds,
Sahana
________________________________
From: Potakamuri, Sreenivasa [mailto:[email protected]]
Sent: Tuesday, February 09, 2010 3:26 AM
To: [email protected]
Subject: Attaching debugger to Pegasus processes
Hi,
Is there any documentation on how to attach a debugger to Pegasus
processes.
Thanks,
Sreeni
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.