[PATCH v4 00/14] Fix BZ 25631 - core file memory access problem

Pedro Alves pedro@palves.net
Fri Jul 10 20:13:09 GMT 2020


On 7/5/20 11:57 PM, Kevin Buettner via Gdb-patches wrote:
> 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.
> 
> Only some of these patches still need review.  A brief status
> of each can be found below:
> 
>  1) Remove hack for GDB which sets the section size to 0
> 
>     Nick Clifton has approved this patch.
> 
>  2) Adjust corefile.exp test to show regression after bfd hack removal
>  3) section_table_xfer_memory: Replace section name with callback
>     predicate
>  4) Provide access to non SEC_HAS_CONTENTS core file sections
>  5) Test ability to access unwritten-to mmap data in core file
> 
>     I think that Pedro is okay with #2 thru #5.
> 
>  6) Update binary_get_section_contents to seek using section's file
>     position
> 
>     Nick Cliften has approved patch #6.
> 
>  7) Add new gdbarch method, read_core_file_mappings
> 
>     This is a new patch which needs review.
> 
>  8) Use NT_FILE note section for reading core target memory
> 
>     This patch is significantly different than the v3 patch.
>     It needs review.  
> 
>  9) Add test for accessing read-only mmapped data in a core file
> 
>     I think that Pedro is oky with this one.
> 
> 10) gcore command: Place all file-backed mappings in NT_FILE note
> 11) xfail gdb.base/coredump-filter.exp test which now works without a
>     binary
> 12) Add new command "maint print core-file-backed-mappings"
> 
>     #10 thru #12 are new patches which need review.
> 
> 13) Add documentation for "maint print core-file-backed-mappings"
> 
>     This one needs a review from Eli.
> 
> 14) New core file tests with mappings over existing program memory
> 
>     I've made all the changes that Pedro recommended, plus added
>     a test for the new maint print command.  It needs review.


I think this looks overall very good.

I've sent some comments to patches #8, #11, #12, and #14.

Once those are revolved, I'll be happy to see this go in.

Pedro Alves


More information about the Gdb-patches mailing list