From: nickrob@snap.net.nz (Nick Roberts)
To: gdb@sourceware.org
Subject: [Bug:cli] Loading user-defined function generates an internal error
Date: Wed, 30 Dec 2009 05:35:00 -0000 [thread overview]
Message-ID: <19258.59036.731093.439412@totara.tehura.co.nz> (raw)
If the user-defined function below is put in a file user.cmd, say, then in
internal error is generated upon loading it:
..
(gdb) source user.cmd
utils.c:1206: internal-error: virtual memory exhausted.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]
utils.c:1206: internal-error: virtual memory exhausted.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]
Aborted (core dumped)
This didn't used to happen, say 3 months ago.
--
Nick http://users.snap.net.nz/~nickrob
define p_tree
set $tree = ($arg0)
set $i = 0
set $node = $tree->_M_t->_M_impl->_M_header->_M_left
set $tree_size = $tree->_M_t->_M_impl->_M_node_count
while ($i < $tree_size)
set $i++
printf "NODE %d: ", $i
set $value = (void *)($node + 1)
p *($arg1 *)$value
set $value = $value + 4
p *($arg2 *)$value
# Next (bigger) value must be to right...
if ($node->_M_right != 0)
set $node = $node->_M_right
# Descend tree while there is a left node.
while ($node->_M_left != 0)
set $node = $node->_M_left
end
# ...or further up the tree.
else
set $tmp_node = $node->_M_parent
# Ascend tree while at right node.
while ($node == $tmp_node->_M_right)
set $node = $tmp_node
set $tmp_node = $tmp_node->_M_parent
end
# Set to parent of first left node (condition always true?)
if ($node->_M_right != $tmp_node)
set $node = $tmp_node
end
end
end
end
next reply other threads:[~2009-12-30 5:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-30 5:35 Nick Roberts [this message]
2009-12-30 5:46 ` Joel Brobecker
2009-12-30 8:50 ` Nick Roberts
2009-12-31 6:27 ` Vladimir Prus
2009-12-30 22:26 ` Nick Roberts
2010-01-01 8:41 ` [patch] Fix crash on CLI indented comments [Re: [Bug:cli] Loading user-defined function generates an internal error] Jan Kratochvil
2010-01-01 10:36 ` Joel Brobecker
2010-01-01 11:01 ` Jan Kratochvil
2010-01-01 11:12 ` Joel Brobecker
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=19258.59036.731093.439412@totara.tehura.co.nz \
--to=nickrob@snap.net.nz \
--cc=gdb@sourceware.org \
/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