Repository navigation
Show Cd data in binary for ahi b, as for instructions ##disasm - #27400
Open
Thanatos9404 wants to merge 1 commit into
Open
Thanatos9404 wants to merge 1 commit into
Thanatos9404 wants to merge 1 commit into
Conversation
ahi b sets base 2, which is binary for instructions, but Cd data took only 1 as binary, from when ahi b set 1, so it showed ahi b as hex. Data now takes 2 as binary too. 1, which ahi s sets now, stays binary for data. Reuse buf for the value-order bytes instead of a second buffer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The follow-ups from #27348.
ahi bsets base 2, which instructions show in binary, butCddata took only 1 as binary (from whenahi bset 1), soahi bon a data item printed hex. Data now takes 2 as binary, inpdand in pdj'sopcodeanddisasm, with the same.hexfallback rules as before.Compatibility choice: 1, which
ahi ssets now, stays binary for data, soahi 1keeps printing what it printed before. The string form instructions use forahi s('CBA') has no data equivalent today, and changingahi 1would break existing projects. The new test pinsahi 1andahi sto binary, so changing it later is an explicit decision.Also reuses
buffor the value-order bytes, droppingmsband the case scope. A side effect worth knowing:e asm.imm.base=2now showsCddata in binary too, as it does for instruction immediates.Testing
test/db/cmd/metadata:ahi b, its pdjopcode,ahi 2,ahi 1andahi son a dword. It fails on master.db/cmd/metadata(232),db/cmd/cmd_pdj,db/cmd/cmd_ahianddb/cmd/cmd_pdpass.sys/lint.py --allonly reports the existingfor (intinlibr/bin/p/bin_dyldcache.c:1299.