[PATCH v2 0/5] Fix BZ 25631 - core file memory access problem

Kevin Buettner kevinb@redhat.com
Wed May 13 17:11:50 GMT 2020


This series fixes a bug with accessing memory from core files.

The bug can be viewed here...

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

...though I also provide similar details in part 4 of this series.

It incorporates suggestions made by Keith and Pedro in their reviews.
The biggest change from v1 is that the section splitting code that
I introduced in v1 has been entirely removed.  Instead, I now pass
a predicate to section_table_xfer_memory as suggested by Pedro.

Pedro has asked me to write another test case for a problem
that he found while reviewing v1.  I will attempt to do that, but I
wanted to post this patch series so that review can start sooner.
If I manage to create a good test, I'll post that separately.

Kevin Buettner (5):
  Remove hack for GDB which sets the section size to 0
  Adjust corefile.exp test to show regression after bfd hack removal
  section_table_xfer_memory: Replace section name with callback
    predicate
  Provide access to non SEC_HAS_CONTENTS core file sections
  Test ability to access unwritten-to mmap data in core file

 bfd/elf.c                           |  8 -----
 gdb/bfd-target.c                    |  3 +-
 gdb/corelow.c                       | 48 ++++++++++++++++++++++++-----
 gdb/exec.c                          |  8 ++---
 gdb/exec.h                          | 13 ++++++--
 gdb/target.c                        | 18 ++++++++---
 gdb/testsuite/gdb.base/corefile.exp |  6 ++++
 gdb/testsuite/gdb.base/coremaker.c  | 16 ++++++++++
 8 files changed, 91 insertions(+), 29 deletions(-)

-- 
2.25.4



More information about the Gdb-patches mailing list