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] smart pointer support



Sami>  +		      struct value *value = value_x_unop (arg2, op, noside);
Sami>  +		      if (value)
Sami>  +			arg2 = value;

This seems strange.  When can the result here be NULL?  And what does
that mean?  It seems like this either ought to be impossible, or it
should be an error of some kind.


Yes this is incorrect. value_x_unop never returns null. If the operator is not found it throws an error. I added a try catch statement and tests for the failing case.


New patch attached.

Attachment: smart_pointer.patch
Description: Text document


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