The RISC-V people at Berkeley have modified gcc 4.9.2 to target the RISC-V ISA. I have been able to use elftoolchain to parse the output of previous versions of gcc which they have hacked, but not this one. When I try to get the dwarf source lines from ELF they produce, as follows:
int const dwarf_src_res = dwarf_srclines(root_die, &lines, &num_lines, &dwarf_error); . . . fprintf(stderr, "Dwarf_Source_Lines:" "DW_DLE_NO_ENTRY:%d, DW_DLV_OK:%d, " "dwarf_src_res: %d\n", DW_DLE_NO_ENTRY, DW_DLV_OK, dwarf_src_res); . . . dwarf_errmsg(dwarf_error) I get a dwarf_src_res of 1: Dwarf_Source_Lines:DW_DLE_NO_ENTRY:4, DW_DLV_OK:0, dwarf_src_res: 1 And this error message: Line info section too short [_dwarf_lineno_init(335)] However objdump reads and will output the source lines of the same ELF file. Is anyone else getting this result parsing the DWARF source lines coming from, say, unmodified gcc 4.9.2 ? Daniel ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ Elftoolchain-developers mailing list Elftoolchain-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/elftoolchain-developers