sdb poser solved -- 5.0 sdb users read this

R. Curtis Jackson rcj at burl.UUCP
Fri May 18 23:45:58 AEST 1984


Many thanks to John Haller (ihldt!jhh) for telling me the solution to
this one; here was the problem:  on a Vax-11/780 running Release (USG)
5.0, I suddenly could not set any breakpoints in a program I was
developing.  The problem lies in the fact that the -n (shared text)
option of the loader write-protects the part of the program that sdb
needs to write into to set breakpoints.  To avoid a rash of denials,
I must note here that this does not always happen; it apparently depends
on where the program is loaded or some other variable.

The reason for the write-protect is a possibility that someone who
*really* knew what they were doing might cause a security problem by
being able to write into the text segment of a system program loaded
with the -n option.  The way to get around the problem is to use the
'-Wl,-N' option of cc, or the '-N' option of f77; these tell the compiler
 to pass the argument '-N' (no shared text) to the loader (l) pass of the
compiler.  Works like a charm.

So, if you can't set breakpoints in your program, try this option and
see if it fixes it.  Also, (I don't know if this has come up on the
net yet) if you are using sdb with f77 programs and are having problems,
do NOT compile your labeled commons with -g, it screws things up.  This
one courtesy of Rich Whitelaw (burl!rlw), who discovered this while
trying to debug a microsimulator he is developing here.
-- 

He gave the novice a long, icy stare and quietly growled, "RTFM".

The MAD Programmer -- 919-228-3313 (Cornet 291)
alias: Curtis Jackson	...![ ihnp4 ulysses cbosgd we13 ]!burl!rcj
			...![ ihnp4 cbosgd akgua masscomp ]!clyde!rcj



More information about the Comp.unix.wizards mailing list