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] -var-evaluate-expression NAME [FORMAT]


Sorry, the below got away from me before I finished.

==

> > Here is the revised patch.

My patch no longer works with the patch Vladimir applied
http://sourceware.org/ml/gdb/2008-02/msg00006.html
The reason is that Vladimir's patch has c_value_of_variable()
always use the stored print_value which is formatted based on the
current display format (and not the one specified as an option
to -var-evaluate-expression.)  I think that is a good way to do it.

One solution is to revert c_value_of_variable:
-           return xstrdup (var->print_value);
+           return value_get_print_value (var->value, var->format);

Although this is very easy, personally, I don't like that too much.

Another option is to not only temporarily set var->format
but also var->print_value (by calling varobj_set_display_format).
I like this even less.

I think a solution based on 
http://sourceware.org/ml/gdb-patches/2008-01/msg00531.html
is probably the cleanest.  Can I have an educated opinion on
this decision?

> 
> This looks fine.  All it needs, to be checked in, is a ChangeLog
> entry.  Could you give that a try?

I updated gdb/ChangeLog, gdb/testsuite/ChangeLog and gdb/doc/ChangeLog 
 
> As for how it gets checked in, I can take care of that; or if you
> would like write-after-approval access to the repository, please fill
> out the form from the front page of sourceware.org and list me as
> approving it.

Thanks!  I filled the form.  I gather you should get it soon.

> 
> Except for one small problem :-(  We seem to have skipped a step.  Do
> you have a copyright assignment in place?  I can't find a record of
> it.

What is this?

Marc


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