This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/17416] New: -var-list-children fails with "set print object on" and invalid/NULL value
- From: "simon.marchi at ericsson dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 19 Sep 2014 21:24:43 +0000
- Subject: [Bug gdb/17416] New: -var-list-children fails with "set print object on" and invalid/NULL value
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17416
Bug ID: 17416
Summary: -var-list-children fails with "set print object on"
and invalid/NULL value
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: simon.marchi at ericsson dot com
Created attachment 7796
--> https://sourceware.org/bugzilla/attachment.cgi?id=7796&action=edit
Test program
When
- "set print object" is on
- The variable object is a pointer to a struct, and it contains an invalid
value (e.g. NULL, or random uninitialized value)
- The variable object (struct) has a child which is also a pointer to a struct.
-var-list-children returns an error. GDB tries to dereference the top-level
pointer to get the value of the child one, in order to go determine the real
type of the pointed object using RTTI. In the process, value_ind in
value_rtti_indirect_type throws an error that is never caught.
What happens then is that the variable object for the child is half-created. If
the top-level pointer is set to a sensible value and we try to do
-var-list-children again, we get a "Duplicate variable object name" error.
The attached test case shows the problem.
--
You are receiving this mail because:
You are on the CC list for the bug.