search for: waterworth

Displaying 12 results from an estimated 12 matches for "waterworth".

2009 Oct 16
3
[LLVMdev] MallocInst/CallInst bitcast,
On Oct 16, 2009, at 4:43 AM, Daniel Waterworth wrote: > Never mind, I used ExecutionEngine's InstallLazyFunctionCreator and > DisableSymbolSearching to cause malloc and free calls to be handled > by my logging functions. Sorry for the unnecessary list mail. No problem, this is a better way to go. The MallocInst and FreeInst...
2009 Oct 16
0
[LLVMdev] MallocInst/CallInst bitcast,
...urn (void *)&a > ptr; } bool FindStackDirection() { volatile int a; return StackCmp((void *)&a); } Preferably one which isn't destroyed by optimization. Thanks again, Daniel 2009/10/16 Chris Lattner <clattner at apple.com> > > On Oct 16, 2009, at 4:43 AM, Daniel Waterworth wrote: > > Never mind, I used ExecutionEngine's InstallLazyFunctionCreator and > DisableSymbolSearching to cause malloc and free calls to be handled by my > logging functions. Sorry for the unnecessary list mail. > > > No problem, this is a better way to go. The MallocInst...
2009 Oct 20
2
[LLVMdev] Dereference PointerType?
Daniel Waterworth <da.waterworth at googlemail.com> writes: [snip] Use the getElementType method of PointerType. >> size_t size; >> if (isa<PointerType>(allocated_type)) { >> size = sizeof(void*) * 8; >> } else { >> size = allocated_type->getPrimitiveSizeInBits();...
2009 Oct 16
0
[LLVMdev] MallocInst/CallInst bitcast,
...calls to be handled by my logging functions. Sorry for the unnecessary list mail. Is it possible to find out the size and beginning pointer of the current stack frame, from a function operating outside of the virtual machine, but called by a function within it? Thanks, Daniel 2009/10/16 Daniel Waterworth <da.waterworth at googlemail.com> > Hello, > > I'm writing a virtual machine that functions as a sandbox based on llvm. In > order to prevent programs from accessing memory that has not been allocated > to them, I want to replace calls to malloc and free with calls to a lo...
2009 Oct 20
4
[LLVMdev] Dereference PointerType?
...i32**, dereferenced it becomes a type i32* and ; the size of that is sizeof(void *) bytes Having said that I am looking at the target data getTypeAllocSize method. Daniel 2009/10/20 Duncan Sands <baldrick at free.fr> > Óscar Fuentes wrote: > >> Daniel Waterworth <da.waterworth at googlemail.com> writes: >> >> [snip] >> >> Use the getElementType method of PointerType. >> >> size_t size; >>>> if (isa<PointerType>(allocated_type)) { >>>> size = sizeof(void*) * 8; >>>> } else...
2009 Oct 16
2
[LLVMdev] MallocInst/CallInst bitcast,
Hello, I'm writing a virtual machine that functions as a sandbox based on llvm. In order to prevent programs from accessing memory that has not been allocated to them, I want to replace calls to malloc and free with calls to a logged functions that will record the memory that is being allocated to the program. Is it possible to cast/convert a MallocInst or FreeInst to a CallInst? Thanks,
2009 Oct 20
0
[LLVMdev] Dereference PointerType?
2009/10/20 Daniel Waterworth <da.waterworth at googlemail.com> > Hello, > > I'm wondering if it's possible to dereference a PointerType. I have an > AllocaInst and although I can find the number of elements allocated, (using > Instruction::getOperand(0)), I can't find a way to get the size of...
2009 Oct 20
0
[LLVMdev] Dereference PointerType?
Óscar Fuentes wrote: > Daniel Waterworth <da.waterworth at googlemail.com> writes: > > [snip] > > Use the getElementType method of PointerType. > >>> size_t size; >>> if (isa<PointerType>(allocated_type)) { >>> size = sizeof(void*) * 8; >>> } else { >>> size =...
2009 Oct 20
0
[LLVMdev] Dereference PointerType?
Daniel Waterworth <da.waterworth at googlemail.com> writes: > It may not be the best way to do what I'm trying to do, but it's not useless > and bogus. Consider the following: > > %1 = alloca i32* ; %1 is of type i32**, dereferenced it becomes a type i32* > and >...
2009 Oct 20
3
[LLVMdev] Dereference PointerType?
Hello, I'm wondering if it's possible to dereference a PointerType. I have an AllocaInst and although I can find the number of elements allocated, (using Instruction::getOperand(0)), I can't find a way to get the size of each element. What I'd like to do is: AllocaInst *alloca; PointerType *ptr_type = dynamic_cast<PointerType*>(alloca); assert(ptr_type); Type
2009 Oct 16
1
[LLVMdev] MallocInst/CallInst bitcast,
Daniel Waterworth skrev: > Thanks very much. I only have one more question, (hopefully), which > is, is there a better way of finding the direction of stack growth > other than: > > static bool StackCmp(void *ptr) { > volatile int a; > return (void *)&a > ptr; > } > > bool...
2009 Oct 14
3
[LLVMdev] building llvm-gcc/llvm-g++
...ry to build with this however it won't accept the --emit-llvm option with the error message: xgcc: --emit-llvm is not supported in this configuration. What option should I change in the configure command to get it to build in such a way that "--emit-llvm" will work? Thanks, Daniel Waterworth -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091014/34fed8e5/attachment.html>