summaryrefslogtreecommitdiff
path: root/plugins/readelf/program.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-09-11 21:37:36 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-09-11 21:37:36 (GMT)
commit0f1473cba267ad809c8e7d207b5ff5e3998745fc (patch)
tree8aea43688d78c10ee7758e2feed80be9abbfaaf6 /plugins/readelf/program.c
parentfe39a487b4db5564036a436bfcb7cf3561889fb5 (diff)
Displayed more details about the loading process in the status bar.
Diffstat (limited to 'plugins/readelf/program.c')
-rw-r--r--plugins/readelf/program.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/readelf/program.c b/plugins/readelf/program.c
index f380ce4..0c6574d 100644
--- a/plugins/readelf/program.c
+++ b/plugins/readelf/program.c
@@ -325,6 +325,7 @@ static bool annotate_elf_program_header(GElfFormat *format, SourceEndian endian,
/******************************************************************************
* *
* Paramètres : format = description de l'exécutable à compléter. *
+* status = barre de statut à tenir informée. *
* *
* Description : Charge tous les symboles liés aux en-têtes de programme ELF. *
* *
@@ -334,7 +335,7 @@ static bool annotate_elf_program_header(GElfFormat *format, SourceEndian endian,
* *
******************************************************************************/
-bool annotate_elf_program_header_table(GElfFormat *format)
+bool annotate_elf_program_header_table(GElfFormat *format, GtkStatusStack *status)
{
bool result; /* Bilan à retourner */
const elf_header *header; /* En-tête principale */
@@ -342,6 +343,7 @@ bool annotate_elf_program_header_table(GElfFormat *format)
phys_t offset; /* Tête de lecture du bbinaire */
vmpa2t pos; /* Localisation des symboles */
uint16_t e_phnum; /* Nombre d'éléments 'Program' */
+ activity_id_t msg; /* Message de progression */
uint16_t i; /* Boucle de parcours */
result = true;
@@ -356,9 +358,18 @@ bool annotate_elf_program_header_table(GElfFormat *format)
e_phnum = ELF_HDR(format, *header, e_phnum);
+ msg = gtk_status_stack_add_activity(status, _("Writing annotations for all Elf program headers..."), e_phnum);
+
for (i = 0; i < e_phnum && result; i++)
+ {
result = annotate_elf_program_header(format, endian, &pos);
+ gtk_status_stack_update_activity_value(status, msg, 1);
+
+ }
+
+ gtk_status_stack_remove_activity(status, msg);
+
return true;
}