projects
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Makefile.in (c-exp.tab.o): Remove notice about shift/reduce conflicts
[binutils-gdb.git]
/
gdb
/
coredep.c
diff --git
a/gdb/coredep.c
b/gdb/coredep.c
index bb26b081e17c950474981b0ecdd6552878c90c07..ae309800c8fecd70e32f09c410db3f90df06a974 100644
(file)
--- a/
gdb/coredep.c
+++ b/
gdb/coredep.c
@@
-21,20
+21,29
@@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
this file is more machine-specific. */
#include "defs.h"
this file is more machine-specific. */
#include "defs.h"
+#include <sys/types.h>
+#include <sys/param.h>
#include "gdbcore.h"
#include "gdbcore.h"
-#include
<stdio.h>
+#include
"value.h" /* For supply_register. */
/* These are needed on various systems to expand REGISTER_U_ADDR. */
/* These are needed on various systems to expand REGISTER_U_ADDR. */
-#include <sys/types.h>
-#include <sys/param.h>
#ifndef USG
#include <sys/dir.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/user.h>
#ifndef USG
#include <sys/dir.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/user.h>
-#include <sys/ptrace.h>
+#ifndef NO_PTRACE_H
+# ifdef PTRACE_IN_WRONG_PLACE
+# include <ptrace.h>
+# else /* !PTRACE_IN_WRONG_PLACE */
+# include <sys/ptrace.h>
+# endif /* !PTRACE_IN_WRONG_PLACE */
+#endif /* NO_PTRACE_H */
#endif
#endif
+#ifdef NEED_SYS_CORE_H
+#include <sys/core.h>
+#endif
/* Extract the register values out of the core file and store
them where `read_register' will find them.
/* Extract the register values out of the core file and store
them where `read_register' will find them.
@@
-69,8
+78,6
@@
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
NOP. */
if (reg_ptr > core_reg_size)
reg_ptr -= KERNEL_U_ADDR;
NOP. */
if (reg_ptr > core_reg_size)
reg_ptr -= KERNEL_U_ADDR;
- if (reg_ptr > core_reg_size)
- fprintf (stderr, "Can't find registers in core file\n");
for (regno = 0; regno < NUM_REGS; regno++)
{
for (regno = 0; regno < NUM_REGS; regno++)
{
@@
-82,7
+89,7
@@
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
supply_register (regno, core_reg_sect + addr);
}
}
supply_register (regno, core_reg_sect + addr);
}
}
- if (bad_reg > 0)
+ if (bad_reg >
=
0)
{
error ("Register %s not found in core file.", reg_names[bad_reg]);
}
{
error ("Register %s not found in core file.", reg_names[bad_reg]);
}