public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/10805] New: GDB Type.fields() crashes on non-struct/class types
@ 2009-10-19 10:23 pmuldoon at redhat dot com
  2009-10-19 13:18 ` [Bug python/10805] " drow at sources dot redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: pmuldoon at redhat dot com @ 2009-10-19 10:23 UTC (permalink / raw)
  To: gdb-prs

Daniel Jacobowitz wrote about some Python/GDB experiences and bugs in the email:

http://sourceware.org/ml/archer/2009-q4/msg00008.html

This bug (and others in their own bugs) is extracted from that email to track
the issue:

* Calling type.fields on an array type crashes.  It accesses
TYPE_N_BASECLASSES; cplus_stuff isn't allocated for non-structs.

-- 
           Summary: GDB Type.fields() crashes on non-struct/class types
           Product: gdb
           Version: archer
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: python
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: pmuldoon at redhat dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10805

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug python/10805] GDB Type.fields() crashes on non-struct/class types
  2009-10-19 10:23 [Bug python/10805] New: GDB Type.fields() crashes on non-struct/class types pmuldoon at redhat dot com
@ 2009-10-19 13:18 ` drow at sources dot redhat dot com
  2009-10-20 10:12 ` pmuldoon at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: drow at sources dot redhat dot com @ 2009-10-19 13:18 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |drow at sources dot redhat
                   |                            |dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10805

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug python/10805] GDB Type.fields() crashes on non-struct/class types
  2009-10-19 10:23 [Bug python/10805] New: GDB Type.fields() crashes on non-struct/class types pmuldoon at redhat dot com
  2009-10-19 13:18 ` [Bug python/10805] " drow at sources dot redhat dot com
@ 2009-10-20 10:12 ` pmuldoon at redhat dot com
  2009-10-22  9:01 ` andre dot poenitz at nokia dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pmuldoon at redhat dot com @ 2009-10-20 10:12 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From pmuldoon at redhat dot com  2009-10-20 10:12 -------
This is what I see currently in both FSF HEAD and archer-tromey-python branch:

37	  return 0;      /* break to inspect struct and union */

(gdb) p st
$2 = {
  a = 3, 
  b = 5
}
(gdb) python st = gdb.history(0)
(gdb) py print st
{
  a = 3, 
  b = 5
}
(gdb) p ar
$3 = {1, 2}
(gdb) py ar = gdb.history (0)
(gdb) py print ar
{1, 2}
(gdb) python fields = st.type.fields()
(gdb) py print fields[0].name
a
(gdb) py print fields[1].name
b
(gdb) python fields = ar.type.fields()
Segmentation fault (core dumped)


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware dot|pmuldoon at redhat dot com
                   |org                         |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1


http://sourceware.org/bugzilla/show_bug.cgi?id=10805

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug python/10805] GDB Type.fields() crashes on non-struct/class types
  2009-10-19 10:23 [Bug python/10805] New: GDB Type.fields() crashes on non-struct/class types pmuldoon at redhat dot com
  2009-10-19 13:18 ` [Bug python/10805] " drow at sources dot redhat dot com
  2009-10-20 10:12 ` pmuldoon at redhat dot com
@ 2009-10-22  9:01 ` andre dot poenitz at nokia dot com
  2009-11-09  8:24 ` pmuldoon at redhat dot com
  2009-12-03 21:20 ` cvs-commit at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: andre dot poenitz at nokia dot com @ 2009-10-22  9:01 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From andre dot poenitz at nokia dot com  2009-10-22 09:01 -------
*** Bug 10827 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andre dot poenitz at nokia
                   |                            |dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10805

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug python/10805] GDB Type.fields() crashes on non-struct/class types
  2009-10-19 10:23 [Bug python/10805] New: GDB Type.fields() crashes on non-struct/class types pmuldoon at redhat dot com
                   ` (2 preceding siblings ...)
  2009-10-22  9:01 ` andre dot poenitz at nokia dot com
@ 2009-11-09  8:24 ` pmuldoon at redhat dot com
  2009-12-03 21:20 ` cvs-commit at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pmuldoon at redhat dot com @ 2009-11-09  8:24 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From pmuldoon at redhat dot com  2009-11-09 08:24 -------
A patch was submitted here:

http://sourceware.org/ml/archer/2009-q4/msg00016.html

Reviewed and approved here:

http://sourceware.org/ml/archer/2009-q4/msg00032.html

And checked in with commit id (dad6b53fe4a6df586dcd0a57e2151e7663191f18)  here:

http://sourceware.org/ml/archer-commits/2009-q4/msg00018.html

As this is archer-tromey-python only functionality, it has not been committed to
GDB upstream. There is a discussion on committing it.



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=10805

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug python/10805] GDB Type.fields() crashes on non-struct/class types
  2009-10-19 10:23 [Bug python/10805] New: GDB Type.fields() crashes on non-struct/class types pmuldoon at redhat dot com
                   ` (3 preceding siblings ...)
  2009-11-09  8:24 ` pmuldoon at redhat dot com
@ 2009-12-03 21:20 ` cvs-commit at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2009-12-03 21:20 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2009-12-03 21:20 -------
Subject: Bug 10805

CVSROOT:	/cvs/src
Module name:	src
Changes by:	pmuldoon@sourceware.org	2009-12-03 21:19:49

Modified files:
	gdb            : ChangeLog 
	gdb/doc        : ChangeLog gdb.texinfo 
	gdb/python     : py-type.c 
	gdb/testsuite  : ChangeLog 
	gdb/testsuite/gdb.python: Makefile.in 
Added files:
	gdb/testsuite/gdb.python: py-type.c py-type.exp 

Log message:
	2009-12-03  Richard Ward  <richard.j.ward1@googlemail.com>
	
	* python/py-type.c (convert_field): New attribute "is_base_class".
	
	doc/
	
	2009-12-03  Richard Ward  <richard.j.ward1@googlemail.com>
	
	* gdb.texinfo (Types In Python): Describe "is_base_class".
	
	testsuite/
	
	2009-12-03  Phil Muldoon <pmuldoon@redhat.com>
	
	PR python/10805
	
	* gdb.python/py-type.exp: New file.
	* gdb.python/py-type.c: New file.
	* Makefile.in: Add py-type.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11128&r2=1.11129
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.978&r2=1.979
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.646&r2=1.647
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/python/py-type.c.diff?cvsroot=src&r1=1.2&r2=1.3
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2044&r2=1.2045
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/py-type.c.diff?cvsroot=src&r1=NONE&r2=1.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/py-type.exp.diff?cvsroot=src&r1=NONE&r2=1.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/Makefile.in.diff?cvsroot=src&r1=1.2&r2=1.3



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10805

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-03 21:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-19 10:23 [Bug python/10805] New: GDB Type.fields() crashes on non-struct/class types pmuldoon at redhat dot com
2009-10-19 13:18 ` [Bug python/10805] " drow at sources dot redhat dot com
2009-10-20 10:12 ` pmuldoon at redhat dot com
2009-10-22  9:01 ` andre dot poenitz at nokia dot com
2009-11-09  8:24 ` pmuldoon at redhat dot com
2009-12-03 21:20 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).