1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-07-01 05:31:43 +02:00

(_UPT_get_dyn_info_list_addr): Bracket ia64-specific variables in #if UNW_TARGET_IA64.

If ui->ei.image is non-NULL, close the old image and invalidate the
	cache before mapping the new image.

(Logical change 1.71)
This commit is contained in:
hp.com!davidm 2003-03-29 07:32:50 +00:00
parent e21a83deb0
commit e00aa27222

View file

@ -34,12 +34,14 @@ int
_UPT_get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dil_addr,
void *arg)
{
#if UNW_TARGET_IA64
unsigned long lo, hi, off;
struct UPT_info *ui = arg;
struct map_iterator mi;
char path[PATH_MAX];
unw_dyn_info_t *di;
unw_word_t res;
#endif
int count = 0;
debug (100, "%s: looking for dyn_info list\n", __FUNCTION__);
@ -51,6 +53,13 @@ _UPT_get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dil_addr,
if (off)
continue;
if (ui->ei.image)
{
munmap (ui->ei.image, ui->ei.size);
/* invalidate the cache: */
ui->di_cache.start_ip = ui->di_cache.end_ip = 0;
}
if (elf_map_image (&ui->ei, path) < 0)
return -UNW_ENOINFO;