Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Snyder <michsnyd@cisco.com>
Cc: gdb@sources.redhat.com, gdb-patches@sources.redhat.com, wendyp@cisco.com
Subject: Re: [RFC] What to do on VM exhaustion
Date: Thu, 05 Jan 2006 05:13:00 -0000	[thread overview]
Message-ID: <u64ozjlzl.fsf@gnu.org> (raw)
In-Reply-To: <43BC6F36.3050000@cisco.com> (message from Michael Snyder on Wed, 	04 Jan 2006 16:58:30 -0800)

> Date: Wed, 04 Jan 2006 16:58:30 -0800
> From: Michael Snyder <michsnyd@cisco.com>
> 
> I actually ran into this once before, years ago -- in fact it was
> RMS himself who called me to beef about gdb bailing on him, when
> he was debugging emacs and crashed the stack with an infinite
> recursion.  I think gdb ran out of memory while trying to do a
> backtrace.  He wanted me to make it recover gracefully and let him
> keep debugging.  I couldn't do it, but then I didn't have the
> luxury of having all you guys to ask for advice!
> 
> In present time, I'm suggesting that nomem should just write
> a simple error msg to the console and abort.  What do you think?

Perhaps we could do better: we could notice the memory usage each time
through the top-level command loop, just before invoking the command
dispatch, and then, if we ran out of memory during a command, we could
conclude that the last command is the culprit, and throw back to the
top level.  That would free the memory used up by that last command,
and GDB could ``recover gracefully'', as RMS wanted.  If that doesn't
help, then yes, abort with internal error, since that means GDB leaks
some significant memory.  The ``doesn't help'' part could be
implemented by trying to allocate some memory, just to see if we now
have something to continue with, or by comparing the break level to
the one we recorded before the command that ran out of memory.

WDYT?


  reply	other threads:[~2006-01-05  5:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-05  1:00 Michael Snyder
2006-01-05  5:13 ` Eli Zaretskii [this message]
     [not found]   ` <43BD965C.1080500@cisco.com>
2006-01-06  8:50     ` Eli Zaretskii
2006-01-05 14:50 ` Paul Koning
2006-01-05 22:00   ` Michael Snyder
     [not found]     ` <b1fa29170601051725t2fc37a96r2dc959a45a2aa92f@mail.gmail.com>
2006-01-06  1:35       ` Michael Snyder
     [not found]         ` <b1fa29170601051800n452bda22sc28082a2776c858@mail.gmail.com>
2006-01-06  3:16           ` Michael Snyder

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=u64ozjlzl.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=michsnyd@cisco.com \
    --cc=wendyp@cisco.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