summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-04-20 23:09:13 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-04-20 23:09:13 (GMT)
commitea40f74566cd813722f49ae740ca3df04e522bb2 (patch)
tree7a61557efa0a80fcf3b58df9626f7fad9bd61455 /src/arch
parent874b812e720a8f9fb6248cb54e76bd8ab2b2a250 (diff)
Transmitted the focus when a limit has been reached while using he keyboard.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@514 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/processor.c54
-rw-r--r--src/arch/processor.h8
2 files changed, 60 insertions, 2 deletions
diff --git a/src/arch/processor.c b/src/arch/processor.c
index c2d190b..25a38b4 100644
--- a/src/arch/processor.c
+++ b/src/arch/processor.c
@@ -441,3 +441,57 @@ GArchInstruction *g_arch_processor_find_instr_by_address(const GArchProcessor *p
return result;
}
+
+
+/******************************************************************************
+* *
+* Paramètres : proc = processeur recensant diverses instructions. *
+* instr = instruction de référence pour un parcours. *
+* *
+* Description : Fournit l'instruction qui en précède une autre. *
+* *
+* Retour : Instruction précédente trouvée, ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *g_arch_processor_get_prev_instr(const GArchProcessor *proc, const GArchInstruction *instr)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ GArchInstruction *list; /* Ensemble des instructions */
+
+ list = g_arch_processor_get_disassembled_instructions(proc);
+
+ result = g_arch_instruction_get_prev_iter(list, instr);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : proc = processeur recensant diverses instructions. *
+* instr = instruction de référence pour un parcours. *
+* *
+* Description : Fournit l'instruction qui en suit une autre. *
+* *
+* Retour : Instruction suivante trouvée, ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *g_arch_processor_get_next_instr(const GArchProcessor *proc, const GArchInstruction *instr)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ GArchInstruction *list; /* Ensemble des instructions */
+
+ list = g_arch_processor_get_disassembled_instructions(proc);
+
+ result = g_arch_instruction_get_next_iter(list, instr, ~0);
+
+ return result;
+
+}
diff --git a/src/arch/processor.h b/src/arch/processor.h
index 3eeefd5..d650266 100644
--- a/src/arch/processor.h
+++ b/src/arch/processor.h
@@ -87,11 +87,15 @@ void g_arch_processor_set_disassembled_instructions(GArchProcessor *, GArchInstr
/* Fournit les instructions désassemblées pour une architecture. */
GArchInstruction *g_arch_processor_get_disassembled_instructions(const GArchProcessor *);
-
-
/* Recherche une instruction d'après son adresse. */
GArchInstruction *g_arch_processor_find_instr_by_address(const GArchProcessor *, const vmpa2t *);
+/* Fournit l'instruction qui en précède une autre. */
+GArchInstruction *g_arch_processor_get_prev_instr(const GArchProcessor *, const GArchInstruction *);
+
+/* Fournit l'instruction qui en suit une autre. */
+GArchInstruction *g_arch_processor_get_next_instr(const GArchProcessor *, const GArchInstruction *);
+
#endif /* _ARCH_PROCESSOR_H */