search for: write_hex

Displaying 9 results from an estimated 9 matches for "write_hex".

2012 May 18
2
[LLVMdev] Fixed with hex numbers with raw_ostream
...ings:\n"); style of optional logging, but ran into an issue where I want to dump a table of information. The problem is getting the columns to line up, since the raw_ostream methods write numbers as variable length. I've worked up a patch that adds two new methods to raw_ostream: /// write_hex - Output \arg N as ten char hexadecimal string, including /// 0x prefix (e.g. 0x12345678 or 0x00000001). raw_ostream &write_hex32(uint32_t N); /// write_hex - Output \arg N as 18 char hexadecimal string, including /// 0x prefix (e.g. 0x0123456789abcdef or 0x0000000000000001). raw_ostream...
2009 Aug 04
2
[LLVMdev] Outputting hex in DOUT's
>>How do output hex in DOUT's ? >Please don't use DOUT, please use: > > DEBUG(errs() << stuff); > >instead. Okay, I will modify my code. But how do I do hexadecimal output ? Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090804/6614cf39/attachment.html>
2009 Aug 04
0
[LLVMdev] Outputting hex in DOUT's
..., Aaron Gray wrote: > >>How do output hex in DOUT's ? > > >Please don't use DOUT, please use: > > > > DEBUG(errs() << stuff); > > > >instead. > > Okay, I will modify my code. But how do I do hexadecimal output ? > raw_ostream has a write_hex method. O << "foo: "; O.write_hex(42); ... -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090804/d1e094ac/attachment.html>
2009 Aug 05
0
[LLVMdev] Outputting hex in DOUT's
...A bit redundant perhaps, but it > works. > > In any event, errs() is probably nicer. I'll have to see if I can do some > of > the tricks I did with DOUT in these patches. I think so, but I may be > asking > questions in the future. :) > So I can say DEBUG( err().write_hex(address); err() << "\n"; ); And can I say :- DEBUG( err().write_hex(address) << "\n"; ); does it associate like that ? Sorry I am away from my main computer on a laptop otherwise I would try it :) Aaron > > > -Dave &...
2009 Aug 05
1
[LLVMdev] Outputting hex in DOUT's
On Tue, Aug 4, 2009 at 5:05 PM, Aaron Gray<aaronngray.lists at googlemail.com> wrote: > So I can say > >     DEBUG( err().write_hex(address); err() << "\n"; ); > > And can I say :- > >     DEBUG( err().write_hex(address) << "\n"; ); > > does it associate like that ? Yes. You can also use format objects from llvm/Support/Format.h, as in: -- DEBUG(errs() << format("0x%...
2012 May 18
0
[LLVMdev] Fixed with hex numbers with raw_ostream
...le of optional logging, but ran into an issue where I want to dump a table of information. The problem is getting the columns to line up, since the raw_ostream methods write numbers as variable length. > > I've worked up a patch that adds two new methods to raw_ostream: > > /// write_hex - Output \arg N as ten char hexadecimal string, including > /// 0x prefix (e.g. 0x12345678 or 0x00000001). > raw_ostream &write_hex32(uint32_t N); > > /// write_hex - Output \arg N as 18 char hexadecimal string, including > /// 0x prefix (e.g. 0x0123456789abcdef or 0x00000000000...
2009 Aug 04
3
[LLVMdev] Outputting hex in DOUT's
On Tuesday 04 August 2009 18:24, Chris Lattner wrote: > The big issue is things like this: > > DOUT << foo.getName() << "\n"; > > When -debug is disable and even when assertions are turned off, > foo.getName() is still called. When you use: Yep, that's a problem. > DEBUG(errs() << foo.getName() << "\n"); > > When
2015 Aug 10
2
Bug or expected behavior of APFloat class?
...etActiveBits() <= 16); return (uint16_t) (bits.getZExtValue() & 0xffff); } int main(int argc, char** argv) { APFloat f(APFloat::IEEEhalf); APFloat newF(APFloat::IEEEhalf); f.convertFromString("0.3", APFloat::rmTowardZero); outs() << "f bits: 0x"; outs().write_hex(getBits(f)); outs() << "\n"; assert(getBits(f) == 0x34cc); // Check that if we get the string using FormatPrecision=0 // that this can be used to construct another APFloat of the // same value. std::string fAsString = getString(f); outs() << "f as string: \&...
2013 Feb 06
0
[LLVMdev] [llvm] r174463 - Initial support for DWARF CFI parsing and dumping in LLVM
...UTE_UNUSED dumpDataAux(DataExtractor Data, >> + uint32_t Offset, int Length) { >> + errs() << "DUMP: "; >> + for (int i = 0; i < Length; ++i) { >> + uint8_t c = Data.getU8(&Offset); >> + errs().write_hex(c); errs() << " "; >> + } >> + errs() << "\n"; >> +} >> + >> + >> +void DWARFDebugFrame::parse(DataExtractor Data) { >> + uint32_t Offset = 0; >> + >> + while (Data.isValidOffset(Offset)) { >> + uint3...