search for: outstr

Displaying 20 results from an estimated 32 matches for "outstr".

2012 May 31
2
[LLVMdev] DFG of machine functions
...const MCDFGraph<MachineFunction *> &F) { std::string Str; raw_string_ostream OS(Str); if (!Node->getName().empty()) { WriteAsOperand(OS, Node, false); OS << ":\n"; } OS << *Node; std::string OutStr = OS.str(); if (OutStr[0] == '\n') OutStr.erase(OutStr.begin()); // Process string output to make it nicer... for (unsigned i = 0; i != OutStr.length(); ++i) if (OutStr[i] == '\n') { // Left justify OutStr[i] = '\\&...
2012 Jun 02
0
[LLVMdev] DFG of machine functions
...nction *> &F) { > std::string Str; > raw_string_ostream OS(Str); > > if (!Node->getName().empty()) { > WriteAsOperand(OS, Node, false); > OS << ":\n"; > } > > OS << *Node; > std::string OutStr = OS.str(); > if (OutStr[0] == '\n') OutStr.erase(OutStr.begin()); > > // Process string output to make it nicer... > for (unsigned i = 0; i != OutStr.length(); ++i) > if (OutStr[i] == '\n') { // Left justify >...
2020 Apr 15
3
Backend emitting to string instead of file
..., *OS,                                       DwoOut ? &DwoOut->os() : nullptr,                                       FileType, NoVerify, MMIWP)) Now, with this tiny change I was hoping to write to a string instead of the output stream defined by the command line parameters: std::string outStr; raw_string_ostream stream(outStr); buffer_ostream pstream(stream); if (Target->addPassesToEmitFile(PM, pstream,                                     DwoOut ? &DwoOut->os() : nullptr,                                     FileType, NoVerify, MMIWP)) later, e.g., after PM.run(*M), I check...
2009 Sep 07
0
[LLVMdev] Graphviz and LLVM-TV
Edwin, thanks, it starts making sense inline comments... Török Edwin wrote: > On 2009-09-06 19:57, Ioannis Nousias wrote: > >> Edwin, >> >> thank you for your effort, but I'm not sure I understand. >> Are you describing a graph traversal problem? Is the data model stored >> in a predecessor/successor fashion, which requires you to 'walk' the
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
...17 +89,17 @@ _hivex_recode (const char *input_encoding, const char *input, size_t input_len, * storing in the hive file, as needed. */ char* -_hivex_encode_string(const char *str, size_t *size, int *utf16) +_hivex_encode_string (hive_h *h, const char *str, size_t *size, int *utf16) { char* outstr; *utf16 = 0; - outstr = _hivex_recode ("UTF-8", str, strlen(str), - "LATIN1", size); + outstr = _hivex_recode (h, utf8_to_latin1, + str, strlen(str), size); if (outstr != NULL) return outstr; *utf16 = 1; - outstr...
2005 Nov 09
1
Problems with Shapiro Wilk's test of normality.
...j??rnor + if(! is.na(shap)){ + if( shap <= 0.001 ){ + stars <- '***' + }else{ + if( shap <= 0.01 ){ + stars <- '**' + }else{ + if( shap <= 0.05 ){ + stars <- '*' + } + + } + + } + + outstr <- paste(premark,'W=',W,',p=',shap,postmark,stars,sep="") + } + else{ + outstr <- "" + } + + + return(outstr) + + } > > ftable(tapply(aspvotwork$ampratio,list(Place=aspvotwork$Place,Age=aspvotwork$agemF,voicetype=aspvotwork$Type),FUN=&quo...
2019 Aug 16
2
[ORC] [mlir] Dump assembly from OrcJit
...it? I found this thread about MCJIT but nothing specific about OrcJit: http://lists.llvm.org/pipermail/llvm-dev/2014-June/074145.html I’m also aware of the alternative approach below, but I’m not sure if the output will be the same as the assembly generated by OrcJit. Probably not. std::string outStr; { llvm::legacy::PassManager pm; llvm::raw_string_ostream stream(outStr); llvm::buffer_ostream pstream(stream); targetMachine->addPassesToEmitFile(pm, pstream, nullptr, llvm::TargetMachine::CGFT_AssemblyFile); pm.run(*m);...
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
...har *input_encoding, const char *input, size_t input_len, > * storing in the hive file, as needed. > */ > char* > -_hivex_encode_string(const char *str, size_t *size, int *utf16) > +_hivex_encode_string (hive_h *h, const char *str, size_t *size, int *utf16) > { > char* outstr; > *utf16 = 0; > - outstr = _hivex_recode ("UTF-8", str, strlen(str), > - "LATIN1", size); > + outstr = _hivex_recode (h, utf8_to_latin1, > + str, strlen(str), size); > if (outstr != NULL) > retu...
2009 Sep 06
3
[LLVMdev] Graphviz and LLVM-TV
On 2009-09-06 19:57, Ioannis Nousias wrote: > Edwin, > > thank you for your effort, but I'm not sure I understand. > Are you describing a graph traversal problem? Is the data model stored > in a predecessor/successor fashion, which requires you to 'walk' the > graph in order to visit all nodes? (and what happens when you have > disjointed DFGs?). Sorry for the
2018 Feb 09
2
[PATCH] Add a cache for iconv_t handles to hive_t
...17 +89,17 @@ _hivex_recode (const char *input_encoding, const char *input, size_t input_len, * storing in the hive file, as needed. */ char* -_hivex_encode_string(const char *str, size_t *size, int *utf16) +_hivex_encode_string (hive_h *h, const char *str, size_t *size, int *utf16) { char* outstr; *utf16 = 0; - outstr = _hivex_recode ("UTF-8", str, strlen(str), - "LATIN1", size); + outstr = _hivex_recode (h, utf8_to_latin1, + str, strlen(str), size); if (outstr != NULL) return outstr; *utf16 = 1; - outstr...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Handle embedded NULs correctly in printf
...nces valid in the format string */ str = conv_escape(str - 1, &c); ch = c; - } while (STPUTC(ch, cp), (char)ch); + } while (STPUTC(c, cp), (char)ch); + + *sp = cp; return ch; } @@ -462,8 +507,7 @@ echocmd(int argc, char **argv) do { int c; - nonl += conv_escape_str(*argv); - outstr(stackblock(), outs); + nonl += print_escape_str("%s", NULL, NULL, *argv); if (nonl > 0) break; diff --git a/usr/dash/output.c b/usr/dash/output.c index f62e7eab..1b20850a 100644 --- a/usr/dash/output.c +++ b/usr/dash/output.c @@ -99,9 +99,6 @@ struct output *out1 = &outpu...
2013 Nov 24
4
[PATCH 1/3] lib: Further generalize iconv wrapper function.
--- lib/hivex-internal.h | 8 +++++--- lib/utf16.c | 11 +++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h index 4135f58..64fd49a 100644 --- a/lib/hivex-internal.h +++ b/lib/hivex-internal.h @@ -268,11 +268,13 @@ extern size_t * _hivex_return_offset_list (offset_list *list); extern void _hivex_print_offset_list
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Handle embedded NULs correctly in printf
...nces valid in the format string */ str = conv_escape(str - 1, &c); ch = c; - } while (STPUTC(ch, cp), (char)ch); + } while (STPUTC(c, cp), (char)ch); + + *sp = cp; return ch; } @@ -462,8 +507,7 @@ echocmd(int argc, char **argv) do { int c; - nonl += conv_escape_str(*argv); - outstr(stackblock(), outs); + nonl += print_escape_str("%s", NULL, NULL, *argv); if (nonl > 0) break; diff --git a/usr/dash/output.c b/usr/dash/output.c index bb7c6ada..6618cc33 100644 --- a/usr/dash/output.c +++ b/usr/dash/output.c @@ -99,9 +99,6 @@ struct output *out1 = &outpu...
2011 Dec 19
3
[LLVMdev] Disassembly arbitrary machine-code byte arrays
...n * the parameter DC. The bytes of the instruction are specified in the * parameter Bytes, and contains at least BytesSize number of bytes. The * instruction is at the address specified by the PC parameter. If a valid * instruction can be disassembled, its string is returned indirectly in * OutString whose size is specified in the parameter OutStringSize. This * function returns the number of bytes in the instruction or zero if there was * no valid instruction. */ size_t LLVMDisasmInstruction(LLVMDisasmContextRef DC, uint8_t *Bytes, uint64_t BytesSize, uint64...
2017 Feb 21
0
[PATCH 3/3] dib: rename "aux" to "in_target.aux"
..."/tmp/in_target.aux/hooks/" ^ hook_name in let scripts = List.sort digit_prefix_compare scripts in let outbuf = Buffer.create 16384 in let timings = Hashtbl.create 13 in @@ -393,11 +393,11 @@ let run_parts ~debug ~sysroot ~blockdev ~log_file ?(new_wd = "") let outstr = match sysroot with | In -> - g#sh (sprintf "/tmp/aux/run-and-log.sh '%s' '' '' '%s' '%s' '%s' '%s'" log_file blockdev hook_dir new_wd x) + g#sh (sprintf "/tmp/in_target.aux/run-an...
2005 Oct 16
2
[LLVMdev] Help on LLVM Instrumentation
Hi , I am using LLVM for my Post Graduate course project on Optimization. I am trying to do some insrtumentation to the bytecode.I 've been going through your Instrumentation code for the past few days in /llvm/lib/Transforms/Instrumentation folder and finally found two ways of instrumentation : 1) injecting LLVM bytecode instructions 2) calling an external C function. I am trying both and
2017 Feb 21
3
[PATCH 1/3] dib: unset all temporary dirs envvars in fake-sudo
The real sudo does it as well, and leaving them when preserving the environment (-E) maybe breaks the applications, as e.g. chroot will have a TMPDIR path pointing outside of it. --- dib/dib.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dib/dib.ml b/dib/dib.ml index df83ba1..d15cd19 100644 --- a/dib/dib.ml +++ b/dib/dib.ml @@ -301,6 +301,11 @@ if [ -z \"$preserve_env\" ];
2011 Dec 20
0
[LLVMdev] Disassembly arbitrary machine-code byte arrays
...C.  The bytes of the instruction are specified in the >  * parameter Bytes, and contains at least BytesSize number of bytes.  The >  * instruction is at the address specified by the PC parameter.  If a valid >  * instruction can be disassembled, its string is returned indirectly in >  * OutString whose size is specified in the parameter OutStringSize.  This >  * function returns the number of bytes in the instruction or zero if there was >  * no valid instruction. >  */ > size_t LLVMDisasmInstruction(LLVMDisasmContextRef DC, uint8_t *Bytes, >                             ui...
2011 Dec 19
0
[LLVMdev] Disassembly arbitrary machine-code byte arrays
Hi Aiden, The easiest thing I can do is to point you to the source of the "llvm-mc" tool, which does exactly what you ask in its "-disassemble" mode. The code is rather small, so it should be easy to work out. tools/llvm-mc Cheers, James -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Aidan Steele Sent:
2011 Dec 19
2
[LLVMdev] Disassembly arbitrary machine-code byte arrays
Hi, My apologies if this appears to be a very trivial question -- I have tried to solve this on my own and I am stuck. Any assistance that could be provided would be immensely appreciated. What is the absolute bare minimum that I need to do to disassemble an array of, say, ARM machine code bytes? Or an array of Thumb machine code bytes? For example, I might have an array of unsigned chars -- how