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

MIEngine: Array evaluation and address check #1427

Merged

Conversation

intel-rganesh
Copy link
Contributor

@intel-rganesh intel-rganesh commented Nov 20, 2023

Issue description & fix:

Issue 1
When the address is not an AD7Memory address, we get a null reference exception while assigning puCodeLocationId.
image

Fix
The fix is to add a null reference check for this condition.

Issue 2
We would like to evaluate array addresses in Memory View. This was not possible without evaluating without an address operator.
image

Fix
For variable information value that looks like [], re-evaluate with address operator.
image
image

With this change we can evaluate an array address.
image

Signed-off-by: intel-rganesh [email protected]

Handle condition where the address is not an AD7MemoryAddress
object.
On running multiple debug engines, it appears this gets called with a
different object type.

Signed-off-by: intel-rganesh [email protected]
Allow direct array eval in memory window.

Signed-off-by: intel-rganesh [email protected]
Copy link
Member

@gregg-miskelly gregg-miskelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good aside from those two small issues. Thanks for sending this!

Address review comments for array evaluation and address check:
1> Use the correct constant in AD7Disassembly when pCodeContext is not
AD7MemoryAddress.
2> Avoid creating new AD7Property to fetch variable information value.

Signed-off-by: intel-rganesh [email protected]
@gregg-miskelly
Copy link
Member

@WardenGnaw have you already investigated what is going on with:

D:\a\MIEngine\MIEngine\obj\Release\SSHDebugPS\UI\ContainerPickerDialogWindow.g.cs(50,18): error CS1504: Source file 'UI\ContainerPickerDialogWindow.xaml' could not be opened -- Could not find file. [D:\a\MIEngine\MIEngine\src\SSHDebugPS\SSHDebugPS_cba2tvoo_wpftmp.csproj]

@gregg-miskelly
Copy link
Member

I see. This is what you fixed with #1425. Any reason not to merge that?

@WardenGnaw
Copy link
Member

I see. This is what you fixed with #1425. Any reason not to merge that?

Nope. That PR just got forgotten over the Thanksgiving holidays.

@WardenGnaw WardenGnaw merged commit 9f35772 into microsoft:main Nov 28, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants