|
From: <sv...@va...> - 2014-02-12 20:42:09
|
Author: philippe
Date: Wed Feb 12 20:41:58 2014
New Revision: 13802
Log:
No need to discard translation in gdbserver when --vgdb=full
is given, as all instructions are in any case instrumented when
full is given.
This is (slightly) more efficient for full, and allows
to bypass the arm64 discard_translation problem caused by unchain
missing
Modified:
trunk/coregrind/m_gdbserver/m_gdbserver.c
Modified: trunk/coregrind/m_gdbserver/m_gdbserver.c
==============================================================================
--- trunk/coregrind/m_gdbserver/m_gdbserver.c (original)
+++ trunk/coregrind/m_gdbserver/m_gdbserver.c Wed Feb 12 20:41:58 2014
@@ -219,15 +219,19 @@
VG_(HT_add_node)(gs_addresses, p);
/* It should be sufficient to discard a range of 1.
We use 2 to ensure the below is not sensitive to the presence
- of thumb bit in the range of addresses to discard. */
- VG_(discard_translations) (addr, 2, from);
+ of thumb bit in the range of addresses to discard.
+ No need to discard translations for Vg_VgdbFull as all
+ instructions are in any case vgdb-instrumented. */
+ if (VG_(clo_vgdb) != Vg_VgdbFull)
+ VG_(discard_translations) (addr, 2, from);
}
static void remove_gs_address (GS_Address* g, const HChar* from)
{
VG_(HT_remove) (gs_addresses, g->addr);
- // See add_gs_address for the explanation for the range 2 below.
- VG_(discard_translations) (g->addr, 2, from);
+ // See add_gs_address for the explanation for condition and the range 2 below.
+ if (VG_(clo_vgdb) != Vg_VgdbFull)
+ VG_(discard_translations) (g->addr, 2, from);
VG_(arena_free) (VG_AR_CORE, g);
}
|