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 1/4] Basic c++ification of varobj


On 2017-11-21 16:30, Yao Qi wrote:
On 17-11-18 16:46:03, Simon Marchi wrote:

   /* If 1, the -var-update always recomputes the value in the
      current thread and frame.  Otherwise, variable object is
      always updated in the specific scope/thread/frame.  */
-  int floating;
+  int floating = 0;

/* Flag that indicates validity: set to 0 when this varobj_root refers
      to symbols that do not exist anymore.  */
-  int is_valid;
+  int is_valid = 1;

Since we do the change, can we change these fields to bool?

To keep patches simple, I'll do that in another patch on top of that series. There are more places we can change variables to bool, so I'll make a pass on the whole varobj.c/h.

@@ -114,27 +113,27 @@ struct varobj_dynamic
used to decide if dynamic varobj should recompute their children.
      In the event that the frontend never asked for the children, we
      can avoid that.  */
-  int children_requested;
+  int children_requested = 0;


Likewise.  Otherwise, it is good to me.

Thanks!

Simon


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