read the instruction at PC.
2004-01-24 Mark Kettenis <kettenis@gnu.org>
+ * sparc-tdep.c (sparc_fetch_instruction): Return zero if we can't
+ read the instruction at PC.
+
* sparcnbsd-tdep.c (GDB_OSABI_NETBSD_CORE): Define, based on the
value of GDB_OSABI_DEFAULT.
(sparcnbsd_core_osabi_sniffer): Return GDB_OSABI_NETBSD_CORE
unsigned long insn;
int i;
- read_memory (pc, buf, sizeof (buf));
+ /* If we can't read the instruction at PC, return zero. */
+ if (target_read_memory (pc, buf, sizeof (buf)))
+ return 0;
insn = 0;
for (i = 0; i < sizeof (buf); i++)