summaryrefslogtreecommitdiff
path: root/src/arch/instruction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r--src/arch/instruction.c43
1 files changed, 41 insertions, 2 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index 4de70b7..c2e4c7c 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -105,7 +105,7 @@ static void g_arch_instruction_init(GArchInstruction *instr)
{
DL_LIST_ITEM_INIT(&instr->flow);
- instr->is_return = false;
+ instr->max_displayed_len = VMPA_NO_PHYSICAL;
g_rw_lock_init(&instr->from_access);
g_atomic_int_set(&instr->hold_from_access, 0);
@@ -972,6 +972,45 @@ const char *g_arch_instruction_get_keyword(const GArchInstruction *instr, AsmSyn
/******************************************************************************
* *
+* Paramètres : instr = instruction d'assemblage à consulter. *
+* *
+* Description : Indique si elle existe la quantité maximale de code affiché. *
+* *
+* Retour : Quantité de code affichée au plus ou VMPA_NO_PHYSICAL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+phys_t g_arch_instruction_get_displayed_max_length(const GArchInstruction *instr)
+{
+ return instr->max_displayed_len;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : instr = instruction d'assemblage à consulter. *
+* max = quantité affichée au plus ou VMPA_NO_PHYSICAL. *
+* *
+* Description : Définit la quantité maximale de code affiché. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void g_arch_instruction_set_displayed_max_length(GArchInstruction *instr, phys_t max)
+{
+ instr->max_displayed_len = max;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : instr = instruction d'assemblage à représenter. *
* buffer = espace où placer ledit contenu. *
* msize = taille idéale des positions et adresses; *
@@ -997,7 +1036,7 @@ static GBufferLine *_g_arch_instruction_print(const GArchInstruction *instr, GCo
g_buffer_line_add_flag(result, BLF_HAS_CODE);
- g_buffer_line_fill_for_instr(result, msize/* TODO ! */, msize, content, true);
+ g_buffer_line_fill_for_instr(result, msize/* TODO ! */, msize, content, instr->max_displayed_len);
/* Instruction proprement dite */