radareorg/radare2

Support bitfields in `pf` and `t` commands

Open

#12.555 aperta il 24 dic 2018

Vedi su GitHub
 (9 commenti) (0 reazioni) (0 assegnatari)C (3229 fork)batch import
commandenhancementgood first issueinputpftypes

Metriche repository

Star
 (23.826 star)
Metriche merge PR
 (Merge medio 16h 24m) (99 PR mergiate in 30 g)

Descrizione

See http://mjfrazer.org/mjfrazer/bitfields on how to unpack on different endians.

[0x000068c0]> "td struct qwe { int a:4; int b:16; int c:3; };"
[0x000068c0]> ts
qwe
[0x000068c0]> ts qwe
pf ddd a b c
[0x000068c0]> px 4
- offset -   0 1  2 3  4 5  6 7  8 9  A B  C D  E F  0123456789ABCDEF
0x000068c0  f30f 1efa                                ....
[0x000068c0]> tp qwe
 a : 0x000068c0 = 4196274163
 b : 0x000068c4 = 2303323441
 c : 0x000068c8 = 2303221457

Guida contributor