octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56990] Hover mode for variables in debugger


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #56990] Hover mode for variables in debugger
Date: Sun, 27 Sep 2020 23:04:59 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #4, bug #56990 (project octave):

In the patch, I noticed the following code in the octave_qscintilla
constructor:


  m_symbol_names (m_octave_qobj.get_workspace_model ()->get_symbol_names ()),
  m_symbol_values (m_octave_qobj.get_workspace_model ()->get_symbol_values
()),


The get_symbol_names and get_symbol_values functions return pointers to data
members in the workspace_model class.  When I see code that uses bare pointers
this way, I always wonder whether the pointers will be valid later on when
they are used, or that the object they point to might be modified in one
thread (in the workspace model, for example) while it is being accessed in
another (in the editor, for example).  Maybe that's not possible now, but it
could be that in the future these to parts of the GUI operate in separate
threads?

Instead of storing these pointers, is it possible for the editor to query the
workspace model to get the info when needed?  For example, by emitting a
signal to request the variable and providing a slot to update or display the
tooltip text when the variable info is available?  I admit that I don't fully
understand the way tooltips work, so maybe this is not possible?

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56990>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]