[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/6] ddb: print task names if available
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 2/6] ddb: print task names if available |
Date: |
Wed, 11 Jun 2014 09:47:40 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Mon 09 Jun 2014 18:38:31 +0200, a écrit :
> * ddb/db_print.c (db_print_task): Print task name if available.
> * i386/i386/db_interface.c (db_task_name): Likewise.
Ack.
You can also drop the DB_GNUMACH_TASK_NAME definition, which is not used
any more then.
> ---
> ddb/db_print.c | 7 ++++++-
> i386/i386/db_interface.c | 4 ++--
> 2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/ddb/db_print.c b/ddb/db_print.c
> index c015d84..1cbff64 100644
> --- a/ddb/db_print.c
> +++ b/ddb/db_print.c
> @@ -258,7 +258,12 @@ db_print_task(
> } else {
> if (flag & OPTION_TASK_TITLE)
> db_printf(" TASK THREADS\n");
> - db_printf("%3d (%0*X): ", task_id, 2*sizeof(vm_offset_t), task);
> + if (task->name[0])
> + db_printf("%3d %s (%0*X): ", task_id, task->name,
> + 2*sizeof(vm_offset_t), task);
> + else
> + db_printf("%3d (%0*X): ", task_id,
> + 2*sizeof(vm_offset_t), task);
> if (task->thread_count == 0) {
> db_printf("no threads\n");
> } else {
> diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c
> index 1337685..b442b86 100644
> --- a/i386/i386/db_interface.c
> +++ b/i386/i386/db_interface.c
> @@ -730,8 +730,8 @@ db_task_name(
> vm_offset_t vaddr, kaddr;
> unsigned sp;
>
> - if (task->map->pmap == kernel_pmap) {
> - db_printf(DB_GNUMACH_TASK_NAME);
> + if (task->name[0]) {
> + db_printf("%s", task->name);
> return;
> }
>
> --
> 2.0.0
>
>
--
Samuel
Moralité : le modem et le cablerouteur font comme les filles, ils
papotent toute la journée.
-+- RB in NPC : Et en plus, ils ne parlent que de bits -+-
- [PATCH 1/6] kern: set the name of the kernel task to 'gnumach', Justus Winter, 2014/06/09
- [PATCH 2/6] ddb: print task names if available, Justus Winter, 2014/06/09
- Re: [PATCH 2/6] ddb: print task names if available,
Samuel Thibault <=
- [PATCH 3/6] ddb: use db_thread_stat to format the flags, Justus Winter, 2014/06/09
- [PATCH 4/6] i386: reformat the key map, Justus Winter, 2014/06/09
- [PATCH 5/6] i386: remap some keys, Justus Winter, 2014/06/09
- [PATCH 6/6] doc: explain the floating point flag in kdb output, Justus Winter, 2014/06/09
- Re: [PATCH 1/6] kern: set the name of the kernel task to 'gnumach', Samuel Thibault, 2014/06/11