Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory inspection via Bloom Insight #7

Closed
navnavnav opened this issue Sep 29, 2021 · 5 comments
Closed

Memory inspection via Bloom Insight #7

navnavnav opened this issue Sep 29, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request insight component
Milestone

Comments

@navnavnav
Copy link
Member

navnavnav commented Sep 29, 2021

It would be useful to allow developers the ability to inspect that target's memories during a debug session.

Ideally, this would work with the target's EEPROM (where applicable), as well as the internal RAM.

I currently envisage this function to be presented in a similar way to the target registers. More to follow.

@navnavnav navnavnav self-assigned this Sep 29, 2021
@navnavnav navnavnav added the enhancement New feature or request label Sep 29, 2021
@navnavnav
Copy link
Member Author

navnavnav commented Oct 17, 2021

Quick update on this:

Have refactored the panel layout and introduced the new target memory inspection pane widget:

Bloom Insight_075

The pane widget can read target RAM & EEPROM memory via an Insight worker task, though I haven't tested EEPROM just yet. The pane widget is re-sizeable - the byte widgets are re-positioned on resize, along with the adjustment of memory address labels.

On hover, the entire row and column of the hovered byte widget is highlighted, to aide the user in identifying the address of the hovered byte.

Selection_079

In addition to the highlighting, I plan to include an address label below the byte widget container. This label will display the address of the hovered byte.

Like in other areas of the Insight window, byte values are highlighted if they differ from their previously known value.

There is still a fair bit more work to do on this before I'll be happy to release:

  • ASCII view within the hex viewer widget
  • Hovered address label (described above)
  • Highlighting of memory within the stack
  • Memory snapshots
  • Diff viewer of memory snapshots
  • Memory manipulation

I'm moving home in late November, so my time will become even more limited over the coming weeks. I don't see this being ready for release before then, so I'm currently estimating a release for mid-to-late December, as part of version 0.5.0.

As usual, I will post any updates on this ticket as and when necessary.

@navnavnav
Copy link
Member Author

navnavnav commented Oct 30, 2021

Quick update on this:

I haven't made much progress since the last update. I had to rewrite the hex viewer widget, as it turned out using widgets for each byte in the hex viewer was far too taxing. Was resulting in a lag when navigating memories larger than a few KB. I've now switched to using a QGraphicsScene within a QGraphicsView - this is more suitable for rendering a large number of 2D graphical items.

I've made the target package widgets less prominent because they were occupying too much screen estate, and, with all of these new features, we need to prioritise the popular features when allocating screen space. I made the widgets less prominent by simply reducing the fixed size of the pin bodies. I didn't want to reduce the font size for the pin labels, so I added spacing between the labels in a fashion that would prevent the labels appearing to be tightly packed:

Bloom Insight_084

I've also added the hovered address label (see screenshot above).

The next update for this will likely be sometime in late November, or maybe early December.

@navnavnav
Copy link
Member Author

Still working on this. It's been a very busy month. Will post a proper update in the next 1-2 weeks.

Still looking to publish v0.5.0 later this month, but given the current size of this release, and my availability, I've decided to exclude some of the originally planned changes from this release. Specifically, memory manipulation and memory snapshots (with the diff viewer) will be excluded from v0.5.0. This means users will only be able to view memories via the Insight window, in v0.5.0. They won't be able to manipulate or take snapshots of any target memories in this version (but they can still manipulate memory via GDB).
The excluded changes will likely be included in a subsequent release, in 2022. This will make meeting the v0.5.0 release deadline more likely.

I have some time off work for the next two weeks, so I'm hoping to make some better progress with this and to post a proper update.

@navnavnav
Copy link
Member Author

Quick update on this:

I've made some good progress with this.

Bloom Insight_086

  • RAM and EEPROM inspection panes ✅
  • Focused memory regions (see below) ✅
  • Excluded memory regions (see below) ✅
  • ASCII view (see below) ✅
  • Go to address ✅
  • Stack memory highlighting in RAM inspection pane ✅
  • Focused memory annotations (including value annotations, see below RE focused regions) ✅
  • Reduced size of target package widget ✅

Focused memory regions

With the region manager, users can now define focused memory regions within their target memories:

Memory Regions - EEPROM_087

Focused regions are annotated in the hex viewer:

image

And if a data type was specified for the region, Bloom will present the current value of the data in the form of a value annotation:

image

The three position regions in the screenshot were configured as integers. The "WiFi SSID" region was configured as an ASCII string.

Points worth noting:

  • Annotations can be toggled on/off via a tool button.
  • Annotations will only be displayed for regions that span no more than a single row in the hex viewer.

Excluded memory regions

Along with focused regions, users can also define excluded regions via the region manager window:

Memory Regions - RAM_088

Data in excluded regions will not be accessed or presented to the user, via the memory inspection pane. It's important to note that this only applies to the memory inspection pane, and not across the entirety of Bloom; other components such as the debug server (GDB) can still access excluded regions.

The inspection pane will present excluded regions as per below:

image

ASCII view in the hex viewer

ASCII view can be activated via a tool button in the hex viewer:

image

Bytes outside of the ASCII range are still displayed but faded out.


Still looking good for publishing this week. Will likely be near the end of the week - Friday -> Sunday. Will be spending most of the week testing and addressing any regressions. The website will also need updating, so that will be looked at this week.

Will close this issue once the release has been published.

@navnavnav
Copy link
Member Author

Version 0.5.0 has just been published. See website (https://bloom.oscillate.io) to download latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request insight component
Development

No branches or pull requests

1 participant