Skip to content

Commit

Permalink
types: add missing atomic integer types
Browse files Browse the repository at this point in the history
  • Loading branch information
XVilka committed Sep 6, 2024
1 parent fb9d3cc commit a15cebd
Show file tree
Hide file tree
Showing 9 changed files with 230 additions and 56 deletions.
30 changes: 30 additions & 0 deletions librz/arch/types/types-16.sdb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,36 @@ type.id_t=w
type.id_t.size=16
type.id_t.typeclass=Integral

long=type
type.long=d
type.long.size=32
type.long.typeclass=Signed Integral

long int=type
type.long int=d
type.long int.size=32
type.long int.typeclass=Signed Integral

unsigned long=type
type.unsigned long=d
type.unsigned long.size=32
type.unsigned long.typeclass=Unsigned Integral

long unsigned=type
type.long unsigned=d
type.long unsigned.size=32
type.long unsigned.typeclass=Unsigned Integral

unsigned long int=type
type.unsigned long int=d
type.unsigned long int.size=32
type.unsigned long int.typeclass=Unsigned Integral

long unsigned int=type
type.long unsigned int=d
type.long unsigned int.size=32
type.long unsigned int.typeclass=Unsigned Integral

unknown_t=type
type.unknown_t=w
type.unknown_t.size=16
Expand Down
30 changes: 30 additions & 0 deletions librz/arch/types/types-32.sdb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,36 @@ type.id_t=d
type.id_t.size=32
type.id_t.typeclass=Integral

long=type
type.long=d
type.long.size=32
type.long.typeclass=Signed Integral

long int=type
type.long int=d
type.long int.size=32
type.long int.typeclass=Signed Integral

unsigned long=type
type.unsigned long=d
type.unsigned long.size=32
type.unsigned long.typeclass=Unsigned Integral

long unsigned=type
type.long unsigned=d
type.long unsigned.size=32
type.long unsigned.typeclass=Unsigned Integral

unsigned long int=type
type.unsigned long int=d
type.unsigned long int.size=32
type.unsigned long int.typeclass=Unsigned Integral

long unsigned int=type
type.long unsigned int=d
type.long unsigned int.size=32
type.long unsigned int.typeclass=Unsigned Integral

unknown_t=type
type.unknown_t=d
type.unknown_t.size=32
Expand Down
30 changes: 30 additions & 0 deletions librz/arch/types/types-64.sdb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,36 @@ type.id_t=q
type.id_t.size=64
type.id_t.typeclass=Integral

long=type
type.long=q
type.long.size=64
type.long.typeclass=Signed Integral

long int=type
type.long int=q
type.long int.size=64
type.long int.typeclass=Signed Integral

unsigned long=type
type.unsigned long=q
type.unsigned long.size=64
type.unsigned long.typeclass=Unsigned Integral

long unsigned=type
type.long unsigned=q
type.long unsigned.size=64
type.long unsigned.typeclass=Unsigned Integral

unsigned long int=type
type.unsigned long int=q
type.unsigned long int.size=64
type.unsigned long int.typeclass=Unsigned Integral

long unsigned int=type
type.long unsigned int=q
type.long unsigned int.size=64
type.long unsigned int.typeclass=Unsigned Integral

unknown_t=type
type.unknown_t=q
type.unknown_t.size=64
Expand Down
110 changes: 97 additions & 13 deletions librz/arch/types/types-atomic.sdb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ void=type
type.void=
type.void.size=0

_Bool=type
type._Bool=b
type._Bool.size=8

bool=type
type.bool=b
type.bool.size=8
Expand All @@ -16,16 +20,16 @@ type.short=w
type.short.size=16
type.short.typeclass=Signed Integral

short int=type
type.short int=w
type.short int.size=16
type.short int.typeclass=Signed Integral

int=type
type.int=d
type.int.size=32
type.int.typeclass=Signed Integral

long=type
type.long=x
type.long.size=64
type.long.typeclass=Signed Integral

float=type
type.float=f
type.float.size=32
Expand All @@ -36,6 +40,71 @@ type.double=F
type.double.size=64
type.double.typeclass=Floating

signed int=type
type.signed int=i
type.signed int.size=32
type.signed int.typeclass=Signed Integral

signed char=type
type.signed char=b
type.signed char.size=8
type.signed char.typeclass=Signed Integral

signed short=type
type.signed short=w
type.signed short.size=16
type.signed short.typeclass=Signed Integral

signed short int=type
type.signed short int=w
type.signed short int.size=16
type.signed short int.typeclass=Signed Integral

short signed int=type
type.short signed int=w
type.short signed int.size=16
type.short signed int.typeclass=Signed Integral

signed long=type
type.signed long=d
type.signed long.size=32
type.signed long.typeclass=Signed Integral

long unsigned=type
type.long unsigned=d
type.long unsigned.size=32
type.long unsigned.typeclass=Signed Integral

signed long int=type
type.signed long int=d
type.signed long int.size=32
type.signed long int.typeclass=Signed Integral

long signed int=type
type.long signed int=d
type.long signed int.size=32
type.long signed int.typeclass=Signed Integral

signed long long=type
type.signed long long=q
type.signed long long.size=64
type.signed long long.typeclass=Signed Integral

long long signed=type
type.long long signed=q
type.long long signed.size=64
type.long long signed.typeclass=Signed Integral

signed long long int=type
type.signed long long int=q
type.signed long long int.size=64
type.signed long long int.typeclass=Signed Integral

long long signed int=type
type.long long signed int=q
type.long long signed int.size=64
type.long long signed int.typeclass=Signed Integral

unsigned int=type
type.unsigned int=i
type.unsigned int.size=32
Expand All @@ -51,20 +120,35 @@ type.unsigned short=w
type.unsigned short.size=16
type.unsigned short.typeclass=Unsigned Integral

unsigned long=type
type.unsigned long=d
type.unsigned long.size=32
type.unsigned long.typeclass=Unsigned Integral
unsigned short int=type
type.unsigned short int=w
type.unsigned short int.size=16
type.unsigned short int.typeclass=Unsigned Integral

short unsigned int=type
type.short unsigned int=w
type.short unsigned int.size=16
type.short unsigned int.typeclass=Unsigned Integral

unsigned long long=type
type.unsigned long long=q
type.unsigned long long.size=64
type.unsigned long long.typeclass=Unsigned Integral

long int=type
type.long int=x
type.long int.size=64
type.long int.typeclass=Signed Integral
long long unsigned=type
type.long long unsigned=q
type.long long unsigned.size=64
type.long long unsigned.typeclass=Unsigned Integral

unsigned long long int=type
type.unsigned long long int=q
type.unsigned long long int.size=64
type.unsigned long long int.typeclass=Unsigned Integral

long long unsigned int=type
type.long long unsigned int=q
type.long long unsigned int.size=64
type.long long unsigned int.typeclass=Unsigned Integral

long double=type
type.long double=F
Expand Down
4 changes: 2 additions & 2 deletions test/db/analysis/x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -4311,10 +4311,10 @@ arg int64_t arg2 @ rsi
void fcn.00010270(int64_t arg1, int64_t arg2, const char **s, int64_t arg4, int64_t arg5);
var const char *s2 @ stack - 0xc8
var void *s1 @ stack - 0xc0
var uint64_t var_b8h @ stack - 0xb8
var unsigned long long var_b8h @ stack - 0xb8
var int64_t var_b0h @ stack - 0xb0
var int64_t var_a8h @ stack - 0xa8
var uint64_t var_98h @ stack - 0x98
var unsigned long long var_98h @ stack - 0x98
var int64_t var_94h @ stack - 0x94
var int64_t var_90h @ stack - 0x90
var int64_t var_88h @ stack - 0x88
Expand Down
4 changes: 2 additions & 2 deletions test/db/cmd/cmd_open
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pfn~?
ol~?
EOF
EXPECT=<<EOF
41
99
63
121
1
EOF
RUN
Expand Down
4 changes: 2 additions & 2 deletions test/db/cmd/dwarf
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,12 @@ fn1
arg int b origin=DWARF @ rbp-8
arg int a origin=DWARF @ rbp-4
var int arg1 @ rdi
var uintmax_t arg2 @ rsi
var unsigned long long arg2 @ rsi
fn2
arg void *q origin=DWARF @ rbp-8
var float *arg1 @ rdi
main
var uintmax_t var_18h @ stack - 0x18
var unsigned long long var_18h @ stack - 0x18
var int64_t var_ch @ stack - 0xc
EOF
RUN
Expand Down
Loading

0 comments on commit a15cebd

Please sign in to comment.