Commit e105e9d3 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Check that we don't add same line number twice.

This happens (at least) in dwarf debug info where there could be two entries with same source file and line number, but different column numbers (and we don't store columns). Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 27b7a96d
......@@ -418,6 +418,11 @@ void symt_add_func_line(struct module* module, struct symt_function* func,
}
vlen = vector_length(&func->vlines);
prev = vlen ? vector_at(&func->vlines, vlen - 1) : NULL;
if (last_matches && prev && addr == prev->u.address)
{
WARN("Duplicate addition of line number in %s\n", func->hash_elt.name);
return;
}
if (!last_matches)
{
/* we shouldn't have line changes on first line of function */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment