summaryrefslogtreecommitdiff
path: root/src/arch/vmpa.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-05-06 00:07:18 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-05-06 00:07:18 (GMT)
commitd76e89e102aacfe945b44eb3150cb9f4bbf7b613 (patch)
tree7dda55fabeddcd0dbd1813d9ceef4b905a056c7f /src/arch/vmpa.c
parent2c6e4f3f3f15d1568e9dae407e32a217d8f7ab19 (diff)
Displayed a tooltip for strings or code symbols in buffer views.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@530 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/vmpa.c')
-rw-r--r--src/arch/vmpa.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/arch/vmpa.c b/src/arch/vmpa.c
index 67be9a9..ad4c078 100644
--- a/src/arch/vmpa.c
+++ b/src/arch/vmpa.c
@@ -842,6 +842,49 @@ bool mrange_contains_addr(const mrange_t *range, const vmpa2t *addr)
/******************************************************************************
* *
* Paramètres : range = zone mémoire à consulter. *
+* addr = localisation mémoire à analyser. *
+* *
+* Description : Indique si une localisation est incluse dans une zone ou non.*
+* *
+* Retour : Bilan de la consultation. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool mrange_contains_addr_inclusive(const mrange_t *range, const vmpa2t *addr)
+{
+ bool result; /* Bilan à retourner */
+ int ret; /* Bilan d'une comparaison */
+ phys_t diff; /* Espace entre deux adresses */
+
+ ret = cmp_vmpa(&range->addr, addr);
+
+ if (ret <= -1)
+ {
+ diff = compute_vmpa_diff(&range->addr, addr);
+
+ if (diff != VMPA_NO_PHYSICAL)
+ result = (diff <= range->length);
+ else
+ result = false;
+
+ }
+
+ else if (ret == 0)
+ result = true;
+
+ else
+ result = false;
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : range = zone mémoire à consulter. *
* addr = localisation mémoire à déterminer. *
* *
* Description : Calcule la position extérieure final d'une couverture. *