This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/20948] --write option to GDB causes segmentation fault


https://sourceware.org/bugzilla/show_bug.cgi?id=20948

--- Comment #18 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=db72737006fc383cb8838bf7f3dc8e641e60c38f

commit db72737006fc383cb8838bf7f3dc8e641e60c38f
Author: Jozef Lawrynowicz <jozef.l@mittosystems.com>
Date:   Tue Sep 11 22:56:36 2018 +0100

    Fix PR gdb/20948: --write option to GDB causes segmentation fault

    When opening a BFD for update, as gdb --write does, modifications to
    anything but the contents of sections is restricted.

    Do not try to write back any ELF headers in this case.

    bfd/ChangeLog
    2018-09-24  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

        PR gdb/20948
        * elf.c (_bfd_elf_write_object_contents): Return from function
        early if abfd->direction == both_direction.

    gdb/testsuite/ChangeLog
    2018-09-24  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

        PR gdb/20948
        * gdb.base/write_mem.exp: New test.
        * gdb.base/write_mem.c: Likewise.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]