|
Mark Wielaard |
3bd1af |
commit e697c535392ce5b9644f4b5039420a333da1fe3f
|
|
Mark Wielaard |
3bd1af |
Author: florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
Mark Wielaard |
3bd1af |
Date: Sun Sep 13 20:27:17 2015 +0000
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
Fix various compiler warnings for the arm architecture.
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15650 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
diff --git a/coregrind/m_debuginfo/readexidx.c b/coregrind/m_debuginfo/readexidx.c
|
|
Mark Wielaard |
3bd1af |
index 2dd89cf..06a9a5f 100644
|
|
Mark Wielaard |
3bd1af |
--- a/coregrind/m_debuginfo/readexidx.c
|
|
Mark Wielaard |
3bd1af |
+++ b/coregrind/m_debuginfo/readexidx.c
|
|
Mark Wielaard |
3bd1af |
@@ -205,7 +205,7 @@ typedef
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
/* Helper function for fishing bits out of the EXIDX representation. */
|
|
Mark Wielaard |
3bd1af |
-static void* Prel31ToAddr(const void* addr)
|
|
Mark Wielaard |
3bd1af |
+static const void* Prel31ToAddr(const void* addr)
|
|
Mark Wielaard |
3bd1af |
{
|
|
Mark Wielaard |
3bd1af |
UInt offset32 = *(const UInt*)addr;
|
|
Mark Wielaard |
3bd1af |
// sign extend offset32[30:0] to 64 bits -- copy bit 30 to positions
|
|
Mark Wielaard |
3bd1af |
@@ -215,7 +215,7 @@ static void* Prel31ToAddr(const void* addr)
|
|
Mark Wielaard |
3bd1af |
offset64 |= 0xFFFFFFFF80000000ULL;
|
|
Mark Wielaard |
3bd1af |
else
|
|
Mark Wielaard |
3bd1af |
offset64 &= 0x000000007FFFFFFFULL;
|
|
Mark Wielaard |
3bd1af |
- return ((UChar*)addr) + (UWord)offset64;
|
|
Mark Wielaard |
3bd1af |
+ return ((const UChar*)addr) + (UWord)offset64;
|
|
Mark Wielaard |
3bd1af |
}
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
@@ -242,9 +242,9 @@ ExExtractResult ExtabEntryExtract ( MemoryRange* mr_exidx,
|
|
Mark Wielaard |
3bd1af |
buf[(*buf_used)++] = (_byte); } while (0)
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
# define GET_EX_U32(_lval, _addr, _mr) \
|
|
Mark Wielaard |
3bd1af |
- do { if (!MemoryRange__covers((_mr), (void*)(_addr), 4)) \
|
|
Mark Wielaard |
3bd1af |
+ do { if (!MemoryRange__covers((_mr), (const void*)(_addr), 4)) \
|
|
Mark Wielaard |
3bd1af |
return ExInBufOverflow; \
|
|
Mark Wielaard |
3bd1af |
- (_lval) = *(UInt*)(_addr); } while (0)
|
|
Mark Wielaard |
3bd1af |
+ (_lval) = *(const UInt*)(_addr); } while (0)
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
# define GET_EXIDX_U32(_lval, _addr) \
|
|
Mark Wielaard |
3bd1af |
GET_EX_U32(_lval, _addr, mr_exidx)
|
|
Mark Wielaard |
3bd1af |
@@ -263,7 +263,7 @@ ExExtractResult ExtabEntryExtract ( MemoryRange* mr_exidx,
|
|
Mark Wielaard |
3bd1af |
UInt pers; // personality number
|
|
Mark Wielaard |
3bd1af |
UInt extra; // number of extra data words required
|
|
Mark Wielaard |
3bd1af |
UInt extra_allowed; // number of extra data words allowed
|
|
Mark Wielaard |
3bd1af |
- UInt* extbl_data; // the handler entry, if not inlined
|
|
Mark Wielaard |
3bd1af |
+ const UInt* extbl_data; // the handler entry, if not inlined
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
if (data & ARM_EXIDX_COMPACT) {
|
|
Mark Wielaard |
3bd1af |
// The handler table entry has been inlined into the index table entry.
|
|
Mark Wielaard |
3bd1af |
@@ -283,7 +283,7 @@ ExExtractResult ExtabEntryExtract ( MemoryRange* mr_exidx,
|
|
Mark Wielaard |
3bd1af |
// The index table entry is a pointer to the handler entry. Note
|
|
Mark Wielaard |
3bd1af |
// that Prel31ToAddr will read the given address, but we already
|
|
Mark Wielaard |
3bd1af |
// range-checked above.
|
|
Mark Wielaard |
3bd1af |
- extbl_data = (UInt*)(Prel31ToAddr(&entry->data));
|
|
Mark Wielaard |
3bd1af |
+ extbl_data = Prel31ToAddr(&entry->data);
|
|
Mark Wielaard |
3bd1af |
GET_EXTAB_U32(data, extbl_data);
|
|
Mark Wielaard |
3bd1af |
if (!(data & ARM_EXIDX_COMPACT)) {
|
|
Mark Wielaard |
3bd1af |
// This denotes a "generic model" handler. That will involve
|
|
Mark Wielaard |
3bd1af |
@@ -941,7 +941,7 @@ void ML_(read_exidx) ( /*MOD*/DebugInfo* di,
|
|
Mark Wielaard |
3bd1af |
VG_(printf)("BEGIN ML_(read_exidx) exidx_img=[%p, +%lu) "
|
|
Mark Wielaard |
3bd1af |
"extab_img=[%p, +%lu) text_last_svma=%lx text_bias=%lx\n",
|
|
Mark Wielaard |
3bd1af |
exidx_img, exidx_size, extab_img, extab_size,
|
|
Mark Wielaard |
3bd1af |
- text_last_svma, text_bias);
|
|
Mark Wielaard |
3bd1af |
+ text_last_svma, (UWord)text_bias);
|
|
Mark Wielaard |
3bd1af |
Bool ok;
|
|
Mark Wielaard |
3bd1af |
MemoryRange mr_exidx, mr_extab;
|
|
Mark Wielaard |
3bd1af |
ok = MemoryRange__init(&mr_exidx, exidx_img, exidx_size);
|
|
Mark Wielaard |
3bd1af |
diff --git a/coregrind/m_sigframe/sigframe-arm-linux.c b/coregrind/m_sigframe/sigframe-arm-linux.c
|
|
Mark Wielaard |
3bd1af |
index 2f7781a..185367c 100644
|
|
Mark Wielaard |
3bd1af |
--- a/coregrind/m_sigframe/sigframe-arm-linux.c
|
|
Mark Wielaard |
3bd1af |
+++ b/coregrind/m_sigframe/sigframe-arm-linux.c
|
|
Mark Wielaard |
3bd1af |
@@ -248,7 +248,6 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT )
|
|
Mark Wielaard |
3bd1af |
struct vg_sig_private *priv;
|
|
Mark Wielaard |
3bd1af |
Addr sp;
|
|
Mark Wielaard |
3bd1af |
UInt frame_size;
|
|
Mark Wielaard |
3bd1af |
- struct vki_sigcontext *mc;
|
|
Mark Wielaard |
3bd1af |
Int sigNo;
|
|
Mark Wielaard |
3bd1af |
Bool has_siginfo = isRT;
|
|
Mark Wielaard |
3bd1af |
|
|
Mark Wielaard |
3bd1af |
@@ -259,14 +258,12 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT )
|
|
Mark Wielaard |
3bd1af |
if (has_siginfo) {
|
|
Mark Wielaard |
3bd1af |
struct rt_sigframe *frame = (struct rt_sigframe *)sp;
|
|
Mark Wielaard |
3bd1af |
frame_size = sizeof(*frame);
|
|
Mark Wielaard |
3bd1af |
- mc = &frame->sig.uc.uc_mcontext;
|
|
Mark Wielaard |
3bd1af |
priv = &frame->sig.vp;
|
|
Mark Wielaard |
3bd1af |
vg_assert(priv->magicPI == 0x31415927);
|
|
Mark Wielaard |
3bd1af |
tst->sig_mask = frame->sig.uc.uc_sigmask;
|
|
Mark Wielaard |
3bd1af |
} else {
|
|
Mark Wielaard |
3bd1af |
struct sigframe *frame = (struct sigframe *)sp;
|
|
Mark Wielaard |
3bd1af |
frame_size = sizeof(*frame);
|
|
Mark Wielaard |
3bd1af |
- mc = &frame->uc.uc_mcontext;
|
|
Mark Wielaard |
3bd1af |
priv = &frame->vp;
|
|
Mark Wielaard |
3bd1af |
vg_assert(priv->magicPI == 0x31415927);
|
|
Mark Wielaard |
3bd1af |
tst->sig_mask = frame->uc.uc_sigmask;
|