GithubHelp home page GithubHelp logo

hexview.wpf's Introduction

About Me

I'm a software developer working for Qualcomm on Machine Learning (ML) compilers and ML model performance simulations and projections on Qualcomm hardware. In the past I worked for IBM Canada on the Eclipse OpenJ9 and Eclipse OMR projects as a committer where I was heavily involved in contributing code, reviewing contributions, and open-source community involvement.

My passion is system's level programming and in particular compiler development (static and dynamic), programming languages (design and implementation), machine learning, data science, parallelization, computer graphics, software protection, reverse engineering, and malware analysis.

Contact Me

hexview.wpf's People

Contributors

fjeremic avatar hogflash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hexview.wpf's Issues

some api requirement for embedded

hi,I am using WPF to develop a GUI that aim to Embedded developing

I just want to using some hex grid view to show the memory data

and I am unable to find out any control UI to develop until I meet hexView.wpf

some there are some feature i want

  1. render a virtual memory bin with special address
  2. partial renewal because i need to read memory for embedded chips
  3. some api to get the viewable address so that i can read those memory in less
  4. double click to make the ui editable and user can edit the memory, after that,i can rewrite the data edited to chips.

i don't know how to implement because i just a newbie for c# and wpf,

so, could you please evaluate.

thanks

Hex Viewer Selection Range incorrect based on selection direction

Steps to reproduce:

  1. Launch Hex Viewer, select Hexadecimal, Big Endian, 1-byte, view ASCII modes

  2. Set window width so 16 columns are displayed.

  3. Drag select an address range starting with a LOW address to a HIGH address e.g. from 0x0010 to 0x001E. The blue selection range will show from 0x0010 to 0x001E, the last byte in the row is NOT selected.

  4. Observe that the selection range in the status bar is listed as 00000010 - 0000001F which is incorrect, the high address is one too large. The length is indicated as 15 bytes which IS correct.

  5. Now, select a new region from HIGH to LOW range e.g. from 0x001E to 0x0010. The selection will now correctly show the range 0000001E - 00000010 with a length of 15, which is correct.

  6. This same bug manifests for all column sizes, 1,2,4, or 8 and all display modes.

Selected Offset

How to bind the selected offset to MVVM property, or better bind the selected bytes itself.

A few minor fixes & new property's I added

First off, thanks for an excellent control, this is very nicely done & documented! I found the following two bugs which were easily corrected:

  1. verticalScrollBar.LargeChange = MaxVisibleRows; is set before MaxVisibleRows is determined, and thus is zero. I moved this to the UpdateMaxVisibleRowsAndColumns() function, and it appears to work as intended now.

  2. In the function ReadFormattedData() case DataType.FloatingPoint where DataWidth == 8 correctly extracts 8 bytes, but converts them to a single. I think this should be a double.


I also added a few new properties:

  1. DataEndianProperty : This allows specifying big or little endian for the stream. This is implemented using an extension method for the BinaryReader that handles the byte order swaps as needed. I modified the code in the ReadFormattedData to use this property. I also added Big/Little Endian checkbox in the context menu.

  2. AddressDisplayFormatProperty : This configures the address column format allowing various alternate widths and formats, 16, 24, 32, 48 and 64 bit. This just improves readability for the more common small files, if desired. Required a new function GetFormattedAddressText(ulong Addr64) and modification to CalculateAddressColumnCharWidth()


Interestingly, I was able to back-port this to NET Framework 4.0 with minimal issues (mostly namespace changes). This lets me incorporate the control into some older projects! It IS a bit slower, but still performs well.

Now, one more thing I would like to do is programmatically select a block of data based on a start and end address. I'm not seeing any easy way to implement this, do you have any suggestions of how this should be approached?

Thanks, Gary

EDIT:
I WAS able to programmatically select a block; I had accidently specified the same start and end address which results in NO selection! I assume the reason the properties are private is because some validation is desired before externally setting them.

One other item: I added an OnMouseEnter event override that sets the focus to the control. Otherwise, if the control is hosted in a form that can receive focus, the control's keyboard events will be lost and not reconnected once the host takes the focus. Of course, there are other ways to handle this but this works!

Change view offset via binding?

First of all, I love this control!!

I want to be able to move the viewer to a predefined position when I press a button. I thought the Offset dependency property would do the job here:

<Button Command="{Binding JumpToOffsetCommand}"/>
<hv:HexViewer x:Name="hexViewer" DataSource="{Binding MemoryReader}" Offset="{Binding MemoryOffset}"/>
[ObservableProperty]
private long _memoryOffset;

[RelayCommand]
public void JumpToOffset() => MemoryOffset = 0x192;

The command is working and MemoryOffset is firing a property-changed notification as per the Community MVVM Toolkit docs, but the hex viewer doesn't move.

However, if I set the Offset property directly on the control, it works:

hexViewer.Offset = 0x192;

Is there something going on with the OffsetProperty dependency property here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.