This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [COMMIT] Re: [PATCH] PR gdb/15871: Unavailable entry value is not shown correctly
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: Mark Kettenis <mark dot kettenis at xs4all dot nl>, tromey at redhat dot com, gdb-patches at sourceware dot org
- Date: Fri, 23 Aug 2013 17:50:50 +0100
- Subject: Re: [COMMIT] Re: [PATCH] PR gdb/15871: Unavailable entry value is not shown correctly
- References: <1376379586-24150-1-git-send-email-yao at codesourcery dot com> <1376379586-24150-3-git-send-email-yao at codesourcery dot com> <87siy4gsn4 dot fsf at fleche dot redhat dot com> <521458A8 dot 7060304 at codesourcery dot com> <5214D03C dot 9040703 at redhat dot com> <201308211447 dot r7LEld3t025510 at glazunov dot sibelius dot xs4all dot nl> <5214DD85 dot 5060605 at redhat dot com> <52156841 dot 8030105 at codesourcery dot com> <5215E241 dot 6010008 at redhat dot com> <5216B5C9 dot 3010402 at codesourcery dot com>
On 08/23/2013 02:07 AM, Yao Qi wrote:
> I'd like to write this down in section "Internals" in
> http://sourceware.org/gdb/wiki/ProjectIdeas , let me know what do you think.
>
> Use target_xfer_error instead of errno. Some xfer_memory functions
> (such as target_read_memory and deprecated_xfer_memory) are
> using errno to indicate any error occurs. This limites what we can
> return here, because we can't return some GDB-specific errors, such as
> <unavailable>. If we need to indicate an errno, bfd error for example,
> a new TARGET_XFER_E_BFD can be added to target_xfer_error. See
> http://sourceware.org/ml/gdb-patches/2013-08/msg00589.html for more info.
Thanks, but rather than end up with an incomplete transition,
I went ahead and did the legwork:
http://sourceware.org/ml/gdb-patches/2013-08/msg00687.html
deprecated_xfer_memory should just be eliminated. I've now
cleaned up remote.c:
http://sourceware.org/ml/gdb-patches/2013-08/msg00668.html
A few more to go still ...
$ grep "deprecated_xfer_memory.*=" *.c | grep -v target.c
darwin-nat.c: darwin_ops->deprecated_xfer_memory = darwin_xfer_memory;
gnu-nat.c: t->deprecated_xfer_memory = gnu_xfer_memory;
go32-nat.c: go32_ops.deprecated_xfer_memory = go32_xfer_memory;
monitor.c: monitor_ops.deprecated_xfer_memory = monitor_xfer_memory;
nto-procfs.c: procfs_ops.deprecated_xfer_memory = procfs_xfer_memory;
procfs.c: t->deprecated_xfer_memory = procfs_xfer_memory;
remote-m32r-sdi.c: m32r_ops.deprecated_xfer_memory = m32r_xfer_memory;
remote-mips.c: mips_ops.deprecated_xfer_memory = mips_xfer_memory;
remote-sim.c: gdbsim_ops.deprecated_xfer_memory = gdbsim_xfer_inferior_memory;
windows-nat.c: windows_ops.deprecated_xfer_memory = windows_xfer_memory;
--
Pedro Alves