On Tue, 2011-07-19 at 15:42 +0200, Denys Duchier wrote:
David Malcolm dmalcolm@redhat.com writes:
To get a backtrace from the plugin, you need to locate the invocation line for the gcc harness, then add "-v" to the options to see the invocation of the c compiler ("cc1"). You should then be able to run it under gdb like this:
$ gdb --args FULL ARGS OF cc1 INVOCATION (gdb) run
Here is what I get (does it help?):
[snip]
Program received signal SIGSEGV, Segmentation fault. 0x0848457a in lookup_attribute () (gdb) bt #0 0x0848457a in lookup_attribute () #1 0x08489141 in build_pointer_type_for_mode () #2 0x08489273 in build_pointer_type () #3 0xb79ed91f in gcc_TypeDecl_get_pointer (self=0xb7537670, closure=0x0) at autogenerated-tree.c:3963 #4 0xb787203d in ?? () from /usr/lib/libpython2.7.so.1.0 (gdb) f 3 #3 0xb79ed91f in gcc_TypeDecl_get_pointer (self=0xb7537670, closure=0x0) at autogenerated-tree.c:3963 3963 return gcc_python_make_wrapper_tree(build_pointer_type(self->t)); (gdb) list 3958 }; 3959 3960 static PyObject * 3961 gcc_TypeDecl_get_pointer(PyGccTree *self, void *closure) 3962 { 3963 return gcc_python_make_wrapper_tree(build_pointer_type(self->t)); 3964 } 3965 3966 static PyGetSetDef gcc_TypeDecl_getset_table[] = { 3967 {"pointer",
Thanks for the info.
It looks like you don't have debugging information available for either gcc, or for python. Having debug info for gcc might help us figure out what's going on in frames 0 to 2.
I wonder if self->t is NULL in frame 3. If it's not NULL, I wonder what the corresponding tree value is.
Running: (gdb) print self->t (gdb) call debug_tree(self->t) (gdb) print *(self->t) might help (but then again, might not).
Dave