From: Xavier de Gaye <xdegaye@gmail.com>
To: gdb@sourceware.org
Subject: MI pretty printing -var-list-children segfaults
Date: Mon, 30 Nov 2015 21:18:00 -0000 [thread overview]
Message-ID: <565CBD10.3080501@gmail.com> (raw)
gdb 7.10 segfaults after deleting the varobj child of a vector with one
element. Does that mean children must no be deleted ?
The last part of the debugging session:
(gdb)
~"8\t v.push_back(3);\n"
*stopped,reason="end-stepping-range",frame={addr="0x0000000000400b35",func="main",args=[],file="pret
ty-printing.cc",fullname="/home/xavier/src/pyclewn/pyclewn-hg-working/testsuite/pretty-printing.cc",
line="8"},thread-id="1",stopped-threads="all",core="1"
(gdb)
-enable-pretty-printing
^done
(gdb)
-var-create var1 * "v"
^done,name="var1",numchild="0",value="{...}",type="std::vector<int, std::allocator<int> >",thread-id
="1",displayhint="array",dynamic="1",has_more="1"
(gdb)
-var-list-children var1
^done,numchild="1",displayhint="array",children=[child={name="var1.[0]",exp="[0]",numchild="0",type=
"int",thread-id="1"}],has_more="0"
(gdb)
-var-delete var1.[0]
^done,ndeleted="1"
(gdb)
-var-list-children var1
Segmentation fault (core dumped)
And the source code:
#include <vector>
#include <string>
int main()
{
std::vector<int> v;
v.push_back(2);
v.push_back(3);
return 0;
}
Xavier
next reply other threads:[~2015-11-30 21:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-30 21:18 Xavier de Gaye [this message]
2015-11-30 22:32 ` Simon Marchi
2015-12-01 14:49 ` Xavier de Gaye
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=565CBD10.3080501@gmail.com \
--to=xdegaye@gmail.com \
--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