Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I2e383896f948a19dcd5ba07b8e7f60b6de0c5c74
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Thanks to Kai Noda for reporting this.
|
|
|
|
- The reason being that this way, all of the code is exposed all the
time, which should make future refactoring easier. There's nothing
that needs hiding, no system-specific constants or such.
|
|
|
|
- One bug was in a function that returned a small structure and whose
first argument was a pointer that pointed to stack. The old code
assumed that meant that the structure was returned by implicit
reference instead of in registers.
- Another was in passing large HFA's (larger than 8 elements) in
arguments, and in returning HFA's.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compilation on PPC32 fails because STACK_FRAME_OVERHEAD is never defined
in arch.h.
Define it to 112 on that platform to restore the same behaviour as
before commit eea4ad2cce289753aaa35b4e0258a76d8f8f367c.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
|
|
- I don't think it makes actual difference, as the only consumer of this
symbol is proc_add_library, and that's not called from proc_clone (the
clone is done by directly iterating the library list). But the code is
more obviously right this way.
|
|
- struct library::dwfl_module was left unitialized after
library_clone. Garbage was kept in, which prevented proper
initialization later, and resulted in segmentation violation.
|
|
Previously I only built the export list when tracing with -l. Since I was using
this export list to resolve aliased symbols in addition to setting breakpoints,
this aliased symbol resolution was only working with -l. I now always build the
export list to make aliased symbol resolution always work.
I now have a separate variable to control whether we should activate latent
symbols or not; previously the existence of the export list was used to make
this determination.
Furthermore populate_this_symtab() now takes an extra argument to indicate that
ONLY the export list should be filled in
|
|
|
|
Previously activate_latent_in() iterations looked like
for(export names in lib1) // hash table iteration
{
for(symbol names in lib2) // list iteration
{
if(names equal && libsym->latent)
{
proc_activate_latent_symbol(proc, libsym)
}
}
}
This is inefficient both due to the double iteration but also since iterating
over a hash table in slow (have to look through all cells, even empty ones).
This patch turns this logic into
for(symbol names in lib2) // list iteration
{
if(name in lib1 export names && libsym->latent) // hash table lookup
{
proc_activate_latent_symbol(proc, libsym)
}
}
So there's no more double iteration, and the hash iteration was turned into a
hash lookup. Much better.
|
|
|
|
restartable
These function now takes a *start_after, and return a pointer to the first
failing key, like the other ltrace iterators
|
|
|
|
|
|
|
|
|
|
If a die has a DW_AT_linkage_name, I now use it: this is required for C++ code,
in particular.
I use the plain name regardless, since sometimes the exported symbol corresponds
to the plain name, NOT the linkage name. For instance I see this on my
Debian/sid amd64 box. In its libc, the linkage name of __nanosleep is
__GI___nanosleep, but the export is __nanosleep
|
|
Some libraries have multiple names for the same function. Prior to this patch,
it was possible to define a prototype for a symbol, and not have ltrace use it
because it saw a different symbol be called. libc is a common source of this.
For instance (on my amd64 Debian box) it defines the nanosleep symbol as both
'nanosleep' and '__GI___nanosleep', at the same address. If a calling library
calls '__GI___nanosleep', then an ltrace prototype for 'nanosleep' would not be
used, even though it should apply to this call
|
|
|
|
The hash function is identical to the 32-bit signed int hash function. This
function is unideal for such extended use, but is sufficient for now
|
|
|
|
|
|
|
|
Signed-off-by: Thierry Fauck <thierry@linux.vnet.ibm.com>
|
|
- in which case the patterns are wrong. Change the pattern to match
both cases.
|
|
Signed-off-by: Thierry Fauck <thierry@linux.vnet.ibm.com>
Add support for ppc64le proc and ELF ABIv2.
Provides support for irelative and wchar
|
|
|
|
|
|
|
|
|
|
If they're the same, checking for both in a switch() is a compile error
|