1828039 Members
1830 Online
109973 Solutions
New Discussion

Debugging??

 
Manesh Sasankan
Advisor

Debugging??

Hi All,

i have a C program(which is compiled & linked with /debug) which is linked via a shareable image. Now I'm able to debug this C program & successfully exit from the debugger. But this C program in turn calls the routines defined thru the shareable image. And that routine is returning a different value & i need to find that.

example:

code = shareable_routine(x1,x2,x3);

The problem here is I'm not able to STEP/INTO that particular routine( Actually i don't lnow how to do that).Even though i have the complete source code of the shareable image, i dont know how to set up that.

Please help me out!!!

Thanks,
/Manesh

2 REPLIES 2
Bojan Nemec
Honored Contributor

Re: Debugging??

Manesh,

If you have the complete source code of the shareable image, compile and link this image with /debug. After that you can debug also the shareable part.
If you define a logical name pointing to the shareable image linked with the debugger it can stay in a different directory or/and have a different name.

To set a breakpoint or examine symbols from the shareable image use:
DBG> SET IMAGE shareable_image

Bojan
Robert Gezelter
Honored Contributor

Re: Debugging??

Manesh,

In addition to Bpjan's direct comment, I will add that time spent with the Debugger manual will pay extremely large dividends.

The OpenVMS Debugger is a very powerful utility. In addition to SET IMAGE, there are other commands that would also be useful in debugging a problem with a shareable image (since this often involves repeated debugging sessions, I also recommend the use of a initialization file referenced using the DBG$INIT logical name).

Using the full power of the debugger can save many hours of laborious work, and is well worth the effort.

- Bob Gezelter, http://www.rlgsc.com