Comments (8)
I am planning on adding global/static variable scopes. Once I finish up the refactoring work I am currently doing (hoping that will all be finished today).
I do have a few reasons why I am not currently keen on the idea of moving the registers and (particularly) peripheral data into this view:
- With the variables view I am limited in the ways I can present the values; for example on fields that define enumerations I present both the raw value, as well as the enumeration value.
- Limited to how I can accept input for editing values; in the case of fields with enumerations I present a pick-list with the appropriate values.
- Unable to restrict editing attempts on read-only registers at the UI (they would of course fail).
(ST’s SVD files are a bit lacklustre, so you may not see the advantages of the enumerations support as they probably don'thave any; I also plan to at some point make my own enhanced versions for some of the ST parts I use regularly)
This is not to say the variables view doesn’t have advantages as well (in particular the fonts/formatting is a bit nicer than what can currently be done in the custom views).
The custom views system is still fairly new to Visual Studio Code, and while it is somewhat limited currently, I do feel that it will be improved in the future. I do plan on making feature requests (and time permitting, pull requests) to enhance the capabilities of those views so that I can get the presentation I would truly like to achieve in those views.
While I’m not saying this is a definite no forever, I will not be making this change currently.
from cortex-debug.
The Global/Static Variables will likely take a bit longer to deal with than I originally expected.
The GDB MI doesn't have a convenient way to access a list of global/static variables (there used to be a -symbol-list-variables command - as an equivalent to info variables; this has been removed from modern versions of the GDB MI with no replacement).
This will likely result in having to use the regular info variables command and parsing the human readable output; another option will be parsing output from objdump to find the symbols, this may be easier to implement as I already have some code for parsing objdump output as I'm using it to support some basic profiling through the SWO output.
While I do still plan to implement this, I will likely delay it from right away, as it is still possible to access global variables if you need it via a watch (although certainly not as conveniently as if they were a scope in the main variables view).
from cortex-debug.
Hi Marus, thanks for the explanation. Yeah, I guess enumeration could be tricky on the Variable view. One way it might be able to work is to display an error message informing invalid input, and list valid values. And for read-only values just silently ignore value setting. I guess it’s a subjective thing as to which one is better. Being able to select values also sounds good, and I do hope that the customed views support in VSCode will be able to improve.
I’m surprised about the removal of global variable info command from GDB MI. It is stilll somehow in the online documentation. Which version of GDB does it affect?
from cortex-debug.
Yeah - it's more about what I hope I will be able to do in the future - I'm going to be making feature requests (and maybe try implementation myself) for expanding the custom view capabilities. If the VS Code seems receptive to the requests I will likely leave them in separate view - as I do think it has the potential to be better than integrating it with variables (even if it isn't currently). I think giving them a solid example of what I'm trying to do with the custom views helps the case for improving their capabilities (there are already some issues about expanding the view capabilities). If they end up being completely unreceptive - then I may reconsider my position.
Regarding the global variable info command (-symbol-list-variables) it is strange - I can find references to that command in some older versions of the documentation - but it is not in current documentation. From posts I can see online it is unclear to me if a) it was previously implemented and then removed or b) it was planned but never implemented. I expect it is actually b - was planned and documented but never implemented. If it was ever implemented then I expect it must have been dumped when it went from MI1 to MI2 (MI1 was used for GDB 5.1 to 5.3).
I've been experimenting today with the approach of parsing the symbol table from the objdump output (since I already had most of the code for parsing that output already for the profiling support I am working on) - and have a working (although not thoroughly tested yet) globals scope. Still need to add some things to my parsing of the symbol table to associate static variables with their file so I can do a proper statics scope. So hopefully won't be too long to get global and static scopes.
from cortex-debug.
Good work! I’m looking forward to VSCode’s reply. :)
from cortex-debug.
I've got the Static variable scope sorted out as well now; so both the global and static variable scopes will be added in the next release (along with all the cleanup of the structure to better handle the numerous GDB server option - as I ended up adding more options than I originally intended when I started it).
I expect I'll release an update tomorrow or Wednesday with those changes - have a few little bits I need to clean up still - but will be soon. Then I need to write some documentation.
With this new release is out you should make some slight adjustments to your launch.json files (although it will try to map them automatically) - as now they will all be under one type (cortex-debug) with a separate servertype parameter (stutil in your case).
from cortex-debug.
Cool, I'm looking forward to it. 👍
from cortex-debug.
I've published a VSIX file on GitHub (v0.1.10-pre). If you have time you can try it out before I push it up to the marketplace.
from cortex-debug.
Related Issues (20)
- Static variables don't show HOT 4
- `targetId` is marked as invaild by vscode when `request=attach`, but not for `request=launch` HOT 1
- SVD file in config, error during microcontroller initialization FDCAN->ARA being set HOT 2
- Multi-chip debugging on two openocd instances not working HOT 10
- Oversized log files are generated under Linux systems and occupy the /tmp directory. HOT 5
- Change the download command for OpenOCD configurations HOT 1
- Disassembly view showing wrong instructions HOT 13
- Is There have a way to enable intellisense and autocomplete in internal debug console? HOT 1
- View FreeRTOS Queue contents in cortex-debug HOT 1
- "serverpath" ignored when "servertype" set to "external" HOT 3
- Unable to start JLink with VSCOde HOT 5
- Add ThreadX support in XRTOS window HOT 2
- Target HALT after debugger disconnect (STLink with openOCD) HOT 2
- supported cortex-r devices? HOT 1
- Modify the value of a watched live variable without halting the target
- Avoid automatic issue of "monitor" commands to the GDB server HOT 2
- serverArgs are put in quotes HOT 2
- cortex debug doesn't launch gdb HOT 1
- Cannot modify variables while debugging HOT 4
- Add VScode 1.70 support HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cortex-debug.