Open RYDB3RG opened 3 years ago
Thanks for this. That looks like a real bug.
In fact I have a vague memory of having fixed this in some tree or other, but maybe not having pushed it here yet. I'm doing some cleanups this summer which should find that tree if it exists. Though a patch is welcome if you happen to have one ready. If I don't update this issue in the next ~8 weeks, we can assume I don't in fact have a fix currently.
I was looking at the code, trying to fix it
I was wondering if a fix would be to just use initial_result
as final_result
in such case in: https://github.com/stephenrkell/libdwarfpp/blob/master/src/frame.cpp#L776-L787
but then I wasnt sure how to deal with this unfinished_row stuff here: https://github.com/stephenrkell/libdwarfpp/blob/master/src/frame.cpp#L785
As far as I remember, unfinished_row
is just the state left behind by whatever instructions we have processed without moving to a new address. That may be the state from interpreting the CIE instructions, if the FDE ones never advance the program counter.
So maybe the right fix is just to delete the guard if (final_result.rows.size() > 0)
and unconditionally add the final row?
Haven't tried it myself, but I am getting closer....
Hi,
when an FDE contains only the initial instructions from CIE and NOPs otherwise, libdwarfpp's FDE won't contain any rows, but i would have expected the CIE row. Is this expected?
with CIE: