libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH 5/8] Remove the appname string of the ARM extbl


From: Ken Werner
Subject: [Libunwind-devel] [PATCH 5/8] Remove the appname string of the ARM extbl parser.
Date: Wed, 23 Mar 2011 15:55:03 +0000

There is no need for libunwind to set/fake a name of the elf file from which
the program header came from.

Signed-off-by: Ken Werner <address@hidden>
---
 include/tdep-arm/ex_tables.h |    2 +-
 src/arm/Ginit_local.c        |    2 +-
 src/arm/ex_tables.c          |   10 ++--------
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/include/tdep-arm/ex_tables.h b/include/tdep-arm/ex_tables.h
index 698792f..625c780 100644
--- a/include/tdep-arm/ex_tables.h
+++ b/include/tdep-arm/ex_tables.h
@@ -61,7 +61,7 @@ struct arm_exbuf_data
 };
 
 
-int arm_exidx_init_local (const char *appname);
+int arm_exidx_init_local (void);
 int arm_exidx_table_add (const char *name, struct arm_exidx_entry *start,
                         struct arm_exidx_entry *end);
 struct arm_exidx_table *arm_exidx_table_find (void *pc);
diff --git a/src/arm/Ginit_local.c b/src/arm/Ginit_local.c
index cdf05d2..f8ee19c 100644
--- a/src/arm/Ginit_local.c
+++ b/src/arm/Ginit_local.c
@@ -50,7 +50,7 @@ unw_init_local (unw_cursor_t *cursor, ucontext_t *uc)
   c->dwarf.as_arg = uc;
 
   if (UNW_TRY_METHOD (UNW_ARM_METHOD_EXIDX))
-    arm_exidx_init_local ("libunwind");
+    arm_exidx_init_local ();
 
   return common_init (c, 1);
 }
diff --git a/src/arm/ex_tables.c b/src/arm/ex_tables.c
index abe9a77..a723db5 100644
--- a/src/arm/ex_tables.c
+++ b/src/arm/ex_tables.c
@@ -45,7 +45,6 @@ static struct arm_exidx_table *arm_exidx_table_list;
 static struct arm_exidx_table arm_exidx_tables[ARM_EXIDX_TABLE_LIMIT];
 static unsigned arm_exidx_table_count = 0;
 #endif
-static const char *arm_exidx_appname;
 
 static inline uint32_t
 prel31_read (uint32_t prel31)
@@ -436,14 +435,10 @@ arm_exidx_init_local_cb (struct dl_phdr_info *info, 
size_t size, void *data)
       if (phdr->p_type != PT_ARM_EXIDX)
        continue;
 
-      const char *name = info->dlpi_name;
-      if (NULL == name || 0 == name[0])
-       name = arm_exidx_appname;
-
       ElfW (Addr) addr = info->dlpi_addr + phdr->p_vaddr;
       ElfW (Word) size = phdr->p_filesz;
 
-      arm_exidx_table_add (name,
+      arm_exidx_table_add (info->dlpi_name,
          (struct arm_exidx_entry *)addr,
          (struct arm_exidx_entry *)(addr + size));
       break;
@@ -456,9 +451,8 @@ arm_exidx_init_local_cb (struct dl_phdr_info *info, size_t 
size, void *data)
  * shared objects to collect the unwind tables.
  */
 HIDDEN int
-arm_exidx_init_local (const char *appname)
+arm_exidx_init_local (void)
 {
-  arm_exidx_appname = appname;
   arm_exidx_table_reset_all();
   return dl_iterate_phdr (&arm_exidx_init_local_cb, NULL);
 }
-- 
1.7.4.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]