From 448fa2462a382c40fb73379b3e3ce7021e7fdf4c Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Mon, 12 Apr 2010 20:56:56 +0000 Subject: [PATCH] search_all_symtabs: when mapping addresses to text symbols, consider any symbol in the r-x mapped segment to be a valid candidate. This relaxes the filtering criterion slightly, makes it consistent with other is-it-text? checks. Some addresses which before didn't get mapped to anything are now correctly mapped to "vtable for Foo" symbols. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11104 --- coregrind/m_debuginfo/debuginfo.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 2056ec2ab4..9bb3d8d854 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1239,10 +1239,13 @@ static void search_all_symtabs ( Addr ptr, /*OUT*/DebugInfo** pdi, for (di = debugInfo_list; di != NULL; di = di->next) { if (findText) { - inRange = di->text_present - && di->text_size > 0 - && di->text_avma <= ptr - && ptr < di->text_avma + di->text_size; + /* Consider any symbol in the r-x mapped area to be text. + See Comment_Regarding_Text_Range_Checks in storage.c for + details. */ + inRange = di->have_rx_map + && di->rx_map_size > 0 + && di->rx_map_avma <= ptr + && ptr < di->rx_map_avma + di->rx_map_size; } else { inRange = (di->data_present && di->data_size > 0 -- 2.47.3