diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1996-02-03 11:32:34 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1996-02-03 11:32:34 +0000 |
commit | 255181a9ed97f7f2d8a283bc48e5b3f9f324beb8 (patch) | |
tree | b1be7f543a0a4d4d2718423ca80bb5b3798f87ef | |
parent | c2b6884b9717eb48570f4e602b09f70ce9744aa4 (diff) | |
download | gdb-255181a9ed97f7f2d8a283bc48e5b3f9f324beb8.zip gdb-255181a9ed97f7f2d8a283bc48e5b3f9f324beb8.tar.gz gdb-255181a9ed97f7f2d8a283bc48e5b3f9f324beb8.tar.bz2 |
* dwarfread.c (read_func_scope): Avoid GDB core dumps if
AT_name tag is missing.
* procfs.c (procfs_stopped_by_watchpoint): Fix logic when
FLTWATCH and FLTKWATCH are defined.
* remote.c (remote_read_bytes): Advance memaddr for transfers,
return number of bytes transferred for partial reads.
* top.c (init_signals): Reset SIGTRAP to SIG_DFL.
-rw-r--r-- | gdb/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/dwarfread.c | 15 | ||||
-rw-r--r-- | gdb/procfs.c | 4 | ||||
-rw-r--r-- | gdb/top.c | 8 |
4 files changed, 37 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c0d3d37..cc0d562 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +Sat Feb 3 03:26:21 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * dwarfread.c (read_func_scope): Avoid GDB core dumps if + AT_name tag is missing. + + * procfs.c (procfs_stopped_by_watchpoint): Fix logic when + FLTWATCH and FLTKWATCH are defined. + + * remote.c (remote_read_bytes): Advance memaddr for transfers, + return number of bytes transferred for partial reads. + + * top.c (init_signals): Reset SIGTRAP to SIG_DFL. + Fri Feb 2 13:40:50 1996 Steve Chamberlain <sac@slash.cygnus.com> * win32-nat.c (mappings): Add ppc registers. diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index fa7c9a2..3d034e1 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -170,6 +170,11 @@ struct complaint not_row_major = "DIE @ 0x%x \"%s\", array not row major; not handled correctly", 0, 0 }; +struct complaint missing_at_name = +{ + "DIE @ 0x%x, AT_name tag missing", 0, 0 +}; + typedef unsigned int DIE_REF; /* Reference to a DIE */ #ifndef GCC_PRODUCER @@ -1807,6 +1812,16 @@ read_func_scope (dip, thisdie, enddie, objfile) { register struct context_stack *new; + /* AT_name is absent if the function is described with an + AT_abstract_origin tag. + Ignore the function description for now to avoid GDB core dumps. + FIXME: Add code to handle AT_abstract_origin tags properly. */ + if (dip -> at_name == NULL) + { + complain (&missing_at_name, DIE_ID); + return; + } + if (objfile -> ei.entry_point >= dip -> at_low_pc && objfile -> ei.entry_point < dip -> at_high_pc) { diff --git a/gdb/procfs.c b/gdb/procfs.c index 55dc5bd..edc062b 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -1,5 +1,5 @@ /* Machine independent support for SVR4 /proc (process file system) for GDB. - Copyright 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. + Copyright 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. Written by Fred Fish at Cygnus Support. This file is part of GDB. @@ -3711,7 +3711,7 @@ procfs_stopped_by_watchpoint(pid) what = pi->prstatus.pr_what; if (why == PR_FAULTED #if defined (FLTWATCH) && defined (FLTKWATCH) - && (what == FLTWATCH) || (what == FLTKWATCH) + && (what == FLTWATCH || what == FLTKWATCH) #else #ifdef FLTWATCH && (what == FLTWATCH) @@ -1,5 +1,5 @@ /* Top level stuff for GDB, the GNU debugger. - Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995 + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. This file is part of GDB. @@ -1840,6 +1840,12 @@ init_signals () { signal (SIGINT, request_quit); + /* If SIGTRAP was set to SIG_IGN, then the SIG_IGN will get passed + to the inferior and breakpoints will be ignored. */ +#ifdef SIGTRAP + signal (SIGTRAP, SIG_DFL); +#endif + /* If we initialize SIGQUIT to SIG_IGN, then the SIG_IGN will get passed to the inferior, which we don't want. It would be possible to do a "signal (SIGQUIT, SIG_DFL)" after we fork, but |