search for: dumpopts

Displaying 2 results from an estimated 2 matches for "dumpopts".

2019 Apr 24
2
[DebugInfo] DWARF C API
...FContextRef) ``` then defined some C functions ``` LLVMDWARFContextRef LLVMCreateDWARFContext(LLVMBinaryRef Bin) { std::unique_ptr<DWARFContext> DICtx = DWARFContext::create(*unwrap(Bin)); return wrap(DICtx.release()); } void LLVMPrintDWARFContext(LLVMDWARFContextRef C) { DIDumpOptions DumpOpts; DumpOpts.DumpType = DIDT_DebugInfo; // I only care about the .debug_info section unwrap(C)->dump(outs(), DumpOpts); } ``` However, I got a segfault when trying to dump the LLVMDWARFContextRef using the second function. More precisely, it segfaulted when dumping the attribute of the DWARFDie...
2019 Apr 24
2
[DebugInfo] DWARF C API
...extRef LLVMCreateDWARFContext(LLVMBinaryRef Bin) { > > std::unique_ptr<DWARFContext> DICtx = > DWARFContext::create(*unwrap(Bin)); > > return wrap(DICtx.release()); > > } > > > > void LLVMPrintDWARFContext(LLVMDWARFContextRef C) { > > DIDumpOptions DumpOpts; > > DumpOpts.DumpType = DIDT_DebugInfo; // I only care about the > .debug_info section > > unwrap(C)->dump(outs(), DumpOpts); > > } > > ``` > > However, I got a segfault when trying to dump the LLVMDWARFContextRef > using the second function. More precise...