[comp.sys.amiga.tech] Debugging libraries with SDB.

shf@well.UUCP (Stuart H. Ferguson) (03/14/89)

Since I asked this question a few months ago and got no response, I assume
that people don't know.  It turns out that you *can* debug libraries with
SDB.  SDB can maintain two sets of symbol and source code information, and
if a ".dbg" file is created for the library, SDB can trace library calls
in source mode.

It's great.  My libraries used to have to open a console window to dump
debugging information, but now I can take all that stuff out.
-- 
		Stuart Ferguson		(shf@well.UUCP)
		Action by HAVOC

ralph@atrp.media.mit.edu (Ralph L. Vinciguerra) (03/16/89)

In article <10964@well.UUCP> shf@well.UUCP (Stuart H. Ferguson) writes:
>Since I asked this question a few months ago and got no response, I assume
>that people don't know.  It turns out that you *can* debug libraries with
>SDB.  SDB can maintain two sets of symbol and source code information, and
>if a ".dbg" file is created for the library, SDB can trace library calls
>in source mode.

Cana similar thing be done so that I can use SDB on workbench compatible
programs ? The old db had no problems, but SDB seems to insist on a
CLI startup. Ideas anyone (besides writing a front end to the program
which turns the CLI startup into a WB startup) ?

papa@pollux.usc.edu (Marco Papa) (03/16/89)

In article <3640@mit-amt> ralph@atrp.media.mit.edu (Ralph L. Vinciguerra) writes:
>In article <10964@well.UUCP> shf@well.UUCP (Stuart H. Ferguson) writes:
>>Since I asked this question a few months ago and got no response, I assume
>>that people don't know.  It turns out that you *can* debug libraries with
>>SDB.  SDB can maintain two sets of symbol and source code information, and
>>if a ".dbg" file is created for the library, SDB can trace library calls
>>in source mode.

Stuart, have you done it yourself?  I have tried with a "device" and
got nowhere. sdb always says that it cannot find the device, when I know
that mydev.dbg file is in the current dir and the device is loaded (after
the OpenDevice). Has anybody been able to do this REALLY?

>Can a similar thing be done so that I can use SDB on workbench compatible
>programs ? The old db had no problems, but SDB seems to insist on a
>CLI startup. Ideas anyone (besides writing a front end to the program
>which turns the CLI startup into a WB startup) ?

Out of luck.  SDB does not handle workbench programs.

-- Marco Papa 'Doc'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

w-colinp@microsoft.UUCP (Colin Plumb) (03/18/89)

What I want is a way to debug *devices*.  Is there a way to get SDB
to debug a Dos handler?  I couldn't figure one out.
-- 
	-Colin (uunet!microsoft!w-colinp)

"Don't listen to me.  I never do." - The Doctor

shf@well.UUCP (Stuart H. Ferguson) (03/22/89)

+-- papa@pollux.usc.edu (Marco Papa) writes:
| >In article <10964@well.UUCP> shf@well.UUCP (Stuart H. Ferguson) writes:
| >> [...] It turns out that you *can* debug libraries with
| >>SDB.  SDB can maintain two sets of symbol and source code information, and
| >>if a ".dbg" file is created for the library, SDB can trace library calls
| >>in source mode.
| Stuart, have you done it yourself?  I have tried with a "device" and
| got nowhere. sdb always says that it cannot find the device, when I know
| that mydev.dbg file is in the current dir and the device is loaded (after
| the OpenDevice). Has anybody been able to do this REALLY?
 
Yes, I did it.  I had to try several permutations to get it to work, but
the one that did was having the "iffparse.library" loaded in memory, having
the "iffparse.dbg" file on the current directory and having the sources
located in a subdirectory of the current directory.  I used the -sPATH
option on SDB to make the source subdirectory available, and did 
"ll iffparse" in SDB.  Other combinations of names didn't work.

Once the .dbg was loaded, SDB would switch back and forth between symbol
tables with "ax".  Worked well.  I haven't tried it with a device
driver, so I can't say how that works.
-- 
		Stuart Ferguson		(shf@well.UUCP)
		Action by HAVOC