Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "CDT/Archive/EnhancedExpressions"

< CDT‎ | Archive
(Introduction)
m (Jonah.kichwacoders.com moved page CDT/EnhancedExpressions to CDT/Archive/EnhancedExpressions)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Introduction ==
 
  
Currently, the Registers view for CDT/GDB shows all registers in a flat list.  For targets with a large number of  
+
{{warning|Note: The contents of this page refer to design documents reflecting work in progress of Eclipse CDT features and for some features that have never been implemented. Therefore they may not refer to the current state of CDT. }}
registers this is not very user-friendly.  Below is a proposal for a feature that attempts to address this problem.
+
  
== Proposal ==
+
[[Category:CDT:Archive]]
  
I propose to add support pattern-matching within the Expressions view to allow users to easily create groups of registers. For example:
+
Please see [https://wiki.eclipse.org/CDT/User/FAQ#What_are_Enhanced_Expressions.3F this FAQ]
$*  would display all  registers
+
$st[0-5]  would show  $st0, $st1 , ... $st5
+
$*mm[0-1]  would show any registers ending with mm0 or mm1
+
 
+
Note that CDT's Expressions view already allows the user to examine individual registers, so this feature would only introduce the pattern matching support.
+
 
+
Regular Expressions are very powerful but not always easy to quickly use.  I suggest we instead support glob-patterns.  Glob-patterns are simpler than full regular experssions, and are the patterns used in command-shell pattern matching ( * ? [] ).  They are more user-friendly that regex and would provide enough flexibility for what we are trying to achieve.  Details on glob patterns can be found in [http://www.kernel.org/doc/man-pages/online/pages/man7/glob.7.html The Linux Glob man page] and in [http://en.wikipedia.org/wiki/Glob_(programming) Wikipedia]
+
 
+
Below are screenshots of a prototype I have implemented.  It would need some cleanup, but it shows
+
how the feature would be used.
+
 
+
 
+
[[Image:CDT_GlobExp2.png]]
+
 
+
 
+
The user would simply type the glob-expression in the "Add new expression" box as she would for any other expression.  That pattern will be detected and all matching registers will be shown as children of the glob-expression.
+
 
+
[[Image:CDT_GlobExp1.png]]
+
 
+
 
+
Although this feature is focusing on registers (only expressions starting with $  will allow glob-patterns) it may be a nice enhancement to extend this to other expressions.  If that was also supported, a user could do such things as create an expression 'myArray[20-120] to only show subset of an array; many other examples can be imagined as well.  With this in mind, the prototype does allow for the expression: *  In this case, all local variables will be shown in the Expressions view.  This gives the Expressions view the ability to behave as the variables view does, following the current Debug view selection.
+
 
+
 
+
[[Image:CDT_GlobExp3.png]]
+
 
+
Furthermore, with the use of view cloning, the user can clone the Enhanced Expressions view one or more times, to allow to look at different sets of expressions/registers and position them anywhere on the screen:
+
 
+
 
+
[[Image:CDT_GlobExp4.png]]
+

Latest revision as of 14:57, 22 January 2020

Warning2.png
Note: The contents of this page refer to design documents reflecting work in progress of Eclipse CDT features and for some features that have never been implemented. Therefore they may not refer to the current state of CDT.

Please see this FAQ

Back to the top