OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* exp_disp.adb (Make_Tags): Mark the imported view of dispatch tables.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
unwind-dw2-fde-glibc.c
diff --git
a/gcc/unwind-dw2-fde-glibc.c
b/gcc/unwind-dw2-fde-glibc.c
index
8f6473d
..
b8a7312
100644
(file)
--- a/
gcc/unwind-dw2-fde-glibc.c
+++ b/
gcc/unwind-dw2-fde-glibc.c
@@
-37,7
+37,7
@@
#endif
#include "coretypes.h"
#include "tm.h"
#endif
#include "coretypes.h"
#include "tm.h"
-#include "
elf/
dwarf2.h"
+#include "dwarf2.h"
#include "unwind.h"
#define NO_BASE_OF_ENCODED_VALUE
#include "unwind-pe.h"
#include "unwind.h"
#define NO_BASE_OF_ENCODED_VALUE
#include "unwind-pe.h"
@@
-48,6
+48,16
@@
#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
&& (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
&& (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
+# define USE_PT_GNU_EH_FRAME
+#endif
+
+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+ && defined(__FreeBSD__) && __FreeBSD__ >= 7
+# define ElfW __ElfN
+# define USE_PT_GNU_EH_FRAME
+#endif
+
+#if defined(USE_PT_GNU_EH_FRAME)
#ifndef __RELOC_POINTER
# define __RELOC_POINTER(ptr, base) ((ptr) + (base))
#ifndef __RELOC_POINTER
# define __RELOC_POINTER(ptr, base) ((ptr) + (base))
@@
-194,13
+204,13
@@
_Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
}
goto found;
}
}
goto found;
}
-
+
last_cache_entry = cache_entry;
/* Exit early if we found an unused entry. */
if ((cache_entry->pc_low | cache_entry->pc_high) == 0)
break;
if (cache_entry->link != NULL)
last_cache_entry = cache_entry;
/* Exit early if we found an unused entry. */
if ((cache_entry->pc_low | cache_entry->pc_high) == 0)
break;
if (cache_entry->link != NULL)
- prev_cache_entry = cache_entry;
+ prev_cache_entry = cache_entry;
}
}
else
}
}
else
@@
-226,7
+236,7
@@
_Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
if (size < offsetof (struct dl_phdr_info, dlpi_phnum)
+ sizeof (info->dlpi_phnum))
return -1;
if (size < offsetof (struct dl_phdr_info, dlpi_phnum)
+ sizeof (info->dlpi_phnum))
return -1;
-
+
/* See if PC falls into one of the loaded segments. Find the eh_frame
segment at the same time. */
for (n = info->dlpi_phnum; --n >= 0; phdr++)
/* See if PC falls into one of the loaded segments. Find the eh_frame
segment at the same time. */
for (n = info->dlpi_phnum; --n >= 0; phdr++)
@@
-247,7
+257,7
@@
_Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
else if (phdr->p_type == PT_DYNAMIC)
p_dynamic = phdr;
}
else if (phdr->p_type == PT_DYNAMIC)
p_dynamic = phdr;
}
-
+
if (!match)
return 0;
if (!match)
return 0;
@@
-387,7
+397,7
@@
_Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
{
_Unwind_Ptr func;
unsigned int encoding = get_fde_encoding (data->ret);
{
_Unwind_Ptr func;
unsigned int encoding = get_fde_encoding (data->ret);
-
+
read_encoded_value_with_base (encoding,
base_from_cb_data (encoding, data),
data->ret->pc_begin, &func);
read_encoded_value_with_base (encoding,
base_from_cb_data (encoding, data),
data->ret->pc_begin, &func);