Blame SOURCES/gdb-rhbz1518243-gcore-VM_DONTDUMP-2of5.patch

2c2fa1
commit 1e52e8495a074c9d1f7ef17f13b9060b76be6f41
2c2fa1
Author: Sergio Lopez <slp@redhat.com>
2c2fa1
Date:   Mon Dec 4 09:17:13 2017 +0100
2c2fa1
2c2fa1
    Document new {set,show} dump-excluded-mappings commands.
2c2fa1
    
2c2fa1
    gdb/ChangeLog:
2c2fa1
    2017-11-29  Sergio Lopez  <slp@redhat.com>
2c2fa1
    
2c2fa1
            * NEWS (Changes since GDB 8.0): Announce {set,show}
2c2fa1
            dump_excluded_mappings commands.
2c2fa1
    
2c2fa1
    gdb/doc/ChangeLog:
2c2fa1
    2017-11-29  Sergio Lopez  <slp@redhat.com>
2c2fa1
    
2c2fa1
            * gdb.texinfo (gcore): Mention new {set,show}
2c2fa1
            dump-excluded-mappings commands.
2c2fa1
            (set dump-excluded-mappings): Document new command.
2c2fa1
2c2fa1
Index: gdb-7.6.1/gdb/NEWS
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/NEWS	2017-12-06 20:56:34.005080504 +0100
2c2fa1
+++ gdb-7.6.1/gdb/NEWS	2017-12-06 20:56:52.510200234 +0100
2c2fa1
@@ -7,6 +7,11 @@
2c2fa1
   Add entries to the list of directories from which to load auto-loaded
2c2fa1
   scripts.
2c2fa1
 
2c2fa1
+set dump-excluded-mappings
2c2fa1
+show dump-excluded-mappings
2c2fa1
+  Control whether mappings marked with the VM_DONTDUMP flag should be
2c2fa1
+  dumped when generating a core file.
2c2fa1
+
2c2fa1
 * Newly installed $prefix/bin/gcore acts as a shell interface for the
2c2fa1
   GDB command gcore.
2c2fa1
 
2c2fa1
Index: gdb-7.6.1/gdb/doc/gdb.texinfo
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/doc/gdb.texinfo	2017-12-06 20:56:30.604058498 +0100
2c2fa1
+++ gdb-7.6.1/gdb/doc/gdb.texinfo	2017-12-06 20:56:34.015080568 +0100
2c2fa1
@@ -10318,7 +10318,9 @@
2c2fa1
 
2c2fa1
 On @sc{gnu}/Linux, this command can take into account the value of the
2c2fa1
 file @file{/proc/@var{pid}/coredump_filter} when generating the core
2c2fa1
-dump (@pxref{set use-coredump-filter}).
2c2fa1
+dump (@pxref{set use-coredump-filter}), and by default honors the
2c2fa1
+@code{VM_DONTDUMP} flag for mappings where it is present in the file
2c2fa1
+@file{/proc/@var{pid}/smaps} (@pxref{set dump-excluded-mappings}).
2c2fa1
 
2c2fa1
 @kindex set use-coredump-filter
2c2fa1
 @anchor{set use-coredump-filter}
2c2fa1
@@ -10348,6 +10350,16 @@
2c2fa1
 (anonymous private mappings), @code{1} (anonymous shared mappings),
2c2fa1
 @code{4} (ELF headers) and @code{5} (private huge pages) are active.
2c2fa1
 This will cause these memory mappings to be dumped automatically.
2c2fa1
+
2c2fa1
+@kindex set dump-excluded-mappings
2c2fa1
+@anchor{set dump-excluded-mappings}
2c2fa1
+@item set dump-excluded-mappings on
2c2fa1
+@itemx set dump-excluded-mappings off
2c2fa1
+If @code{on} is specified, @value{GDBN} will dump memory mappings
2c2fa1
+marked with the @code{VM_DONTDUMP} flag.  This flag is represented in
2c2fa1
+the file @file{/proc/@var{pid}/smaps} with the acronym @code{dd}.
2c2fa1
+
2c2fa1
+The default value is @code{off}.
2c2fa1
 @end table
2c2fa1
 
2c2fa1
 @node Character Sets