From 7a67dd45ca1c191a0220697a3ec9fa92993caf8c Mon Sep 17 00:00:00 2001 From: "gdb-3.5" Date: Thu, 8 Feb 1990 06:14:00 +0000 Subject: gdb-3.5 --- gdb/default-dep.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gdb/default-dep.c') diff --git a/gdb/default-dep.c b/gdb/default-dep.c index b38c205..a20d567 100644 --- a/gdb/default-dep.c +++ b/gdb/default-dep.c @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with GDB; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include "defs.h" #include "param.h" #include "frame.h" @@ -26,7 +27,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #endif -#include #include #include #include @@ -525,10 +525,12 @@ exec_file_command (filename, from_tty) if (read_aout_hdr (execchan, &exec_aouthdr, aout_hdrsize) < 0) error ("\"%s\": can't read optional aouthdr", execfile); - if (read_section_hdr (execchan, _TEXT, &text_hdr, num_sections) < 0) + if (read_section_hdr (execchan, _TEXT, &text_hdr, num_sections, + aout_hdrsize) < 0) error ("\"%s\": can't read text section header", execfile); - if (read_section_hdr (execchan, _DATA, &data_hdr, num_sections) < 0) + if (read_section_hdr (execchan, _DATA, &data_hdr, num_sections, + aout_hdrsize) < 0) error ("\"%s\": can't read data section header", execfile); text_start = exec_aouthdr.text_start; @@ -565,7 +567,8 @@ exec_file_command (filename, from_tty) data_start = exec_data_start; data_end += exec_data_start; - fstat (execchan, &st_exec); + if (fstat (execchan, &st_exec) < 0) + perror_with_name (filename); exec_mtime = st_exec.st_mtime; } #endif /* not COFF_FORMAT */ -- cgit v1.1