Replacing symt_get_inlinesite_depth() with SymAddrIncludeInlineTrace()
as they look very (very) similar.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
In PDB debug information, compiland's pathname is stored twice:
- both refer to the same file, but with variations in path handling
(eg: one could be foo1\foo2\bar.obj and the other
foo1\deadbeef\..\foo2\bar.obj)
Use same pathname string as native when storing compiland's pathname
(it eases comparison of dumps between the two).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
This op is heavily used by clang with PDB debug info, while
MSVC barely uses it.
This fixes a bunch of problems when loading PDB files generated
by clang (eg. the PDB files from wine-gecko).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Basically:
- extending symt_function to enable storage of multiple address ranges
- symt_function and sym_inlinesite now share the same fields, so
get rid to the later.
Note that only the first range of a top level function is actually
stored and used (even if the structure allows for more).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Instead of silently leaking no longer used chunks.
Be more robust to OOM conditions.
Introducing pool_realloc().
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
In some 32bit modules, MingW/GCC generates in Dwarf debug information,
a cfa address to be computed as:
deref(register XX + offset)
which is too complicated to be expressed through regular DbgHelp APIs.
So silence the FIXME, and report a 'too complex' error (instead of
'internal').
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52790
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
- split in two sub helpers (one to get size, the other to fill content in)
(this avoids reallocating buffer)
- return error in case no range is present (but range dwarf attribute is)
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Partly reverting 99eb63bd7a
(it's still needed on Dwarf for blocks with multiple
non-contiguous address ranges).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
We have dups in global / file static variables definition:
- between compiland stream and global (DBI) stream
(we need to de-dup these)
- still adding variables only present global DBI stream
- keeping in mind, we need to keep:
+ two variables of different names at same address (aliasing)
+ variables of same name at different addresses
(MS linker generate those)
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Only load records that are listed in global hash file when handling
the global symbol stream.
Do the same thing for the public symbols.
When using MS linker in incremental mode:
- old variable definitions are kept in the (DBI) global symbol stream
along side the new definition
- but only the latest (valid) definition is referenced from the hash
table
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Change strategy for resetting local scope when unloading a module.
Old strategy was keeping the local scoped symbol alive on some code path when
unloading a module.
This caused some bad behavior as we kept a pointer to a deleted object.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
When using an inline context which depth points towards the top level function
(so when it's not strictly speaking an inline context), native falls
back to picking information in the top level function.
So we do now in SymSetScopeFromInlineContext() and SymFromInlineContext()
(instead of returning an error).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>