Skip to content

feat(chisel): display raw stack values when logging variable #3965

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

Closed
transmissions11 opened this issue Dec 26, 2022 · 3 comments
Closed

feat(chisel): display raw stack values when logging variable #3965

transmissions11 opened this issue Dec 26, 2022 · 3 comments
Labels
T-feature Type: feature

Comments

@transmissions11
Copy link
Contributor

transmissions11 commented Dec 26, 2022

Component

Chisel

Describe the feature you would like

Currently with <32 byte types, their higher order bits aren't shown anywhere except the stackdump. Often when I'm fooling around with assembly I want to see the full in-stack representation of these types (higher order bits and all), so would be great if there was an additional field in the variable output like Raw: 0x1000000000000000000000000000000000000000000000000000000000000002 so we could easily observe these things. Another option would be a !raw [var]-esque command.

Here are some repro cases of higher order bits not being shown.

λ chisel
Welcome to Chisel! Type `!help` to show available commands.

➜ uint16 num = 2;
➜ assembly { num := 0x1000000000000000000000000000000000000000000000000000000000000002 }
➜ num
Type: uint
├ Hex: 0x2
└ Decimal: 2!sd
[0]: 0x1000000000000000000000000000000000000000000000000000000000000002
[1]: 0x33
[2]: 0xc0406226address addy = address(0xBEEF);
➜ assembly { addy := 0x100000000000000000000000000000000000000000000000000000000000beef }
➜ addy
Type: address
└ Data: 0x000000000000000000000000000000000000beef!sd
[0]: 0x100000000000000000000000000000000000000000000000000000000000beef
[1]: 0x33
[2]: 0xc0406226

Additional context

No response

@transmissions11 transmissions11 added the T-feature Type: feature label Dec 26, 2022
@transmissions11
Copy link
Contributor Author

cc @clabby

@clabby
Copy link
Contributor

clabby commented Dec 27, 2022

Should be able to add this in, I like the idea! Would you mind cross-posting any Chisel feature requests to #3743?

@transmissions11
Copy link
Contributor Author

ah yup for sure, apologies i missed the meta issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-feature Type: feature
Projects
None yet
Development

No branches or pull requests

2 participants