This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix SIGSEGV in gdb when printing ctor of non-virtual class


Ping? Does this patch make any sense?


Aleksandar Ristovski wrote:
Hello,

I run into a SIGSEGV crash in gdb when printing value of a non-virtual class' constructor (I got this from IDE asking for a wrong value).

Example:

(gdb) print n.Name

where 'n' is an object of non-virtual class 'Name'.


The attached tests demonstrate the problem and propose a fix.



Thanks,


Aleksandar Ristovski
QNX Software Systems



ChangeLog:

    * value.c (value_fn_field): Do not dereference if block does not
    exist.


testsuite ChangeLog:


    * gdb.cp/cppeval.exp: New test.
    * gdb.cp/cppeval.cc: New test case to accompany cppeval.exp.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]