🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #10010

gdb interrupt problems

#10010
From: Dana Swift
Date: Mon, 08 Oct 1990 21:06
91 lines
4153 bytes
hi

Richard Stallman suggested I report the following problem...it's rather
vague but I'd be happy to provide further info if you want it.  The problem
as I presented it to Dr. Stallman is included below as is his response. 
Please let me know if you need more clarification, etc.

============================= description =================================

I am using gdb (version 3.5) on a Sun Sparc 1+ (with SunOs 4.1) as well as
gnu emacs (version 18.55).  The problem I have encountered relates to gdb's
handling of SIGINT.  Below I have included the status of the relevant stty
paramters as reported via the command "stty all":

********************

pygmy[/home/dswift]> stty all
speed 38400 baud, 24 rows, 80 columns; evenp
-inpck imaxbel
iexten crt
erase  kill   werase rprnt  flush  lnext  susp   intr   quit   stop   eof
^?     ^U     ^W     ^R     ^O     ^V     ^Z/^Y  ^C     ^\     ^S/^Q  ^D

********************

Note that the interrupt character is mapped to ^C.  Unfortunately, gdb
does not cause the program being debugged to stop running when I type 
control-C from the keyboard (note: gdb was launched from the unix cshell...
not from within emacs).  Moreover, the character ^Z causes gdb to be suspended
but not its daughter process.  When I use the gdb-mode within emacs, the
character sequence ^C^C should interrupt the program being debugged but has
no effect.  The sequence ^C^Z causes gdb to be killed.

To add to the confusion, I have gdb (version 3.2) and emacs (version 18.55)
running on a Sun 360 (SunOs 3.5) and the status of stty is given below:

********************

right[/usr/swift]> stty all
new tty, speed 38400 baud, 0 rows, 0 columns; tabs
crt
decctlq
erase  kill   werase rprnt  flush  lnext  susp   intr   quit   stop   eof
^?     ^U     ^W     ^R     ^O     ^V     ^Z/^Y  ^C     ^\     ^S/^Q  ^D

********************

On this machine, gdb handles interrupts and suspends as I would expect.  The
program being debugged is stopped and gdb's command line prompts for further
commands.  

Incidentally, I used the gdb command "info signal" to make sure that the
table entries for SIGINT were correct (as shown below):

Number  Stop    Print   Pass to program Description

0       Yes     Yes     Yes             Signal 0
1       Yes     Yes     Yes             Hangup
2       Yes     Yes     No              Interrupt
3       Yes     Yes     Yes             Quit
4       Yes     Yes     Yes             Illegal instruction

Perhaps you can suggest steps I can take to enable gdb to trap and 
respond correctly to interrupt signals.  I would be happy to have you
contact me if you need further information.

==========================R. Stallman's response =========================

Emacs usually turns off interrupts.  So you can't use
any keyboard character to stop it.  However, if you
run it under X, then it doesn't really do anything to
its controlling terminal, and you can use the usual
interrupt characters.  If that doesn't work for you,
perhaps something strange has changed in Sunos 4.1.
I suggest you report it to bug-gdb@prep.ai.mit.edu.

==========================================================================

Additional notes: 

On both machines (Sun 360 & Sparc 1+), gdb was launched either from within
a Suntools (Sunview) shelltool or from within emacs (using gdb-mode).


Thank you!

Dana Swift
School of Oceanography
University of Washington
(206) 543-6697
e-mail: swift@right.ocean.washington.edu
Technical Details
Message-ID: <9010082106.AA16679@right.ocean.washington.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!OCEAN.WASHINGTON.EDU!swift

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,2b1b2ba5d4393bf9,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1990-10-08 16:46:19 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!OCEAN.WASHINGTON.EDU!swift
From: swift@OCEAN.WASHINGTON.EDU (Dana Swift)
Newsgroups: gnu.gdb.bug
Subject: gdb interrupt problems
Message-ID: <9010082106.AA16679@right.ocean.washington.edu>
Date: 8 Oct 90 21:06:53 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 91
Posted: Mon Oct  8 22:06:53 1990