public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: Tom Tromey <tom@tromey.com>, SCOTT FIELDS via Gdb <gdb@sourceware.org>
Cc: "gdb@gnu.org" <gdb@gnu.org>, SCOTT FIELDS <Scott.Fields@kyndryl.com>
Subject: Re: Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB
Date: Fri, 8 Sep 2023 18:07:30 +0100	[thread overview]
Message-ID: <e5ccc072-6a56-350a-7fd0-2753f519d551@arm.com> (raw)
In-Reply-To: <87il8kli2q.fsf@tromey.com>

On 9/8/23 17:56, Tom Tromey wrote:
>>>>>> SCOTT FIELDS via Gdb <gdb@sourceware.org> writes:
> 
>> Are there other commands that will estimate the current space required
>> for a successful run of "gcore"?  Neither "gcore" command or
>> gcore/generate-core-file command in GDB provide any option to get such
>> an estimate.
> 
>> Has there been a request to get this kind of information from "gcore"
>> as a future enhancement, since it can be difficult to know just how
>> much space a large running process actually needs.
> 
> I've never heard such a request.
> 
> Looking at gcore.c, it seems reasonably possible to implement this.
> Look at gcore_create_callback to see how it decides how to size the
> various sections.  Without trying, it is hard to say if there is some
> hidden gotcha.

I'd expect some help from the arch-specific code will be needed to add things like
memory tag data and sizes of register sets. But otherwise it should be fairly doable.


  reply	other threads:[~2023-09-08 17:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 18:25 SCOTT FIELDS
2023-09-05 18:41 ` SCOTT FIELDS
2023-09-08 16:56 ` Tom Tromey
2023-09-08 17:07   ` Luis Machado [this message]
2023-09-08 17:29   ` SCOTT FIELDS
2023-09-08 22:41     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e5ccc072-6a56-350a-7fd0-2753f519d551@arm.com \
    --to=luis.machado@arm.com \
    --cc=Scott.Fields@kyndryl.com \
    --cc=gdb@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).