search for: intptr_type

Displaying 4 results from an estimated 4 matches for "intptr_type".

2011 Mar 14
2
[LLVMdev] How to load a data from the address of unsiged long type
...astInst to vern): Value* addr = CONST(0xc0008000); a = new BitCastInst(a, PointerType::get(XgetType(Int32Ty), 0), "", bb); Value* data = new LoadInst(addr, "", false, bb); Error: Bitcast requires types of same width 3. Code: Type const *intptr_type = cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX()); Value* ptr = new IntToPtrInst(a, intptr_type, "", bb); Value* data = new LoadInst(ptr, "", false, bb); Error: Segmentation fault Any person can give me some hints...
2011 Mar 26
2
[LLVMdev] How to read memory data througn adress of unsigned long
...truction of ir as the following: ############################ Value* data = new LoadInst(addr, "", false, bb); encounter segmentation fault. ######################## I also try to use IntToPtrInstr to do some transform as the following: ################################ Type const *intptr_type = cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX()); Value* ptr = new IntToPtrInst(v, intptr_type, "", bb); Value* data = new LoadInst(ptr, "", false, bb); ######################################## still encounter segmentation fau...
2011 Mar 14
0
[LLVMdev] How to load a data from the address of unsiged long type
...r = CONST(0xc0008000); > a = new BitCastInst(a, PointerType::get(XgetType(Int32Ty), 0), "", bb); > Value* data = new LoadInst(addr, "", false, bb); > Error: > Bitcast requires types of same width > 3. Code: > Type const *intptr_type = > cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX()); > Value* ptr = new IntToPtrInst(a, intptr_type, "", bb); > Value* data = new LoadInst(ptr, "", false, bb); > Error: > Segmentation fault > &g...
2011 Mar 26
0
[LLVMdev] How to read memory data througn adress of unsigned long
...LLVM so you get an assert message instead of a segfault. Here you're trying to load from an integer without first casting it to a pointer, which you do next. > I also try to use IntToPtrInstr to do some transform as the following: > ################################ >      Type const *intptr_type = > cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX()); >       Value* ptr = new IntToPtrInst(v, intptr_type, "", bb); >       Value* data = new LoadInst(ptr, "", false, bb); >  ######################################## >  still enc...