Displaying 2 results from an estimated 2 matches for "dumpopt".
Did you mean:
dumpopts
2019 Apr 24
2
[DebugInfo] DWARF C API
...xt, LLVMDWARFContextRef)
```
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...
2019 Apr 24
2
[DebugInfo] DWARF C API
...LVMDWARFContextRef 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....