Getting core estimate for "gcore" command and conversely gcore/generate-core-file in GDB
Luis Machado
luis.machado@arm.com
Fri Sep 8 17:07:30 GMT 2023
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.
More information about the Gdb
mailing list