]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/procfs.c
procfs.c: Don't install a deprecated_xfer_memory method
authorPedro Alves <palves@redhat.com>
Wed, 19 Feb 2014 20:29:31 +0000 (20:29 +0000)
committerJoel Brobecker <brobecker@adacore.com>
Mon, 24 Feb 2014 17:49:33 +0000 (12:49 -0500)
commite96027e0d9b0a600aabd2c1c7cfdde6ce6d076e8
tree270ed3ebd5f325a66bdf0c85b7725c1045bec67a
parent0837c976950e347cc48a1c55c6c8d60fc710c168
procfs.c: Don't install a deprecated_xfer_memory method

This removes yet another instance of a deprecated_xfer_memory user,
and fixes a nasty regression as a side-effect:

    (gdb) start
    Temporary breakpoint 1 at 0x19070: file simple_main.adb, line 4.
    Starting program: /[...]/simple_main
    Warning:
    Cannot insert breakpoint 1.
    Cannot access memory at address 0x19070
    Cannot insert breakpoint -3.
    Temporarily disabling shared library breakpoints:
    breakpoint #-3

The regression was introduced by the to_xfer_partial transition
to return a status enum.  procfs_xfer_partial was updated but
not the case where object is TARGET_OBJECT_MEMORY.  As result,
procfs_xfer_partial was returning the length xfered rather than
the status, and the xfered buffer was left uninitialized.

gdb/
2014-02-19  Pedro Alves  <palves@redhat.com>

* procfs.c (procfs_target): Don't install procfs_xfer_memory as
deprecated_xfer_memory hook.
(procfs_xfer_partial): Call procfs_xfer_memory instead
of the deprecated_xfer_memory target hook.
(procfs_xfer_memory): Adjust interface as a to_xfer_partial
helper.
gdb/ChangeLog
gdb/procfs.c