Re: [PATCH 4/4] Document the new "-a" argument for gcore

John Baldwin
2017-11-28T18:37:41Z

On Tuesday, November 28, 2017 06:35:37 PM Eli Zaretskii wrote:
> > From: Sergio Lopez <slp@redhat.com>
> > Cc: Sergio Lopez <slp@redhat.com>
> > Date: Tue, 28 Nov 2017 14:21:48 +0100
> >
> > +@item -a
> > +Instruct GDB to unconditionally dump all sections (except IO), ignoring the
> ^^^
> "@value{GDBN}"
>
> > +value of @file{/proc/@var{pid}/coredump_filter} and the VM_DONTDUMP flag.
>
> Is this Linux-specific? Because AFAIK 'gcore' isn't, and so we need
> to document that this switch and the details you've put into its
> description are specific to Linux.
>
> Also, VM_DONTDUMP should be in @code.

It is OS-specific. FreeBSD has a similar notion (it excludes memory regions
marked with a KVME_FLAG_NOCOREDUMP in fbsd_find_memory_regions in fbsd-nat.c
that are created by passing MAP_NOCORE to mmap()). I could make FreeBSD's
native target honor the same flag name once this is pushed in, though
FreeBSD's kernel always honors the NOCOREDUMP flag (there is no way to force
a kernel-generated coredump to include those regions).

--
John Baldwin