Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Philippe Blain via Gdb <gdb@sourceware.org>
To: Tom Tromey <tom@tromey.com>
Cc: Philippe Blain via Gdb <gdb@sourceware.org>
Subject: Re: Recovering a core dump deleted while debugging
Date: Tue, 1 Sep 2026 07:03:19 -0400	[thread overview]
Message-ID: <E145DB03-1DD7-4A86-A881-C1C8D7503A72@gmail.com> (raw)
In-Reply-To: <87v78u82xy.fsf@tromey.com>

Hi Tom,

> Le 28 août 2026 à 15:23, Tom Tromey <tom@tromey.com> a écrit :
> 
> 
>> 
>> I’m debugging a core dump in GDB and some other process deleted the
>> directory where the core dump was. Is there anyway to recover it?
> 
> Probably not.
> 
>> I tried 'lsof -p $pid' and looking in /proc/$pid/fd/ but the core dump
>> does not appear there. I’m guessing GDB closes the file after it loads
>> everything into memory ?
> 
> BFD sometimes closes file descriptors, so you might have run into this.
> gdb can also cause BFD to do this, though exactly when is kind of opaque
> to the user.
> 
> Checking /proc is pretty much the only thing I would have suggested.

Thank you for answering. Indeed later I tried to continue my GDB session and got a BFD error saying the core was not found. 

Good news is we managed to reproduce and fix the failure leading to the core dump :P

Cheers,

Philippe. 



      reply	other threads:[~2026-09-01 11:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 11:53 Philippe Blain via Gdb
2026-08-28 19:23 ` Tom Tromey
2026-09-01 11:03   ` Philippe Blain via Gdb [this message]

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=E145DB03-1DD7-4A86-A881-C1C8D7503A72@gmail.com \
    --to=gdb@sourceware.org \
    --cc=levraiphilippeblain@gmail.com \
    --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