bloombloombloom / Bloom

A debug interface for AVR-based embedded systems development on GNU/Linux.
https://bloom.oscillate.io/
Other
65 stars 4 forks source link

Memory inspection via Bloom Insight #7

Closed navnavnav closed 2 years ago

navnavnav commented 3 years ago

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 commented 2 years ago

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:

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Quick update on this:

I've made some good progress with this.

Bloom Insight_086

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:

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 commented 2 years ago

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