mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 05:40:10 +00:00
Add NSString and size_t types in tcc+r2 ##types
This commit is contained in:
parent
7ff47d73be
commit
77bd3eb05e
@ -209,3 +209,15 @@ func.recvfrom.arg.1=void *,buffer
|
||||
func.recvfrom.arg.2=size_t,length
|
||||
func.recvfrom.arg.3=int,flags
|
||||
func.recvfrom.ret=ssize_t
|
||||
|
||||
NSString=struct
|
||||
struct.NSString=p0,p1,str,len
|
||||
struct.NSString.!size=256
|
||||
struct.NSString.p0=void *,0,0
|
||||
struct.NSString.p0.meta=4
|
||||
struct.NSString.p1=size_t,0,0
|
||||
struct.NSString.p1.meta=4
|
||||
struct.NSString.len=int,0,0
|
||||
struct.NSString.len.meta=4
|
||||
struct.NSString.str=char *,0,0
|
||||
struct.NSString.str.meta=4
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* radare - LGPL - Copyright 2015-2018 - inisider */
|
||||
/* radare - LGPL - Copyright 2015-2020 - inisider, pancake */
|
||||
|
||||
#include "../../i/private.h"
|
||||
#include "mach0_classes.h"
|
||||
|
@ -577,6 +577,7 @@ typedef struct r_bin_field_t {
|
||||
ut64 vaddr;
|
||||
ut64 paddr;
|
||||
int size;
|
||||
int offset;
|
||||
ut32 visibility;
|
||||
char *name;
|
||||
char *type;
|
||||
|
@ -553,6 +553,11 @@ LIBTCCAPI TCCState *tcc_new(const char *arch, int bits, const char *os)
|
||||
tcc_define_symbol (s, "ut16", "uint16_t");
|
||||
tcc_define_symbol (s, "ut32", "uint32_t");
|
||||
tcc_define_symbol (s, "ut64", "uint64_t");
|
||||
if (bits == 64) {
|
||||
tcc_define_symbol (s, "ut64", "size_t");
|
||||
} else {
|
||||
tcc_define_symbol (s, "ut32", "size_t");
|
||||
}
|
||||
|
||||
tcc_define_symbol (s, "st8", "int8_t");
|
||||
tcc_define_symbol (s, "st16", "int16_t");
|
||||
|
Loading…
Reference in New Issue
Block a user