[PATCH] DebugInfo: fix crash with null streamer
Rafael EspĂndola
rafael.espindola at gmail.com
Thu Jun 19 19:03:33 PDT 2014
> With a sufficient change in abstractions it might be possible, though.
>
> Here's the issue (vaguely) as I dabbled with this recently: DWARF line
> table construction is built into the MCStreamer - my understanding is
> that it needs to be at that layer since that's where relaxation
> occurs, so the streamer's the only thing that knows literally how many
> bytes the instruction sequence is (or, in the case of asm output, #
> line directives have to be interspersed with the instruction stream).
> I suppose that's the critical thing to your proposal here: to create
> the line table, information from the MCStreamer is required.
>
> This would be fine for your proposal, but for the wrinkle that the
> rest of DWARF output references the line table too - the files listed
> in the line table are also referenced from debug info to describe the
> file location of the various debug info entities (classes, functions,
> variables, etc). So we need to be able to query for existing file
> numberings, and/or insert new ones (which might later be reused by the
> line table data too).
>
> That's my rough understanding, anyway.
I think in the end the real fix is to fix pr18716. With that fixed the
logic for creating ids can go out of the streamer.
Cheers,
Rafael
More information about the llvm-commits
mailing list