Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v5 00/14] Fix BZ 25631 - core file memory access problem
@ 2020-07-22  0:58 Kevin Buettner
  2020-07-22  0:58 ` [PATCH v5 01/14] Remove hack for GDB which sets the section size to 0 Kevin Buettner
                   ` (15 more replies)
  0 siblings, 16 replies; 25+ messages in thread
From: Kevin Buettner @ 2020-07-22  0:58 UTC (permalink / raw)
  To: gdb-patches

This series fixes several core file related bugs.  The bug which
started this work can be viewed here:

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

Other problems were found either during review or during development. 
I discuss these in my commit log remarks.

This v5 series has only minor changes from v4.  Unless noted
otherwise, these changes all address Pedro's concerns:

o Patch #5, Test ability to access unwritten-to mmap data in core file:

  - Add setup_xfail for non-Linux OSes.  (I spotted this while testing
    on FreeBSD.)

o Patch #8, Use NT_FILE note section for reading core target memory:

  - Formatting fixes.
  - Close bfd after failed bfd_check_format_check.
  - Fix SECNAME leak.

o Patch #11, Adjust coredump-filter.exp to account for NT_FILE note handling:

  - Instead of XFAILing test, use Mihails Strasuns's suggestion
    instead.

o Patch #12, Add new command "maint print core-file-backed-mappings":

  - Formatting fixes.
  - Don't crash GDB with gdb_assert().
  - Add comments (in both code and commit log) regarding utility
    of this new command.

o Patch #14, New core file tests with mappings over existing program memory:

  - Formatting fixes.
  - Add another "maint print core-file-backed-mappings" test requested
    by Pedro in patch #12 review.  This one makes sure that we don't
    crash GDB when NOT debugging a core file.

I believe that all patches not listed above have been approved. 
Actually, I think that #5 is still approved too; I doubt that adding
an XFAIL changes that.

Kevin Buettner (14):
  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
  Update binary_get_section_contents to seek using section's file
    position
  Add new gdbarch method, read_core_file_mappings
  Use NT_FILE note section for reading core target memory
  Add test for accessing read-only mmapped data in a core file
  gcore command: Place all file-backed mappings in NT_FILE note
  Adjust coredump-filter.exp to account for NT_FILE note handling
  Add new command "maint print core-file-backed-mappings"
  Add documentation for "maint print core-file-backed-mappings"
  New core file tests with mappings over existing program memory

 bfd/binary.c                               |  12 +-
 bfd/elf.c                                  |   8 -
 gdb/NEWS                                   |   4 +
 gdb/arch-utils.c                           |  16 ++
 gdb/arch-utils.h                           |  12 +
 gdb/bfd-target.c                           |   3 +-
 gdb/corelow.c                              | 264 ++++++++++++++++++++-
 gdb/doc/gdb.texinfo                        |   8 +
 gdb/exec.c                                 |   8 +-
 gdb/exec.h                                 |  13 +-
 gdb/gdbarch.c                              |  23 ++
 gdb/gdbarch.h                              |   6 +
 gdb/gdbarch.sh                             |   3 +
 gdb/linux-tdep.c                           | 244 +++++++++++++------
 gdb/target.c                               |  18 +-
 gdb/testsuite/gdb.base/coredump-filter.exp |  18 +-
 gdb/testsuite/gdb.base/corefile.exp        |  27 ++-
 gdb/testsuite/gdb.base/corefile2.exp       | 185 +++++++++++++++
 gdb/testsuite/gdb.base/coremaker.c         |  30 ++-
 gdb/testsuite/gdb.base/coremaker2.c        | 150 ++++++++++++
 20 files changed, 942 insertions(+), 110 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/corefile2.exp
 create mode 100644 gdb/testsuite/gdb.base/coremaker2.c

-- 
2.26.2



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2020-07-23 21:44 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22  0:58 [PATCH v5 00/14] Fix BZ 25631 - core file memory access problem Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 01/14] Remove hack for GDB which sets the section size to 0 Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 02/14] Adjust corefile.exp test to show regression after bfd hack removal Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 03/14] section_table_xfer_memory: Replace section name with callback predicate Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 04/14] Provide access to non SEC_HAS_CONTENTS core file sections Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 05/14] Test ability to access unwritten-to mmap data in core file Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 06/14] Update binary_get_section_contents to seek using section's file position Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 07/14] Add new gdbarch method, read_core_file_mappings Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 08/14] Use NT_FILE note section for reading core target memory Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 09/14] Add test for accessing read-only mmapped data in a core file Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 10/14] gcore command: Place all file-backed mappings in NT_FILE note Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 11/14] Adjust coredump-filter.exp to account for NT_FILE note handling Kevin Buettner
2020-07-22 18:56   ` Pedro Alves
2020-07-22  0:58 ` [PATCH v5 12/14] Add new command "maint print core-file-backed-mappings" Kevin Buettner
2020-07-23 13:08   ` Tom de Vries
2020-07-23 20:47     ` Kevin Buettner
2020-07-22  0:58 ` [PATCH v5 13/14] Add documentation for " Kevin Buettner
2020-07-22  2:27   ` Eli Zaretskii
2020-07-22  0:58 ` [PATCH v5 14/14] New core file tests with mappings over existing program memory Kevin Buettner
2020-07-22 18:58 ` [PATCH v5 00/14] Fix BZ 25631 - core file memory access problem Pedro Alves
2020-07-22 20:14   ` Kevin Buettner
2020-07-22 22:40 ` Luis Machado
2020-07-23  3:49   ` Kevin Buettner
2020-07-23 10:37     ` Luis Machado
2020-07-23 21:44       ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox