This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] i386-tdep.c, check target_read_memory for error.
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Mark Kettenis <mark dot kettenis at xs4all dot nl>
- Date: Sun, 6 Mar 2011 15:15:16 +0100
- Subject: Re: [RFA] i386-tdep.c, check target_read_memory for error.
- References: <4D715BB0.8030506@vmware.com>
On Fri, 04 Mar 2011 22:37:52 +0100, Michael Snyder wrote:
> Call error if target_read_memory fails.
[...]
> - target_read_memory (pc, &op, 1);
> + if (target_read_memory (pc, &op, 1))
> + error (_("Couldn't read memory at pc (%s)"),
> + paddress (gdbarch, pc));
There is the function `read_memory' for such purpose.
Thanks,
Jan