[Bug,libdw/30967] Discriminator in Dwarf_Line_s may exceed 24 bits
Commit Message
https://sourceware.org/bugzilla/show_bug.cgi?id=30967
--- Comment #6 from Mark Wielaard <mark at klomp dot org> ---
So my preferred workaround:
SET (file);
@@ -140,7 +146,7 @@ add_new_line (struct line_state *state, struct linelist
*new_line)
SET (prologue_end);
SET (epilogue_begin);
SET (isa);
- SET (discriminator);
+ SETX (discriminator);
SET (context);
SET (function_name);
https://code.wildebeest.org/git/user/mjw/elfutils/commit/?h=really-large-disc
@@ -129,6 +129,12 @@ add_new_line (struct line_state *state, struct linelist
*new_line)
return true; \
} while (0)
+ /* Same as above, but don't flag as "invalid" just use truncated
+ value. Used for discriminator for which llvm might use a value
+ that won't fit 24 bits. */
+#define SETX(field) \
+ new_line->line.field = state->field; \
+
SET (addr);
SET (op_index);