summaryrefslogtreecommitdiff
path: root/library.h
AgeCommit message (Collapse)AuthorFilesLines
2014-08-22minor whitespace-only style fixDima Kogan1-2/+2
2014-08-22Normalize some include guardsPetr Machata1-3/+3
2014-08-22I now always build the export listDima Kogan1-0/+2
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
2014-08-22un-consted some variables to build with older (<= gcc-4.6) compilersDima Kogan1-3/+3
2014-08-22Made activate_latent_in() iterations much more efficientDima Kogan1-20/+5
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.
2014-08-22removed needless #includeDima Kogan1-1/+0
2014-08-22library_exported_names_each_alias(), library_exported_names_each() now ↵Dima Kogan1-8/+28
restartable These function now takes a *start_after, and return a pointer to the first failing key, like the other ltrace iterators
2014-08-22We now use known prototypes for all aliased symbols (same address)Dima Kogan1-7/+51
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
2014-08-22Making sure to not double-examine the same DWARF CUDima Kogan1-1/+1
2014-08-22moved DWARF prototype reading to library_get_prototype()Dima Kogan1-0/+8
2014-08-22Imported Upstream version 0.7.91upstream/0.7.91upstreamChanho Park1-10/+20
2013-01-15Imported Upstream version 0.7.2upstream/0.7.2Anas Nashif1-0/+226