From aa214f4bf19e711e01998a07b390934c1b027f74 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 15 May 2009 12:29:19 -0700 Subject: Remove unused dwflpp methods These three methods had no callers, and are thus obsolete: dwflpp::focus_on_module_containing_global_address(Dwarf_Addr a) dwflpp::global_address_to_module(Dwarf_Addr a) dwflpp::cu_name_matches(string pattern) --- dwflpp.cxx | 39 --------------------------------------- dwflpp.h | 4 ---- 2 files changed, 43 deletions(-) diff --git a/dwflpp.cxx b/dwflpp.cxx index 08083291..2a7028f9 100644 --- a/dwflpp.cxx +++ b/dwflpp.cxx @@ -181,17 +181,6 @@ dwflpp::focus_on_function(Dwarf_Die * f) } -void -dwflpp::focus_on_module_containing_global_address(Dwarf_Addr a) -{ - assert(dwfl); - cu = NULL; - Dwfl_Module* mod = dwfl_addrmodule(dwfl, a); - if (mod) // address could be wildly out of range - focus_on_module(mod, NULL); -} - - void dwflpp::query_cu_containing_global_address(Dwarf_Addr a, void *arg) { @@ -224,15 +213,6 @@ dwflpp::module_address_to_global(Dwarf_Addr a) } -Dwarf_Addr -dwflpp::global_address_to_module(Dwarf_Addr a) -{ - assert(module); - get_module_dwarf(); - return a - module_bias; -} - - bool dwflpp::module_name_matches(string pattern) { @@ -291,25 +271,6 @@ dwflpp::function_name_final_match(string pattern) } -bool -dwflpp::cu_name_matches(string pattern) -{ - assert(cu); - - // PR 5049: implicit * in front of given path pattern. - // NB: fnmatch() is used without FNM_PATHNAME. - string prefixed_pattern = string("*/") + pattern; - - bool t = (fnmatch(pattern.c_str(), cu_name.c_str(), 0) == 0 || - fnmatch(prefixed_pattern.c_str(), cu_name.c_str(), 0) == 0); - if (t && sess.verbose>3) - clog << "pattern '" << prefixed_pattern << "' " - << "matches " - << "CU '" << cu_name << "'" << "\n"; - return t; -} - - void dwflpp::setup_kernel(bool debuginfo_needed) { diff --git a/dwflpp.h b/dwflpp.h index 23015fdc..85817391 100644 --- a/dwflpp.h +++ b/dwflpp.h @@ -196,13 +196,11 @@ struct dwflpp void focus_on_module(Dwfl_Module * m, module_info * mi); void focus_on_cu(Dwarf_Die * c); void focus_on_function(Dwarf_Die * f); - void focus_on_module_containing_global_address(Dwarf_Addr a); void query_cu_containing_global_address(Dwarf_Addr a, void *arg); void query_cu_containing_module_address(Dwarf_Addr a, void *arg); Dwarf_Addr module_address_to_global(Dwarf_Addr a); - Dwarf_Addr global_address_to_module(Dwarf_Addr a); bool module_name_matches(std::string pattern); bool name_has_wildcard(std::string pattern); @@ -212,8 +210,6 @@ struct dwflpp bool function_name_matches(std::string pattern); bool function_name_final_match(std::string pattern); - bool cu_name_matches(std::string pattern); - void setup_kernel(bool debuginfo_needed = true); void setup_user(const std::string& module_name, bool debuginfo_needed = true); -- cgit