summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--src/arch/instruction.c48
-rw-r--r--src/arch/instruction.h6
-rw-r--r--src/gui/menus/edition.c8
4 files changed, 11 insertions, 60 deletions
diff --git a/ChangeLog b/ChangeLog
index 7271d7e..382bd0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
16-12-15 Cyrille Bagard <nocbos@gmail.com>
+ * src/arch/instruction.c:
+ * src/arch/instruction.h:
+ Remove dead code.
+
+ * src/gui/menus/edition.c:
+ Update comments.
+
+16-12-15 Cyrille Bagard <nocbos@gmail.com>
+
* plugins/androhelpers/params.c:
* plugins/androhelpers/switch.c:
* plugins/androhelpers/try_n_catch.c:
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index 7106631..5f35db4 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -983,25 +983,6 @@ GBufferLine *g_arch_instruction_print(const GArchInstruction *instr, GCodeBuffer
/******************************************************************************
* *
-* Paramètres : list = liste d'instructions à consulter. *
-* *
-* Description : Renvoie vers la dernière instruction d'une série. *
-* *
-* Retour : Dernière instruction trouvée (ou NULL ?!). *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *g_arch_instruction_find_last(const GArchInstruction *list)
-{
- return ainstr_list_last(list);
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : list = liste d'instructions à compléter, ou NULL. *
* instr = nouvelle instruction à intégrer à l'ensemble. *
* *
@@ -1098,35 +1079,6 @@ GArchInstruction *g_arch_instruction_get_next_iter(const GArchInstruction *list,
/******************************************************************************
* *
-* Paramètres : list = liste de lignes à parcourir. *
-* range = emplacement mémoire à comparer. *
-* *
-* Description : Recherche une instruction d'après son emplacement mémoire. *
-* *
-* Retour : Instruction trouvée à l'adresse donnée, NULL si aucune. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *g_arch_instruction_find_by_range(GArchInstruction *list, const mrange_t *range)
-{
- GArchInstruction *result; /* Trouvaille à retourner */
-
- ainstr_list_for_each(result, list)
- {
- if (cmp_mrange(&result->range, range) == 0)
- break;
-
- }
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : list = liste de lignes à parcourir. *
* addr = position en mémoire ou physique à chercher. *
* strict = définit la considération à porter à l'adresse. *
diff --git a/src/arch/instruction.h b/src/arch/instruction.h
index bddc2bf..54778b5 100644
--- a/src/arch/instruction.h
+++ b/src/arch/instruction.h
@@ -230,9 +230,6 @@ GBufferLine *g_arch_instruction_print(const GArchInstruction *, GCodeBuffer *, M
/* -------------------- TRAITEMENT DES INSTRUCTIONS PAR ENSEMBLE -------------------- */
-/* Renvoie vers la dernière instruction d'une série. */
-GArchInstruction *g_arch_instruction_find_last(const GArchInstruction *);
-
/* Ajoute une instruction à un ensemble existant. */
void g_arch_instruction_add_to_list(GArchInstruction **, GArchInstruction *);
@@ -245,9 +242,6 @@ GArchInstruction *g_arch_instruction_get_prev_iter(const GArchInstruction *, con
/* Fournit l'élement suivant un autre pour un parcours. */
GArchInstruction *g_arch_instruction_get_next_iter(const GArchInstruction *, const GArchInstruction *, vmpa_t);
-/* Recherche une instruction d'après son emplacement mémoire. */
-GArchInstruction *g_arch_instruction_find_by_range(GArchInstruction *, const mrange_t *);
-
/* Recherche une instruction d'après son adresse. */
GArchInstruction *g_arch_instruction_find_by_address(GArchInstruction *, const vmpa2t *, bool) __attribute__ ((deprecated));
/* -> g_arch_processor_find_instr_by_address */
diff --git a/src/gui/menus/edition.c b/src/gui/menus/edition.c
index da2c60f..89b5fe9 100644
--- a/src/gui/menus/edition.c
+++ b/src/gui/menus/edition.c
@@ -513,12 +513,8 @@ static void mcb_edition_list_xrefs(GtkMenuItem *menuitem, GMenuBar *bar)
* être de taille nulle (cas d'une étiquette, par exemple), à la différence
* de la taille d'une instruction.
*
- * Il n'est donc pas judicieux de rechercher cette instruction avec
- * un appel de type :
- *
- * instr = g_arch_instruction_find_by_range(list, range);
- *
- * Il faut ainsi être plus souple, et se baser sur l'adresse uniquement.
+ * Il faut ainsi être plus souple, et se baser sur l'espace couvert par
+ * une ligne mais sur l'adresse uniquement.
*/
instr = g_arch_processor_find_instr_by_address(proc, get_mrange_addr(range));