summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-08-22Made activate_latent_in() iterations much more efficientDima Kogan3-71/+33
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 Kogan4-40/+52
restartable These function now takes a *start_after, and return a pointer to the first failing key, like the other ltrace iterators
2014-08-22added forgotten free(), forgotten returnDima Kogan1-1/+4
2014-08-22clarified some int return code checkingDima Kogan1-6/+6
2014-08-22whitespace 'if(' -> 'if ('Dima Kogan1-14/+14
2014-08-22renamed _dtor_* and _clone_* functions to remove the leading _Dima Kogan1-9/+9
2014-08-22DWARF prototypes are now generated with both the plain and the linkage namesDima Kogan1-13/+35
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
2014-08-22We now use known prototypes for all aliased symbols (same address)Dima Kogan6-76/+346
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-22dict_hash_uint64: do not ignore upper 32 bits of the quantityPetr Machata1-6/+4
2014-08-22added hash and equality functions for uint64_tDima Kogan2-0/+23
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
2014-08-22added NEWS, CREDITS info about the new DWARF prototyping codeDima Kogan2-0/+7
2014-08-22Added manpage section giving examples of -x, -e and -l usageDima Kogan1-17/+121
2014-08-22Making sure to not double-examine the same DWARF CUDima Kogan6-16/+27
2014-08-22CREDITS update for ppc64el supportThierry Fauck1-0/+4
Signed-off-by: Thierry Fauck <thierry@linux.vnet.ibm.com>
2014-08-22In ppc-lwarx.exp, Dwarf backend may resolve atomic_add's prototypePetr Machata1-4/+4
- in which case the patterns are wrong. Change the pattern to match both cases.
2014-08-22Support for powerpc64 arch ppc64elThierry Fauck7-36/+356
Signed-off-by: Thierry Fauck <thierry@linux.vnet.ibm.com> Add support for ppc64le proc and ELF ABIv2. Provides support for irelative and wchar
2014-08-22I only build the dwarf_prototypes if we have libdwDima Kogan2-3/+9
2014-08-22removed needless castDima Kogan1-1/+1
2014-08-22added forgotten error checking to some ltrace callsDima Kogan1-12/+35
2014-08-22fixed typoDima Kogan1-1/+1
2014-08-22I only explicitly look at sizeof(long) if it differs from sizeof(int)Dima Kogan1-8/+11
If they're the same, checking for both in a switch() is a compile error
2014-08-22style whitespace changesDima Kogan1-25/+25
- * with name, not type - if (blah), not if( blah )
2014-08-22whitespace style changeDima Kogan4-259/+309
- Tabs should be 8 characters. - Lines should be no longer than 80 characters - Pointer star belongs to the variable, not the type - Lines shouldn't be formatted into tables arbitrarily - if and while should get a space before the paren
2014-08-22a bit more debug printingDima Kogan1-0/+1
2014-08-22added a bit more diagnostic printingDima Kogan2-0/+5
2014-08-22fixed memory leaksDima Kogan1-22/+1
Two leaks plugged: 1. value used for array-length 2. prototype return type
2014-08-22fixed prototype memory leakDima Kogan1-27/+18
protolib_add_prototype() makes a copy of the prototype, so allocating a new pointer there was an error
2014-08-22removed notesDima Kogan1-13/+0
2014-08-22removed, commented testing codeDima Kogan1-25/+1
2014-08-22dwarf diagnostic output now controlled by -DDima Kogan1-8/+4
2014-08-22fixed broken diagnostic outputDima Kogan1-5/+5
2014-08-22reworked error and memory handlingDima Kogan1-175/+363
I now longer exit() on the slightest sign of trouble, nor do I leak all my heap memory allocations
2014-08-22unknown pointers now return void*, not voidDima Kogan1-1/+1
2014-08-22DWARF parser now looks for exported typesDima Kogan1-1/+1
I now pass true to protolib_lookup_type(). Thus the user can now define a type in .ltrace.conf, and it would be picked up
2014-08-22renamed type_hash -> type_dieoffset_hashDima Kogan1-30/+30
2014-08-22type_hash is no longer globalDima Kogan1-34/+46
2014-08-22I now read the DWARF data in addition to the .conf filesDima Kogan1-1/+3
Previously if a .conf file for a library was available, the corresponding DWARF data would not be parsed. Now I use one to complement the other
2014-08-22If a functions is defined in a .conf, I do not parse the DWARFDima Kogan1-7/+6
Previously I would parse the DWARF data for such a function, but I wouldn't use the result. Now I don't even parse
2014-08-22types defined in .conf files now take precedence over DWARF typesDima Kogan1-14/+29
2014-08-22style whitespaceDima Kogan1-64/+64
2014-08-22import_DWARF_prototypes() now takes JUST a lib argumentDima Kogan3-5/+11
2014-08-22moved DWARF prototype reading to library_get_prototype()Dima Kogan4-8/+26
2014-08-22updated error message to reflect the new dwfl use caseDima Kogan1-1/+1
2014-08-22whitespaceDima Kogan1-2/+2
2014-08-22Stylistic refactoring. No functional changesDima Kogan1-98/+93
2014-08-22I now import functions using their linkage nameDima Kogan1-1/+14
This is required for C++ methods
2014-08-22enums are no longer assumed to have type 'int'Dima Kogan1-18/+40
2014-08-22reworked attr_numeric() to report failuresDima Kogan1-41/+71
This whole file is thus copyright me
2014-08-22added a disabled stub for complex float supportDima Kogan1-0/+17