[patch] Fix a core dump when stdin closes

Michael Elizabeth Chastain mec.gnu@mindspring.com
Mon Feb 16 18:52:00 GMT 2004


I've got crashes like that too.  Here's a sample stack trace:

#0  0x420d27cb in tcsetattr () from /lib/i686/libc.so.6
#1  0x0808a3b0 in set_tty_state (scb=0x0, state=0x0)
    at /berman/fsf/_today_/source/gdb/HEAD/src/gdb/ser-unix.c:150
#2  0x08159ed9 in serial_set_tty_state (scb=0x0, ttystate=0x0)
    at /berman/fsf/_today_/source/gdb/HEAD/src/gdb/serial.c:446
#3  0x08083214 in terminal_inferior ()
    at /berman/fsf/_today_/source/gdb/HEAD/src/gdb/inflow.c:242
#4  0x080f334a in handle_inferior_event (ecs=0x0)
    at /berman/fsf/_today_/source/gdb/HEAD/src/gdb/infrun.c:2327
#5  0x080f203f in wait_for_inferior ()
    at /berman/fsf/_today_/source/gdb/HEAD/src/gdb/infrun.c:1034

And inferior_ttystate is 0x0.

Michael C

===

2004-02-16  Daniel Jacobowitz  <drow@mvista.com>

	* inflow.c (terminal_inferior): Don't give up the terminal if we
	previously couldn't get the inferior's terminal state.



More information about the Gdb-patches mailing list