search for: writetofile

Displaying 15 results from an estimated 15 matches for "writetofile".

2008 Nov 18
1
[LLVMdev] Writing instructions to file
Hello all, I am instrumenting the code such that I write the results of some instructions to file. As you can see below, I am writing the results of add instruction to the file. The IR generated for writeToFile is also posted below. My problem is that it is writing to the file in format bytes and it is not human-readable. How do I make it write human readable strings to the file? define i32 @add(i32 %a, i32 %b) nounwind { entry: %tmp3 = add i32 %b, %a ; <i32> [#uses=2] alloca i32 ; <i32*&g...
2005 Jun 01
1
saving in Tiger (Mac users)
...ommunity and have been playing with the program for about a month. Last week I switched my operating system to Tiger (Mac OS 10.4). Since then (I think) I have been unable to save scripts and get a message as follows in the R console: 2005-06-01 15:27:10.152 R[203] *** -[NSBigMutableString writeToFile:options:error:]: selector not recognized [self = 0x6843d30] 2005-06-01 15:27:10.174 R[203] *** NSTimer discarding exception '*** - [NSBigMutableString writeToFile:options:error:]: selector not recognized [self = 0x6843d30]' that raised during firing of timer with target 11cc230 and sel...
2008 Nov 16
1
[LLVMdev] How do I get the result of an instruction?
Hi, I am writing an optimization pass where I need to instrument the code such that I need to store the results of some instructions in file. Using llc -march=cpp option I figured out how to add a function(say writeToFile) which takes char* parameter and writes to file. Now, I need put in a CallInst which calls writeToFile passing the Instruction result as parameter. How do I do this? So, in my optimization pass... Func *myprint = makewriteToFile() //creates a function which writes to file for (Function::iterator...
2008 Nov 17
2
[LLVMdev] Assertion `castIsValid(getOpcode(), S, Ty) && "Illegal BitCast"' failed.
...nan > <bhavi63 at yahoo.com> wrote: > > Hi, > > > > I am writing an optimization pass where I need to > instrument the code such that I need to store the results of > some instructions in file. Using llc -march=cpp option I > figured out how to add a function(say writeToFile) which > takes char* parameter and writes to file. Now, I need put in > a CallInst which calls writeToFile passing the Instruction > result as parameter. How do I do this? > > > > So, in my optimization pass... > > Func *myprint = makewriteToFile() //creates a function &g...
2008 Nov 17
0
[LLVMdev] Assertion `InReg && "Value not in map!"' failed
ok 1 last question for the day... I created a function in C. void writeToFile(char *str) { FILE *f; if((f=fopen("example","a"))==NULL){ printf("could not open file"); } else{ fprintf(f,str); fclose(f);} } used this to create .bc then using llc -march=cpp I got the cpp code to create this function. While instrumenting my code, I place ca...
2008 Nov 17
1
[LLVMdev] Assertion `InReg && "Value not in map!"' failed
...> >>> > >>> I am writing an optimization pass where I need > to > >> instrument the code such that I need to store the > results of > >> some instructions in file. Using llc -march=cpp > option I > >> figured out how to add a function(say writeToFile) > which > >> takes char* parameter and writes to file. Now, I > need put in > >> a CallInst which calls writeToFile passing the > Instruction > >> result as parameter. How do I do this? > >>> So, in my optimization pass... > >>> Func *myp...
2008 Nov 17
1
[LLVMdev] Assertion `InReg && "Value not in map!"' failed
...> where I need > >> to > >>>> instrument the code such that I need to > store the > >> results of > >>>> some instructions in file. Using llc > -march=cpp > >> option I > >>>> figured out how to add a function(say > writeToFile) > >> which > >>>> takes char* parameter and writes to file. > Now, I > >> need put in > >>>> a CallInst which calls writeToFile passing > the > >> Instruction > >>>> result as parameter. How do I do this? > >>&g...
2008 Nov 16
0
[LLVMdev] How do I get the result of an instruction?
On Sat, Nov 15, 2008 at 3:58 PM, bhavani krishnan <bhavi63 at yahoo.com> wrote: > Thanks! > > How do I cast the result to a string? I basically need to store the results of some instructions in a file. If you're confused about how the IR works, http://llvm.org/demo/ can be useful. The question you're asking doesn't really seem to make sense. -Eli
2008 Nov 17
0
[LLVMdev] How do I get the result of an instruction?
...nan > <bhavi63 at yahoo.com> wrote: > > Hi, > > > > I am writing an optimization pass where I need to > instrument the code such that I need to store the results of > some instructions in file. Using llc -march=cpp option I > figured out how to add a function(say writeToFile) which > takes char* parameter and writes to file. Now, I need put in > a CallInst which calls writeToFile passing the Instruction > result as parameter. How do I do this? > > > > So, in my optimization pass... > > Func *myprint = makewriteToFile() //creates a function &g...
2008 Nov 17
1
[LLVMdev] How do I get the result of an instruction?
...ote: > > > Hi, > > > > > > I am writing an optimization pass where I need to > > instrument the code such that I need to store the > results of > > some instructions in file. Using llc -march=cpp option > I > > figured out how to add a function(say writeToFile) > which > > takes char* parameter and writes to file. Now, I need > put in > > a CallInst which calls writeToFile passing the > Instruction > > result as parameter. How do I do this? > > > > > > So, in my optimization pass... > > > Func *myprin...
2008 Nov 15
2
[LLVMdev] How do I get the result of an instruction?
Thanks! How do I cast the result to a string? I basically need to store the results of some instructions in a file. Thanks, Bhavani --- On Sun, 11/16/08, John Criswell <criswell at uiuc.edu> wrote: > From: John Criswell <criswell at uiuc.edu> > Subject: Re: [LLVMdev] How do I get the result of an instruction? > To: "bhavi63 at yahoo.com" <bhavi63 at
2012 Feb 25
0
Speex-with-header-byte and Google ASR
..., &quality); int vbr = 1; speex_encoder_ctl(encoder_state_, SPEEX_SET_VBR, &vbr); memset(encoded_frame_data_, 0, sizeof(encoded_frame_data_)); } SpeexRecorder::~SpeexRecorder() { speex_bits_destroy(&bits_); speex_encoder_destroy(encoder_state_); } void SpeexRecorder::WriteToFile(int16 * buf, int count) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; count -= (count % samples_per_frame_); for (int i = 0; i < count; i += samples_per_frame_) { speex_encode_int(encoder_state_, (spx_int16_t*)buf, &bits_); int frame_length = speex_bits_write(&bit...
2012 Feb 25
0
Speex-with-header-byte and Google ASR
...ALITY, &quality); int vbr = 1; speex_encoder_ctl(encoder_state_, SPEEX_SET_VBR, &vbr); memset(encoded_frame_data_, 0, sizeof(encoded_frame_data_)); } SpeexRecorder::~SpeexRecorder() { speex_bits_destroy(&bits_); speex_encoder_destroy(encoder_state_); } void SpeexRecorder::WriteToFile(int16 * buf, int count) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; count -= (count % samples_per_frame_); for (int i = 0; i < count; i += samples_per_frame_) { speex_encode_int(encoder_state_, (spx_int16_t*)buf, &bits_); int frame_length = speex_bits_write(&bit...
2015 Aug 11
3
libfuzzer questions
First off, thanks -- this is a pretty great library and it feels like I'm learning a lot. I'm getting some more experience with libfuzzer and finding that I have a couple of questions: - How does libfuzzer decide to write a new test file? What distinguishes this one from all the other cases for which new test inputs were not written? Must be something about the path taken through the
2015 Aug 11
3
libfuzzer questions
...000000005562be in std::__1::basic_filebuf<char, std::__1::char_traits<char> >::basic_filebuf (this=0x7fffd956b268) #15 0x00000000005409e5 in basic_ofstream (this=0x7fffd956b260, __s=..., __mode=16) at /home/brian/tmp/testing/testing_install/bin/../include/c++/v1/fstream:1166 #16 fuzzer::WriteToFile (U=..., Path=...) at /home/brian/tmp/testing/llvm_src//llvm/lib/Fuzzer/FuzzerIO.cpp:69 #17 0x0000000000579636 in fuzzer::Fuzzer::WriteToCrash (this=0x7fffd956f440, U=..., Prefix=0x1435ec0 <.str.11> "timeout-") #18 0x000000000057a89a in fuzzer::Fuzzer::AlarmCallback (this=0x7fffd956f...