summaryrefslogtreecommitdiffstats
path: root/dwflpp.cxx
Commit message (Collapse)AuthorAgeFilesLines
* BZ580943: add more patterns to kprobe blacklistFrank Ch. Eigler2010-04-091-0/+2
| | | | * dwflpp.cxx (build_blacklist): Add a few more entries.
* Use a wider cache for simple function lookupsJosh Stone2010-03-301-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have many individual function lookups, like the nearly 1000 with syscall.*, each one will iterate every CU in the module (M) and then do a cache lookup in N entries. That's a thousand MlogN lookups. We can instead keep the functions in a module-wide map, and then the complexity is just a thousand logMN lookups. Before: $ ./run-stap -l 'syscall.**' --vp 01 >/dev/null Pass 2: analyzed script: 793 probe(s), 11 function(s), 20 embed(s), 0 global(s) using 245872virt/147304res/78272shr kb, in 1390usr/60sys/1448real ms. After: $ ./run-stap -l 'syscall.**' --vp 01 >/dev/null Pass 2: analyzed script: 793 probe(s), 11 function(s), 20 embed(s), 0 global(s) using 246228virt/147616res/78276shr kb, in 720usr/60sys/782real ms. * dwflpp.cxx (dwflpp::iterate_single_function): Do a simple function lookup based on a module-wide cache. (dwflpp::mod_function_caching_callback): Helper for above. * tapsets.cxx (dwarf_query::query_module_functions): Query a single function from the module-wide cache. (dwarf_query::query_module_dwarf): Use above for simple cases.
* Remove unused code from iterate_over_functionsJosh Stone2010-03-301-10/+1
| | | | | | * dwflpp.cxx (dwflpp::iterate_over_functions): No caller is using has_statement_num anymore (since 6b517475), so kill it. * tapsets.cxx (query_cu): Let the default call rule the day.
* robustness: add special_mapping_* to blacklist for 2.6.32ishFrank Ch. Eigler2010-03-201-0/+3
| | | | * dwflpp.cxx (build_blacklist): Add special_mapping_*
* Support building against elfutils < 0.142 again.Mark Wielaard2010-02-021-1/+3
| | | | * dwflpp.cxx (get_cfa_ops): Guard new cfi related code and variables.
* Make sure cfa_ops are always retrieved through dwfl global address.Mark Wielaard2010-02-021-10/+24
| | | | | | | | | | | | | | | | | dwflpp::translate_location() works on the dw address space, but get_cfa_ops() starts out with dwfl calls (only dwarf_cfi_addrframe() needs to be adjusted for bias). * dwflpp.cxx (translate_location): Pass pc plus module bias through to get_cfa_ops. (get_cfa_ops): Adjust for bias when calling dwarf_cfi_addrframe(), add frame start/end address when found if verbose logging. * testsuite/systemtap.exelib/lib.stp: Add $foo and $bar variables to process.function probes. * testsuite/systemtap.exelib/libmarkunamestack.stp: Likewise. * testsuite/systemtap.exelib/lib.tcl: Expect correct values for process.function probe variables. * testsuite/systemtap.exelib/libmarkunamestack.tcl: Likewise.
* PR11173 Markers get a bad address in prelinked libraries.Mark Wielaard2010-01-181-39/+0
| | | | | | | | | | | | | Our literal_addr_to_sym_addr() function was just wrong. To compensate for raw addresses read from elf (either given by the user or through a mark transformation) we need to know what the elf_bias is (as returned by dwfl_module_getelf) before feeding them to any libdwfl functions. * tapsets.cxx (query_module_dwarf): Always add elf_bias to raw function or statement addresses before calling query_addr(). (query_addr): Don't call literal_addr_to_sym_addr(). * dwflpp.h (literal_addr_to_sym_addr): Removed. * dwflpp.cxx (literal_addr_to_sym_addr): Likewise.
* PR10467 cont'd: be tolerant of bad line numbersJosh Stone2010-01-141-5/+2
| | | | | | | | | If a line number is invalid for a source file, that should not be a fatal error, as it may still be valid for some other matching source file. * dwflpp.cxx (dwflpp::iterate_over_srcfile_lines): Don't assert that the line must be found, just break out quietly.
* Fix get_cfa_ops failure on shared libraries.Mark Wielaard2010-01-061-3/+3
| | | | | | | | The fix for PR10923 (fafeaf) wasn't completely correct. All cfa lookups need to be done through the relative pc (without bias) of the module we are looking in. * dwflpp.cxx (translate_location): Call get_cfa_ops with relative pc.
* PR11015 Support shared library reloading (in different processes)Mark Wielaard2009-12-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * runtime/task_finder_vma.c (stap_remove_vma_map_info): Return negative status on failure. (stap_find_vma_map_info): Likewise. (stap_find_vma_map_info_user): New function. (stap_drop_vma_maps): New function. * runtime/sym.h (addr): Renamed to static_addr, to store addresses for sections which are always mapped at the same address. (_stp_module_relocate): Add extra struct task_struct *tsk argument. * runtime/sym.c (_stp_tf_exec_cb): New callback, calls stap_drop_vma_maps. (_stp_tf_mmap_cb): Don't store address in module.section, but call stap_add_vma_map_info() per tsk->group_leader for matched module. Don't register empty/null modules. (_stp_module_relocate): Take extra struct task_struct *tsk argument, cache last tsk used. Only use section->static_addr for none dynamic modules. Use stap_find_vma_map_info_user() to locate dynamic modules. (_stp_mod_sec_lookup): Add extra argument unsigned long *rel_addr to optionally store relative address when module/section found. (_stp_kallsyms_lookup): Use _stp_mod_sec_lookup to find relative address. (_stp_sym_init): Register _stp_tf_exec_cb in stap_task_finder_target. Add error check to see if task finder could be initialized. * dwflpp.cxx (emit_address): Pass NULL for kernel/modules and current for user tasks to _stp_module_relocate. * runtime/transport/symbols.c (_stp_do_relocation): Set new static_addr _stp_section field. * runtime/unwind.c (adjustStartLoc): Take new struct task_struct *tsk argument and pass to stap_find_vma_map_info_user and _stp_module_relocate to find adjusted addr. (_stp_search_unwind_hdr): Pass through struct task_struct *tsk. (unwind_frame): Likewise. * tapset/context-symbols.stp (probemod): Add NULL to _stp_mod_sec_lookup call to indicate we aren't interested in relative address. * tapsets.cxx (dwarf_derived_probe_group::emit_module_init): Pass NULL to _stp_module_relocate to indicate kernel/module address.
* dwarf probes: skip inlined instances with null (buggy) entrypcFrank Ch. Eigler2009-12-201-0/+10
| | | | * dwflpp.cxx (resolve_prologue_endings): Skip entrypc=0.
* Search other CUs of the module when resolving declarations.Mark Wielaard2009-11-171-10/+38
| | | | | | | | | | | * dwflpp.h (declaration_resolve_other_cus): New method. (iterate_over_globals): Mark as static and takes a CU to iterate over. (global_alias_caching_callback_cus): New method. * dwflpp.cxx (global_alias_caching_callback_cus): New method. (declaration_resolve_other_cus): New method. (declaration_resolve): Call iterate_over_globals() with current cu. Call declaration_resolve_other_cus() when name not found. (iterate_over_globals): Takes cu_die to iterate over as argument.
* Use DW_AT_MIPS_linkage_name when available in vardie_from_symtable.Mark Wielaard2009-11-171-1/+8
| | | | | | | | If there is a DW_AT_MIPS_linkage_name it encodes the actual name of the variable as used in the symbol table. * dwflpp.cpp (vardie_from_symtable): Check whether there is a DW_AT_MIPS_linkage_name attribute and use its value if so.
* Remove caching of emit_address for kernel modules and shared libraries.Mark Wielaard2009-11-171-4/+7
| | | | | | | | | | Caching of the address is only safe for kernel addresses that can never change. For kernel module or dynamic shared library addresses it isn't safe to cache the address since they can be unloaded, reloaded or mapped differently in separate executables. * dwflpp.cxx (emit_address): Remove static from addr definition for kernel and dynamic modules.
* PR10010 Support $globals in shared libraries.Mark Wielaard2009-11-161-6/+5
| | | | | | | | * dwflpp.cxx (dwflpp::emit_address): Enable task finder and emit a _stp_module_relocate for the ".dynamic" section when seeing a user-space dso address. * runtime/sym.c (_stp_mod_sec_lookup): Remove .dynamic section addr cheat. (_stp_tf_mmap_cb): Add cheat here.
* PR10622 Search for extern $variables in symbol table.Mark Wielaard2009-11-161-14/+54
| | | | | | | | * dwflpp.h (vardie_from_symtable): New method. * dwflpp.cxx (vardie_from_symtable): New method. (literal_stmt_for_local): Use vardie_from_symtable when no location attribute and DW_AT_external. * testsuite/buildok/xtime.stp: New testcase from PR10622.
* PR10923 Handle AT_frame_base given by DW_OP_call_frame_cfa in .debug_frame.Mark Wielaard2009-11-081-2/+2
| | | | | | | | dwarf_cfi_addrframe should not be called with pc adjusted to the bias of the dwfl_module_dwarf_cfi or dwfl_module_eh_cfi. This just happened to work in the .eh_frame case because bias was always zero. * dwflpp.cxx (get_cfa_ops): Don't adjust pc for bias.
* Ensure that DWARF keeps loc2c to a reasonable stack depthJosh Stone2009-10-211-0/+7
| | | | * dwflpp.cxx (dwflpp::express_as_string): Limit stack depth to 32.
* Report experssion stack slot use back from loc2c.Roland McGrath2009-10-141-1/+2
|
* Handle DW_AT_const_value as alternative to location description.Mark Wielaard2009-10-051-1/+10
| | | | | | * dwflpp.cxx (translate_location): Call c_translate_constant when attribute is DW_AT_const_value. (literal_stmt_for_local): Allow both DW_AT_location and DW_AT_const_value.
* Cache Dwfl's for reuse between pass 2 and pass 3.Mark Wielaard2009-09-291-13/+12
| | | | | | | | | | * setupdwfl.h: Introduce DwflPtr. * setupdwfl.cxx: Cache kernel_dwfl and user_dwfl. Keep track of last used module strings. Return cached versions if same query used. * dwflpp.h: Use DwflPtr instead of Dwfl*. * dwflpp.cxx: Use DwflPtr and don't dwfl_end(). * translate.cxx: Likewise. Run through dwfl_getmodules() with returned ptr offset.
* Factor out duplicated code to setup user/module Dwfl from dwflpp/translate.Mark Wielaard2009-09-291-46/+9
| | | | | | | | | * setupdwfl.h: Add setup_dwfl_user() and is_user_module(). * setupdwfl.cxx: Likewise. * dwflpp.cxx (setup_user): Use setup_dwfl_user(). * translate.cxx (emit_symbol_data): Likewise and is_user_module(). * tapsets.cxx (dwarf_cast_expanding_visitor::visit_cast_op): Use is_user_module().
* Use dwlpp::setup_kernel for tracepoint modules.Mark Wielaard2009-09-281-4/+33
| | | | | | | | | | | Tracepoint modules ended up going through dwflpp::setup_user() because there was no setup_kernel that takes a list of module names. * dwflpp.h: Add kernel_p bool to constructor that takes a module list. Add setup_kernel() variant that takes a module list. * dwflpp.cxx: Likewise. * tapsets.cxx (tracepoint_builder::init_dw): Call dwflpp constructor indicating we expect kernel modules.
* Factor out duplicated code to setup kernel/module Dwfl from dwflpp/translate.Mark Wielaard2009-09-281-93/+4
| | | | | | | | | | | * setupdwfl.h: New header file. * setupdwfl.cxx: New source file containing shared setup_dwfl_kernel() code. * dwflpp.cxx (dwfl_report_offline_predicate): Removed. (setup_kernel): Call setup_dwfl_kernel(). * translate.cxx (dwfl_report_offline_predicate2): Remove. (emit_symbol_data): Call setup_dwfl_kernel(). * Makefile.am (stap_SOURCES): Add setupdwfl.cxx. * Makefile.in: Regenerated.
* PR10574: remove comdat/duplicate functions with entrypc=0Frank Ch. Eigler2009-09-221-1/+12
| | | | * dwflpp.c (die_entrypc): Reject entrypc=0 functions.
* Fix build error with elfutils < 0.142.Roland McGrath2009-09-171-4/+4
| | | | | * dwflpp.cxx (translate_location) [!_ELFUTILS_PREREQ (0,142)]: Pass new argument to c_translate_location.
* PR10417 Pass around attributes for supporting DW_OP_{implicit,stack}_value.Mark Wielaard2009-09-171-2/+2
| | | | | | | | | | | | | | | | | Preparation for retrieving the Dwarf_Block that holds the value of an DW_OP_implicit_value. We need the Dwarf_Attribute that is associated with the location expression operants. Depends on new elfutils 0.143 functionality. Recognizes, but does not yet handle the new operants DW_OP_{implicit,stack}_value. * loc2c.h (c_translate_location): Take an Dwarf_Attribute. * loc2c.c (c_translate_location): Likewise and pass it on. (location_relative): Likewise. (location_from_address): Likewise. (translate): Likewise and capture Dwarf_Block. * loc2c-test.c (handle_variable): Pass in Dwarf_Attribute. * dwflpp.cxx (translate_location): Likewise. (literal_stmt_for_return): Pass in NULL to indicate no attribute.
* Fix compilation error of dwflpp.cxx on gcc 4.1Wenji Huang2009-09-171-2/+3
| | | | | * dwflpp.cxx(translate_location): Separate setting value from declaration and add missing parameter.
* PR10461: Match C++ scopes for namespaces and classesJosh Stone2009-09-161-0/+58
| | | | | | | | | | | | | | | | | The function spec for dwarf probes now supports scopes, so you can limit the probes to specific namespaces or classes. Multiple scopes can be specified, and they will be matched progressively outward. probe process("foo").function("std::vector<*>::*") { ... } probe process("foo").function("::global_function") { ... } * dwflpp.cxx (dwflpp::get_parent_scope): New, finds the containing scopes of the specified DIE. (dwflpp::function_scope_matches): New, checks that the scopes containing the function all match the given scope patterns. * tapsets.cxx (dwarf_query::parse_function_spec): Rewrite, now handles multiple scope separators too. (query_dwarf_func): Check that the functions scopes match.
* Remove the unused function_name_final_matchJosh Stone2009-09-161-7/+0
| | | | * dwflpp.cxx (dwflpp::function_name_final_match): Removed.
* Clean up dwflpp::translate_location workaround for DW_AT_data_member_location.Mark Wielaard2009-09-161-12/+11
| | | | | | | | | | | Do the same workaround as loc2c-test.c does. Just treat a constant member location offset as a DW_OP_plus_uconst and call c_translate_location for it. Also Remove c_translate_add_offset. * dwflpp.cxx (dwflpp::translate_location): Check elfutils version and only do workaround for elfutils < 0.142. * loc2c.h (c_translate_add_offset): Removed. * loc2c.c (c_translate_add_offset): Likewise.
* Remove function comparison from label iterationJosh Stone2009-09-151-26/+16
| | | | | | | | | | | We already have filtered functions and inlines, so just iterate in each of those to look for labels. * dwflpp.cxx (dwflpp::iterate_over_labels): Assume that the die we're looking at is already a matching function, and don't descend into inlined functions in this body. * tapsets.cxx (query_srcfile_label): Iterate through inlines too. (query_cu): Iterate over functions and inlines instead of the CU.
* Add actual pc address to semantic error about inaccessible variables.Mark Wielaard2009-09-111-1/+2
| | | | | * dwflpp.cxx (translate_location): Add hex pc address to semantic error when dwarf_getlocation_addr() doesn't return expression.
* PR10594 cont'd: Use parent die cache for variable lookupJosh Stone2009-09-101-63/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | Variable lookup is usually done through the scopes from dwarf_getscopes at a particular pc. This requires an expensive traversal to find the inner-most die containing the pc. For cases where that containing die is known, e.g. at a particular function entry, we can do much better with our die_parent_cache. This may also help get more accurate variable scopes in cases where multiple dies contain a pc and the innermost isn't what we're trying to probe. For example, an inlined call chain of foo->bar->baz may all have the same entry pc, but if the probe was on function("bar"), we would want the variables in bar's scope, not baz's. * dwflpp.h (struct dwflpp): Remove pc_cached_scopes, num_cached_scopes, and cached_scopes, as they are now remembered by the caller. * dwflpp.cxx (dwflpp::getscopes): New - the DIE version uses the parent cache, and the pc version just defers to dwarf_getscopes. (dwflpp::print_locals, literal_stmt_for_local): Take a scopes vector. (dwflpp::find_variable_and_frame_base): Take a scopes vector from the caller instead of computing it every time. (dwflpp::dwarf_getscopes_cached): Removed. * tapsets.cxx (dwarf_var_expanding_visitor::getscopes): New cached lookup function which gets the scopes from the DIE if possible. (dwarf_var_expanding_visitor::visit_target_symbol): Call getscopes.
* Simplify deleting all map valuesJosh Stone2009-09-101-19/+5
| | | | | | * util.h (delete_map): New templated map deleter. * dwflpp.cxx (dwflpp::~dwflpp): Use it. * tapsets.cxx (symbol_table::~symbol_table): Use it.
* PR10594: Provide a cached dwarf_getscopes_dieJosh Stone2009-09-101-5/+98
| | | | | | | | | | | | | | | This avoids repeated DIE traversal by caching all parents on the first call, so future calls are just a simple walk up parent links. * dwflpp.cxx (dwflpp::getscopes_die): New cached function that mimics libdw's dwarf_getscopes_die using cached parent links. (dwflpp::cache_die_parents): New function to build the parent cache. (dwflpp::~dwflpp): Clean up the parent caches. (dwflpp::iterate_over_labels): Use the cached getscopes_die. (dwflpp::find_variable_and_frame_base): Ditto. * tapsets.cxx (dwarf_derived_probe::saveargs): Ditto. (uprobe_derived_probe::saveargs): Ditto. (dwarf_var_expanding_visitor::visit_target_symbol_context): Ditto.
* Escape literal '.'s in regular expressionsJosh Stone2009-09-031-7/+7
| | | | * dwflpp.cxx (dwflpp::build_blacklist): Escape '.'s in filenames.
* Use a regexp for matching blacklist sectionsJosh Stone2009-09-031-8/+15
| | | | | | | | We already use regexp for function/file blacklisting, so this just makes the section blacklisting consistent with the rest. * dwflpp.cxx (dwflpp::blacklisted_p): Use regexec instead of section==. (dwflpp::build_blacklist): Build blacklist_section too.
* Fetch the blacklist section only when neededJosh Stone2009-09-031-13/+3
| | | | | | | | | | We only check blacklisting on kernel probes, so it's a waste to dig up the section name otherwise. * dwflpp.cxx (dwflpp::blacklisted_p): Lookup the section directly. (relocate_address::relocate_address): Don't do blacklisting here. * tapsets.cxx (dwarf_query::add_probe_point): Don't carry the blacklist section directly anymore.
* PR10572: Allow duplicate function names in a CUJosh Stone2009-09-021-13/+17
| | | | | | | | | | | | | | | | | | We can't assume that a given function name will only appear once in a CU. In C++, two functions may have the same name in different classes or namespaces, or even in the same scope with overloaded parameters. Even in C, the compiler may generate multiple copies of a single function with different optimizations. We now use a multimap for function names, so we shouldn't miss any. * dwflpp.h (cu_type_cache_t, mod_cu_type_cache_t): New typedef to keep a normal map for the global_alias_cache. (cu_function_cache_t): Use a multimap for function names. * dwflpp.cxx (dwflpp::iterate_over_functions): Walk over the range of exactly-matching functions. * tapsets.cxx (query_dwarf_func): Don't abort after seeing an exact match -- there could be more to come.
* Delete stuff that dwflpp newedJosh Stone2009-09-021-0/+17
| | | | * dwflpp.cxx (dwflpp::~dwflpp): Delete all of the caches.
* Unify lex_cast* and avoid string copiesJosh Stone2009-09-021-15/+15
| | | | | | | | | | | | | | | We always use lex_cast either to string or from string, so I made that explicit, and got rid of some string copies in the process. There was also stringify(), which was redundant to lex_cast<string>. We also always used lex_cast_hex to string, so that's now hard-coded and again eliminated a string copy. For lex_cast_qstring<string>, there's no need to write the streamify the input, so a specialization now operates directly on the input. Hopefully this is a bit cleaner, and I do measure it to be a little faster on scripts with many probes.
* Cache inline instance lookupsJosh Stone2009-08-281-11/+50
| | | | | | | | | | | | | | | | | | | | We used to call dwarf_func_inline_instances to get the locations where inlines are used. This function has to iterate through nearly all DIEs to find instances, which is a lot of redundant work when we're probing multiple inline functions. Now we have our own dwarf iterator to cache all inline instances back to their origin. This only needs to be called once for each CU, and all further inlines are just a map lookup. Some quick benchmarks: stap -l Before After kernel.function("*") 25010ms 2110ms module("*").function("*") 86550ms 16920ms process("stap").function("*") 41330ms 580ms * dwflpp.cxx (dwflpp::cu_inl_function_caching_callback): Removed. (dwflpp::cache_inline_instances): New caching iterator. (dwflpp::iterate_over_inline_instances): Cache each CU once.
* Reorganize iterate_over_labelsJosh Stone2009-08-261-51/+42
| | | | | | | | | | | | | | | I noticed that iterate_over_labels was using a static variable as a recursion variable, which isn't a safe thing to do since it will only be initialized once. While fixing that, I also reorganized the function quite a bit. * dwflpp.cxx (dwflpp::iterate_over_labels): Take the current function as a parameter instead of using a static local. Rewrite some of the code as well to try to make it more obvious. * tapsets.cxx (add_label_name): Remove in favor of query_label. (query_label): New, to check decl_file and fix probe listing. (query_srcfile_label, query_cu): Adjust to iterate_over_labels change and start using query_label as the callback.
* Compute cu_name dynamicallyJosh Stone2009-08-251-6/+11
| | | | | | | | | | | | We only need cu_name for errors and verbose messages, so it's a waste to always construct it in focus_on_cu. It's now built only as-needed. * dwflpp.cxx (dwflpp::cu_name): Now a method instead of a data member. (dwflpp::focus_on_module): No cu_name to clear now. (dwflpp::focus_on_cu): No cu_name to set now. (dwflpp::declaration_resolve): Adjust to call cu_name() now. (dwflpp::iterate_over_functions): Ditto. * tapsets.cxx (query_cu): Ditto.
* Avoid needless Dwarf_Die copyingJosh Stone2009-08-251-14/+11
| | | | | | | * dwflpp.cxx (dwflpp::iterate_over_cus): Use the Dwarf_Die as a pointer directly into the vector. (dwflpp::iterate_over_inline_instances): Ditto. (dwflpp::iterate_over_functions): Ditto in a map.
* Index cu_inl_function_cache_t by function->addrJosh Stone2009-08-251-3/+2
| | | | | | | | Again, avoid needless string construction for map indexing. * dwflpp.h (cu_inl_function_cache_t): Index by the void* function->addr. * dwflpp.cxx (dwflpp::iterate_over_inline_instances): Index cu_inl_function_cache by function->addr.
* Index mod_cu_function_cache_t by cu->addrJosh Stone2009-08-251-11/+12
| | | | | | | | | | | | | | | Rather than constructing a "module:cu" string all the time, we can just index the cache by the cu die's addr field. The addr will never change as long as the Dwarf object is still alive. This has a quite noticeable performance impact for scripts that iterate over lots of cus (like for syscall.*). * dwflpp.h (stap_map): Allow void* keys too. (mod_cu_function_cache_t): Index by the void* cu->addr. * dwflpp.cxx (dwflpp::iterate_over_functions): Index cu_function_cache by addr, and build the verbose strings manually when needed. (dwflpp::declaration_resolve): Index global_alias_cache by addr.
* PR2475: Filter filenames against the decl_fileJosh Stone2009-08-241-1/+1
| | | | | | | | | | | | We used to only check that a CU contains at least one srcfile matching the user's file spec. This patch ensures that the selected function was actually defined in one of the matching srcfiles. * tapsets.cxx (struct dwarf_query): Make filtered_srcfiles carry strings, so we can easily lookup matches later. (query_dwarf_func): Check that the decl_file is in filtered_srcfiles. (query_cu): Adjust to using set<string>. * dwflpp.cxx (dwflpp::collect_srcfiles_matching): Take a set<string>.
* PR10461: Add support for C++ classes and referencesJosh Stone2009-08-211-13/+33
| | | | | | | | | | * dwarf_wrappers.cxx (dwarf_type_name): Name class and reference types. * dwflpp.cxx (dwflpp::iterate_over_globals): Capture class names. (dwflpp::print_members): Permit classes, and dig into inheritance. (dwflpp::find_struct_member): Ditto. (dwflpp::translate_components): Handle classes and references. (dwflpp::translate_final_fetch_or_store): Ditto. * loc2c.c (c_translate_pointer): Treat references as simple pointers.