Help needed when using DBX and MAGIC

Help needed when using DBX and MAGIC

Post by dc.. » Tue, 02 Oct 1990 10:14:00



We need some help on our Sun's (SunOS 3.4) when debugging the 1986
Berkeley version of MAGIC (a VLSI layout tool).

In particular, when we use dbx to debug some local modifications
to MAGIC, we get the error

        Stopped (tty output)

we get the prompt, then type
        reset   (because echo is turned off)
        fg      (because the job is in the background)
and then we get the error
        signal IO (possible input/output) in ioctl at 0xee85c
        ioctl+6:                bcss    isatty+0x3c
        (dbx)

When we try it without the de*, the program runs properly.
The normal behavior is to create a new window on the monitor,
with a prompt in the original window.

This looks like a problem with stdout, fork, and dbx.
Can anyone give us a clue as to why this is occuring and how to debug
MAGIC without adding a lot of printf statements?

Thanks in advance.

John Pedicone

        uunet!steinmetz!mozart!pedicone

 
 
 

Help needed when using DBX and MAGIC

Post by Joe Prue » Tue, 02 Oct 1990 19:35:00


This may be way off base, but the info could be useful anyway.
(I've only seen this behaviour on Sun OS 3.4 under suntools)

If your tty structures (as reported by stty -everything)
have tostop set and tabs unset (i.e. -tabs) then you will
experience things like you describe whenever you invoke
cmdtool or dbxtool.  This bug is related to text sub windows
(ones with scroll bars and the edit menu).  Other tools
(such as MAGIC) may trigger the same bug.

Look at the output of stty and see if that might be the
problem.  Good luck.

        -joey

 
 
 

Help needed when using DBX and MAGIC

Post by George » Tue, 02 Oct 1990 02:44:00


     I would guess that the reason for this lies somewhere along the lines
that Magic tries to do I/O in cbreak mode. Dbx on the other hand wants to use
the normal buffered I/O mode. So of course, a conflict occurs, and dbx gives
up. Playing with the tty status (via reset) only confuses the issue more.

     I would suggest you try using the GNU de*, gdb. While I have never
used this de*, I've heard many claims from devout users, including the
claim that it handles programs that use raw and cbreak mode programs. It also
reputedly handles large programs better.

     And now for my own question. Someone has recently asked me about a black
and white version of Magic. Now I know Magic has a Sun b/w driver, but this
guy's only got b/w IBM RTs. So has anyone does this job, or part of it? Thanks
in advance.

                                                        George

 
 
 

Help needed when using DBX and MAGIC

Post by George » Tue, 02 Oct 1990 02:51:00


     Oops, I forgot to mention that he does have X running on the RTs. So if
you've got Magic running under b/w X, let me know. Thanks again.

                                                George

 
 
 

Help needed when using DBX and MAGIC

Post by Craig D. Per » Tue, 02 Oct 1990 13:45:00



>     I would guess that the reason for this lies somewhere along the lines
>that Magic tries to do I/O in cbreak mode. Dbx on the other hand wants to use
>the normal buffered I/O mode. So of course, a conflict occurs, and dbx gives
>up. Playing with the tty status (via reset) only confuses the issue more.

   I have never had trouble with dbx and cbreak mode... dbx runs my
program normally when I am debugging. The only reason why I could see
I/O problems with dbx is if MAGIC is doing non standard reads and
writes in cbreak mode (i.e. playing directly with screen attributes
and terminal settings).

DISCLAIMER: I'm myself and no one else... This is MY opinion!!!
-----------> Please direct flames to me and not the net...

 
 
 

Help needed when using DBX and MAGIC

Post by Bob Ma » Tue, 02 Oct 1990 15:33:00


Magic does async IO, so that the background DRC can be interrupted.  This
gives rise to the DBX problem mentioned.  You can instruct some versions
of DBX to ignore certain signals.  There is also an undocumented flag in
Magic ("-D") that causes it to behave a bit differently for debugging
purposes.  Either of these will, I think, allow Magic to run under DBX.

--Bob Mayo
ucbvax!mayo

 
 
 

Help needed when using DBX and MAGIC

Post by Guy Harr » Tue, 02 Oct 1990 18:07:00


Quote:>      I would guess that the reason for this lies somewhere along the lines
> that Magic tries to do I/O in cbreak mode. Dbx on the other hand wants to use
> the normal buffered I/O mode. So of course, a conflict occurs, and dbx gives
> up.

Nope.  "dbx", at least on Suns (and I suspect on most, if not all, other
machines), has no problem with programs using "cbreak" mode; it will restore
the tty modes before prompting for input, if necessary.  (It doesn't quite
handle *output* modes as smoothly - it resets them *after* it's printed a bunch
of stuff.)

The problem, as was mentioned elsewhere, is that processes being traced with
"ptrace" stop when they receive *any* signal.  "dbx" can be told that if the
process stops with any of a particular set of signals, it should immediately
continue the process; SIGIO is not in the default set of "continue immediately"
signals, but can be added to that set with "ignore IO".
        Guy Harris
        {ihnp4, decvax, seismo, decwrl, ...}!sun!guy

 
 
 

1. need help using install Redhat 6,1/Partition Magic

There will be no problem if you manage to defragment the disk and to
make partitions with Partition Magic. 2 cautions:

1. If you want to use LILO to boot Linux, you have to put boot partition
(/boot if separated or /) within 1024 cylinders.
2. If you choose "Workstation" or "Server" installation option, don't
use "automatic partitioning" in RH 6.1 setup since it will destroy
Windows partition data. Use "manual partitioning" and choose format
options depending on your need.

Cheers.

2. NIS+ API question/request

3. dbx - bad magic number - FATAL ERROR

4. Sun and Symantec to introduce a dedicated security appliance.

5. Need help with runargs command in dbx under Solaris 2.4

6. Problems with Lock Screen in KDE2.0

7. dbx problem need help

8. Xenix

9. Need help with INN/dbx

10. dbx help needed

11. Need help with adb/dbx (simple)

12. dbx problem need help( on sol 8 )

13. Matrox Mystique ands X.