aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-03-08New backend hook os_get_ltrace_conf_filename and Linux implementationPetr Machata
2013-03-08Don't attempt to count records if the dictionary hasn't been createdPetr Machata
2013-03-08Add ownership tracking to prototype modulePetr Machata
2013-03-08For LS_TOPLT_EXEC symbols, consult all available librariesPetr Machata
Those are PLT symbols, and their prototype is likely defined in a configuration file for library other than where the symbol is defined. If this "home" library doesn't have the prototype, consult all libraries mapped in the process image.
2013-03-08Add two iteration helpers, CBS_STOP_IF, CBS_CONT_IFPetr Machata
Ltrace uses iterators extensively. Many callbacks end with some sort of if/else switch that returns either CBS_STOP or CBS_CONT. These macros capture that logic.
2013-03-08consider_config_dir should return protolib, not callback statusPetr Machata
2013-03-08Start using per-library config filesPetr Machata
We have one global cache, initialized in init_global_config. output.c was adjusted to load per-library config files on demand from that cache.
2013-03-08Each struct library should have its own struct protolibPetr Machata
This is enough for handling -x symbols. For handling -e however, we will need a per-process library that's incrementally built according to what's mapped in.
2013-03-08Add code for protolib cachePetr Machata
This doesn't yet handle autoloading of /etc/ltrace.conf, but the algorithms are all in.
2013-03-08read_config_file.c: In "unknown type" error, show the piece that caused itPetr Machata
2013-03-08In opt_F_get_kind, allow symbolic linksPetr Machata
lstat should see through them, but bash process substitution produces files that report themselves as symlinks even to lstat.
2013-03-08Implement os_get_config_dirs for gnu-linux backendPetr Machata
2013-03-08Convert opt_F_t to support directories as well as files, store in vectorPetr Machata
Also allow parsing colon-separated lists into opt_F. This will be useful for -F as well as for parsing some environment variables. This removes bits related to default directories to look into. This will eventually be moved to os_get_config_dirs, currently it's simply disabled. The code in libltrace.c is currently incompatible with opt_F being a vector, so it's disabled as well. Revamp of the whole configury shebang underway.
2013-03-08New backend call os_get_config_dirsPetr Machata
2013-03-08read_config_file: Use passed-in protolib instead of the global onePetr Machata
2013-03-08The define -DSYSCONFDIR should be visible across the whole buildPetr Machata
Also, drop libelf_CFLAGS from AM_CPPFLAGS. That's an obvious mismatch, and all other libraries are configured in configure.ac.
2013-03-08configure.ac: Pass project URL to AC_INITPetr Machata
2013-03-08read_config_file.c: Simplify get_hidden_intPetr Machata
There's no need to go through the parser. It may have been simpler when it was written, but these days we need to create a fake library, allocate on heap, duplicate strings... it's much easier to just initialize it by hand.
2013-03-08Plug leaks in read_config_filePetr Machata
Now that prototype module stores prototypes and named types by value, avoid unnecessary malloc's in read_config_file.c
2013-03-08Port prototype module to new dictionaryPetr Machata
2013-03-08In read_config_file.c, pass around plib ref where prototypes should be putPetr Machata
2013-03-08Add test for "addr" typePetr Machata
2013-03-08read_config_file uses protolib to keep typedefsPetr Machata
This still uses only a single global prototype library, but most of custom config-reader-only code has been eliminated in favor of prototype module.
2013-03-08Implement more of prototype.{c,h}Petr Machata
2013-03-08Don't needlessly allocate "addr" and "file" types in init_global_configPetr Machata
2013-03-08In read_config_file, pass around locus instead of using globalsPetr Machata
2013-03-08Move some code aroundPetr Machata
2013-03-08Introduce a module for managing prototypes and prototype librariesPetr Machata
This is to be used, eventually, for keeping one prototype library per DSO. Right now we only have one prototype library, like before: g_prototypes. Typedef submodule is not yet used, only prototypes are stored in the protolib as of now. The change in Makefile.am is actually an inclusion of prototype.{c,h} followed by a rewrap of name lists.
2013-03-08Use getline instead of static buffer in read_config_filePetr Machata
2013-03-08Coding style in output.cPetr Machata
2013-03-08Drop obsolete timezone arguments in calls to gettimeofdayPetr Machata
2013-03-08Clarify a parameter name in proc_each_library declarationPetr Machata
2013-03-08Move opt_c_struct and dict_opt_c from common.h to options.hPetr Machata
2013-03-08Move demangling-related code from common.h to demangle.hPetr Machata
Adjust users accordingly.
2013-03-08Add destroy_global_config. Call it on shutdownPetr Machata
This is for symmetry with init_global_config.
2013-03-08read_config_file.c: Plug a leak in allocation of typedef identifier namePetr Machata
2013-03-08read_config_file.c: new_typedef could failPetr Machata
2013-03-08Rename struct Function to struct prototype. Don't typedef itPetr Machata
Rationale: more fitting name and coding style
2013-03-08Change DICT_FIND to DICT_FIND_{REF,VAL}Petr Machata
- In many places, DICT_FIND was awkward to use, as it required the use of pointers even in cases that the dictionary already stored pointers. For those cases, add DICT_FIND_VAL. - Rename the original DICT_FIND to DICT_FIND_REF to make the disctinction clear. That is useful if the dictionary holds actual structures.
2013-03-08Clarify a comment in dict.cPetr Machata
2013-03-08dict.c: Privatize a couple functions, add a couple assertsPetr Machata
2013-03-08Fix namespace pollution in vect.h, dict.hPetr Machata
2013-03-08options.h needs to include sys/time.h for struct timeval tvPetr Machata
2013-03-08Fix moving tail ahead in vect_erasePetr Machata
The argument to memmove needs to be number of bytes, not number of slots.
2013-03-08Add vect_erase, VECT_ERASE. VECT_POPBACK needs a dtorPetr Machata
vect_popback and VECT_POPBACK are now defined in terms of vect_erase and VECT_ERASE, respectively.
2013-03-08Add dict_{dtor,clone}_stringPetr Machata
... because it's bound to come up often.
2013-03-08Fixes for dict codePetr Machata
2013-03-08Rewrite dict module to be more in line with vectPetr Machata
It's now a bit more strongly typed, can grow and shrink on demand, and has a more complete interface. It uses open addressing scheme to store hashes.
2013-03-05Add AC_SYS_LARGEFILE to configure.acPetr Machata
inode numbers in modern filesystems often exceed the 32-bit address space. If that happens, calling 32-bit stat (as would be the case on a 32-bit machine when largefile support is not enabled) fails with EOVERFLOW despite us not needing those values at all. AC_SYS_LARGEFILE enables largefile support if possible. This defines _FILE_OFFSET_BITS in config.h, so that file needs to be included in files that use stat.
2013-03-05Remove hacks for SPARC codePetr Machata
Simply continuing on SPARC is probably broken. The breakpoint isn't disabled at that point, and continuing just hits it again. That __ia64___ in ifdef is never defined even on an IA64 machine. It's a typo, note the three underscores.