GCORE(1)

πŸ“¦
version 12.0.140~12.0.1 Β· 3 versions
, in ubuntu noble

πŸ’– GCORE β€” bestie edition πŸ’–

okay so real quick, this is the manual page for gcore, part of the GNU Development Tools lineup. she's a little queen from the GDB family and she does exactly one thing and she does it beautifully. let's get into it 🫢


✨ NAME ✨

gcore β€” generate a core file of a running program. that's it. that's the whole job. no cap. πŸ’…


🌸 SYNOPSIS 🌸

gcore [-a] [-o prefix] pid1 [pid2...pidN]

she's giving simple. one command, a couple flags, a list of pids. iconic. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: gcore generates core dumps of one or more running programs, using their process IDs β€” pid1, pid2, etc. you just hand her the pids and she goes to work. πŸ’–

and here's the slay part β€” a core file produced by gcore is equivalent to one produced by the kernel when the process crashes. ykwim, like the ones you get when "ulimit -c" was used to set up an appropriate core dump limit. same energy, same file, same everything. 😌

BUT. and this is the moment. πŸ”₯ unlike after a crash, after gcore finishes its job the program remains running without any change. she does NOT kill your process. your little program is fine. she just took a snapshot and walked away. main character energy fr fr. πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • -a β€” dump all memory mappings. the actual effect of this option depends on the Operating System, so it's giving "your mileage may vary" energy. on GNU/Linux specifically, it will disable "use-coredump-filter" and enable "dump-excluded-mappings". iykyk. 🌈
  • -o prefix β€” the optional argument prefix specifies the prefix to be used when composing the file names of the core dumps. the file name is composed as prefix.pid, where pid is the process ID of the running program being analyzed by gcore. so like, the name comes out as prefix-dot-pid, cute little pattern πŸŽ€. and if you don't specify it? no worries bestie, prefix defaults to gcore. lowkey convenient. ✨

🌈 SEE ALSO 🌈

the full documentation for GDB is maintained as a Texinfo manual. if the "info" and "gdb" programs and GDB's Texinfo documentation are properly installed at your site, the command

info gdb

should give you access to the complete manual. so if you want the whole deep dive, that's your portal. πŸŒ€

also, shoutout to Using GDB: A Guide to the GNU Source-Level Debugger, by Richard M. Stallman and Roland H. Pesch, July 1991. vintage but still eating. πŸ‘‘


Copyright (c) 1988-2022 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below.

(a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom."


bestie reminder: this whole page is licensed under the GNU Free Documentation License, v1.3 or later. respect the paperwork. 🫢

and that's the whole manual!! this page is from gdb-12.1, dated 2024-04-01 β€” yeah she's got a date on her like a limited edition drop. go snapshot some processes, bestie, and stay iconic. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from