Re: [PATCHv5] improve the format error reporting on i386

2021-10-01 Thread Joel Sherrill
Zack,

I think your mailer is formatting the patch incorrectly. Can you
compress it and send it to me privately as an attachment?

Thanks.

--joel

On Thu, Sep 30, 2021 at 11:15 PM Gedare Bloom  wrote:
>
> Joel, i think the patch looks good.
>
> On Fri, Sep 24, 2021 at 6:19 PM zack leung  wrote:
> >
> > bump
> >
> >
> > On Thu, 23 Sept 2021 at 00:21, zack leung  wrote:
> >>
> >> I can send an example of the exception if you want.
> >>
> >> zack
> >>
> >> On Wed, 22 Sept 2021 at 18:01, Gedare Bloom  wrote:
> >>>
> >>> Joel,
> >>>
> >>> This looks good to me. I don't know if you can easily test it?
> >>>
> >>> Gedare
> >>>
> >>> On Wed, Sep 22, 2021 at 11:26 AM zack leung  
> >>> wrote:
> >>> >
> >>> > ll hex values now have 8 character width
> >>> > thread id is now hex
> >>> > updates #4203
> >>> > ---
> >>> >  cpukit/score/cpu/i386/cpu.c | 6 +++---
> >>> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >>> >
> >>> > diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
> >>> > index 77b7a7161c..786cf8b0b6 100644
> >>> > --- a/cpukit/score/cpu/i386/cpu.c
> >>> > +++ b/cpukit/score/cpu/i386/cpu.c
> >>> > @@ -215,16 +215,16 @@ void _CPU_Exception_frame_print (const
> >>> > CPU_Exception_frame *ctx)
> >>> >  {
> >>> >unsigned int faultAddr = 0;
> >>> >
> >>> > printk("--\n");
> >>> > -  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
> >>> > PRId32 "\n",
> >>> > +  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread 
> >>> > 0x%08"
> >>> > PRIx32 "\n",
> >>> >   ctx->idtIndex,
> >>> >   ctx->eip,
> >>> >   _Thread_Executing->Object.id);
> >>> >
> >>> > printk("--\n");
> >>> >printk("Processor execution context at time of the fault was  :\n");
> >>> >
> >>> > printk("--\n");
> >>> > -  printk(" EAX = %" PRIx32 "EBX = %" PRIx32 "ECX = %" PRIx32 "
> >>> > EDX = %" PRIx32 "\n",
> >>> > +  printk(" EAX =  0x%08" PRIx32 "EBX =  0x%08" PRIx32 "ECX =
> >>> > 0x%08" PRIx32 "EDX =  0x%08" PRIx32 "\n",
> >>> >   ctx->eax, ctx->ebx, ctx->ecx, ctx->edx);
> >>> > -  printk(" ESI = %" PRIx32 "EDI = %" PRIx32 "EBP = %" PRIx32 "
> >>> > ESP = %" PRIx32 "\n",
> >>> > +  printk(" ESI = 0x%08" PRIx32 "EDI =  0x%08" PRIx32 "EBP =
> >>> > 0x%08" PRIx32 "ESP =  0x%08" PRIx32 "\n",
> >>> >   ctx->esi, ctx->edi, ctx->ebp, ctx->esp0);
> >>> >
> >>> > printk("--\n");
> >>> >printk("Error code pushed by processor itself (if not 0) = %" PRIx32
> >>> > "\n",
> >>> > --
> >>> > 2.33.0
> >>> > ___
> >>> > devel mailing list
> >>> > devel@rtems.org
> >>> > http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCHv5] improve the format error reporting on i386

2021-09-30 Thread Gedare Bloom
Joel, i think the patch looks good.

On Fri, Sep 24, 2021 at 6:19 PM zack leung  wrote:
>
> bump
>
>
> On Thu, 23 Sept 2021 at 00:21, zack leung  wrote:
>>
>> I can send an example of the exception if you want.
>>
>> zack
>>
>> On Wed, 22 Sept 2021 at 18:01, Gedare Bloom  wrote:
>>>
>>> Joel,
>>>
>>> This looks good to me. I don't know if you can easily test it?
>>>
>>> Gedare
>>>
>>> On Wed, Sep 22, 2021 at 11:26 AM zack leung  
>>> wrote:
>>> >
>>> > ll hex values now have 8 character width
>>> > thread id is now hex
>>> > updates #4203
>>> > ---
>>> >  cpukit/score/cpu/i386/cpu.c | 6 +++---
>>> >  1 file changed, 3 insertions(+), 3 deletions(-)
>>> >
>>> > diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
>>> > index 77b7a7161c..786cf8b0b6 100644
>>> > --- a/cpukit/score/cpu/i386/cpu.c
>>> > +++ b/cpukit/score/cpu/i386/cpu.c
>>> > @@ -215,16 +215,16 @@ void _CPU_Exception_frame_print (const
>>> > CPU_Exception_frame *ctx)
>>> >  {
>>> >unsigned int faultAddr = 0;
>>> >printk("--\n");
>>> > -  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
>>> > PRId32 "\n",
>>> > +  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread 0x%08"
>>> > PRIx32 "\n",
>>> >   ctx->idtIndex,
>>> >   ctx->eip,
>>> >   _Thread_Executing->Object.id);
>>> >printk("--\n");
>>> >printk("Processor execution context at time of the fault was  :\n");
>>> >printk("--\n");
>>> > -  printk(" EAX = %" PRIx32 "EBX = %" PRIx32 "ECX = %" PRIx32 "
>>> > EDX = %" PRIx32 "\n",
>>> > +  printk(" EAX =  0x%08" PRIx32 "EBX =  0x%08" PRIx32 "ECX =
>>> > 0x%08" PRIx32 "EDX =  0x%08" PRIx32 "\n",
>>> >   ctx->eax, ctx->ebx, ctx->ecx, ctx->edx);
>>> > -  printk(" ESI = %" PRIx32 "EDI = %" PRIx32 "EBP = %" PRIx32 "
>>> > ESP = %" PRIx32 "\n",
>>> > +  printk(" ESI = 0x%08" PRIx32 "EDI =  0x%08" PRIx32 "EBP =
>>> > 0x%08" PRIx32 "ESP =  0x%08" PRIx32 "\n",
>>> >   ctx->esi, ctx->edi, ctx->ebp, ctx->esp0);
>>> >printk("--\n");
>>> >printk("Error code pushed by processor itself (if not 0) = %" PRIx32
>>> > "\n",
>>> > --
>>> > 2.33.0
>>> > ___
>>> > devel mailing list
>>> > devel@rtems.org
>>> > http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCHv5] improve the format error reporting on i386

2021-09-24 Thread zack leung
bump


On Thu, 23 Sept 2021 at 00:21, zack leung  wrote:

> I can send an example of the exception if you want.
>
> zack
>
> On Wed, 22 Sept 2021 at 18:01, Gedare Bloom  wrote:
>
>> Joel,
>>
>> This looks good to me. I don't know if you can easily test it?
>>
>> Gedare
>>
>> On Wed, Sep 22, 2021 at 11:26 AM zack leung 
>> wrote:
>> >
>> > ll hex values now have 8 character width
>> > thread id is now hex
>> > updates #4203
>> > ---
>> >  cpukit/score/cpu/i386/cpu.c | 6 +++---
>> >  1 file changed, 3 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
>> > index 77b7a7161c..786cf8b0b6 100644
>> > --- a/cpukit/score/cpu/i386/cpu.c
>> > +++ b/cpukit/score/cpu/i386/cpu.c
>> > @@ -215,16 +215,16 @@ void _CPU_Exception_frame_print (const
>> > CPU_Exception_frame *ctx)
>> >  {
>> >unsigned int faultAddr = 0;
>> >
>> printk("--\n");
>> > -  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
>> > PRId32 "\n",
>> > +  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread
>> 0x%08"
>> > PRIx32 "\n",
>> >   ctx->idtIndex,
>> >   ctx->eip,
>> >   _Thread_Executing->Object.id);
>> >
>> printk("--\n");
>> >printk("Processor execution context at time of the fault was  :\n");
>> >
>> printk("--\n");
>> > -  printk(" EAX = %" PRIx32 "EBX = %" PRIx32 "ECX = %" PRIx32 "
>> > EDX = %" PRIx32 "\n",
>> > +  printk(" EAX =  0x%08" PRIx32 "EBX =  0x%08" PRIx32 "ECX =
>> > 0x%08" PRIx32 "EDX =  0x%08" PRIx32 "\n",
>> >   ctx->eax, ctx->ebx, ctx->ecx, ctx->edx);
>> > -  printk(" ESI = %" PRIx32 "EDI = %" PRIx32 "EBP = %" PRIx32 "
>> > ESP = %" PRIx32 "\n",
>> > +  printk(" ESI = 0x%08" PRIx32 "EDI =  0x%08" PRIx32 "EBP =
>> > 0x%08" PRIx32 "ESP =  0x%08" PRIx32 "\n",
>> >   ctx->esi, ctx->edi, ctx->ebp, ctx->esp0);
>> >
>> printk("--\n");
>> >printk("Error code pushed by processor itself (if not 0) = %" PRIx32
>> > "\n",
>> > --
>> > 2.33.0
>> > ___
>> > devel mailing list
>> > devel@rtems.org
>> > http://lists.rtems.org/mailman/listinfo/devel
>>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCHv5] improve the format error reporting on i386

2021-09-22 Thread zack leung
I can send an example of the exception if you want.

zack

On Wed, 22 Sept 2021 at 18:01, Gedare Bloom  wrote:

> Joel,
>
> This looks good to me. I don't know if you can easily test it?
>
> Gedare
>
> On Wed, Sep 22, 2021 at 11:26 AM zack leung 
> wrote:
> >
> > ll hex values now have 8 character width
> > thread id is now hex
> > updates #4203
> > ---
> >  cpukit/score/cpu/i386/cpu.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
> > index 77b7a7161c..786cf8b0b6 100644
> > --- a/cpukit/score/cpu/i386/cpu.c
> > +++ b/cpukit/score/cpu/i386/cpu.c
> > @@ -215,16 +215,16 @@ void _CPU_Exception_frame_print (const
> > CPU_Exception_frame *ctx)
> >  {
> >unsigned int faultAddr = 0;
> >
> printk("--\n");
> > -  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
> > PRId32 "\n",
> > +  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread
> 0x%08"
> > PRIx32 "\n",
> >   ctx->idtIndex,
> >   ctx->eip,
> >   _Thread_Executing->Object.id);
> >
> printk("--\n");
> >printk("Processor execution context at time of the fault was  :\n");
> >
> printk("--\n");
> > -  printk(" EAX = %" PRIx32 "EBX = %" PRIx32 "ECX = %" PRIx32 "
> > EDX = %" PRIx32 "\n",
> > +  printk(" EAX =  0x%08" PRIx32 "EBX =  0x%08" PRIx32 "ECX =
> > 0x%08" PRIx32 "EDX =  0x%08" PRIx32 "\n",
> >   ctx->eax, ctx->ebx, ctx->ecx, ctx->edx);
> > -  printk(" ESI = %" PRIx32 "EDI = %" PRIx32 "EBP = %" PRIx32 "
> > ESP = %" PRIx32 "\n",
> > +  printk(" ESI = 0x%08" PRIx32 "EDI =  0x%08" PRIx32 "EBP =
> > 0x%08" PRIx32 "ESP =  0x%08" PRIx32 "\n",
> >   ctx->esi, ctx->edi, ctx->ebp, ctx->esp0);
> >
> printk("--\n");
> >printk("Error code pushed by processor itself (if not 0) = %" PRIx32
> > "\n",
> > --
> > 2.33.0
> > ___
> > devel mailing list
> > devel@rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCHv5] improve the format error reporting on i386

2021-09-22 Thread Gedare Bloom
Joel,

This looks good to me. I don't know if you can easily test it?

Gedare

On Wed, Sep 22, 2021 at 11:26 AM zack leung  wrote:
>
> ll hex values now have 8 character width
> thread id is now hex
> updates #4203
> ---
>  cpukit/score/cpu/i386/cpu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
> index 77b7a7161c..786cf8b0b6 100644
> --- a/cpukit/score/cpu/i386/cpu.c
> +++ b/cpukit/score/cpu/i386/cpu.c
> @@ -215,16 +215,16 @@ void _CPU_Exception_frame_print (const
> CPU_Exception_frame *ctx)
>  {
>unsigned int faultAddr = 0;
>printk("--\n");
> -  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
> PRId32 "\n",
> +  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread 0x%08"
> PRIx32 "\n",
>   ctx->idtIndex,
>   ctx->eip,
>   _Thread_Executing->Object.id);
>printk("--\n");
>printk("Processor execution context at time of the fault was  :\n");
>printk("--\n");
> -  printk(" EAX = %" PRIx32 "EBX = %" PRIx32 "ECX = %" PRIx32 "
> EDX = %" PRIx32 "\n",
> +  printk(" EAX =  0x%08" PRIx32 "EBX =  0x%08" PRIx32 "ECX =
> 0x%08" PRIx32 "EDX =  0x%08" PRIx32 "\n",
>   ctx->eax, ctx->ebx, ctx->ecx, ctx->edx);
> -  printk(" ESI = %" PRIx32 "EDI = %" PRIx32 "EBP = %" PRIx32 "
> ESP = %" PRIx32 "\n",
> +  printk(" ESI = 0x%08" PRIx32 "EDI =  0x%08" PRIx32 "EBP =
> 0x%08" PRIx32 "ESP =  0x%08" PRIx32 "\n",
>   ctx->esi, ctx->edi, ctx->ebp, ctx->esp0);
>printk("--\n");
>printk("Error code pushed by processor itself (if not 0) = %" PRIx32
> "\n",
> --
> 2.33.0
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCHv5] improve the format error reporting on i386

2021-09-22 Thread zack leung
ll hex values now have 8 character width
thread id is now hex
updates #4203
---
 cpukit/score/cpu/i386/cpu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
index 77b7a7161c..786cf8b0b6 100644
--- a/cpukit/score/cpu/i386/cpu.c
+++ b/cpukit/score/cpu/i386/cpu.c
@@ -215,16 +215,16 @@ void _CPU_Exception_frame_print (const
CPU_Exception_frame *ctx)
 {
   unsigned int faultAddr = 0;
   printk("--\n");
-  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
PRId32 "\n",
+  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread 0x%08"
PRIx32 "\n",
  ctx->idtIndex,
  ctx->eip,
  _Thread_Executing->Object.id);
   printk("--\n");
   printk("Processor execution context at time of the fault was  :\n");
   printk("--\n");
-  printk(" EAX = %" PRIx32 "EBX = %" PRIx32 "ECX = %" PRIx32 "
EDX = %" PRIx32 "\n",
+  printk(" EAX =  0x%08" PRIx32 "EBX =  0x%08" PRIx32 "ECX =
0x%08" PRIx32 "EDX =  0x%08" PRIx32 "\n",
  ctx->eax, ctx->ebx, ctx->ecx, ctx->edx);
-  printk(" ESI = %" PRIx32 "EDI = %" PRIx32 "EBP = %" PRIx32 "
ESP = %" PRIx32 "\n",
+  printk(" ESI = 0x%08" PRIx32 "EDI =  0x%08" PRIx32 "EBP =
0x%08" PRIx32 "ESP =  0x%08" PRIx32 "\n",
  ctx->esi, ctx->edi, ctx->ebp, ctx->esp0);
   printk("--\n");
   printk("Error code pushed by processor itself (if not 0) = %" PRIx32
"\n",
-- 
2.33.0
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCHv5] improve the format error reporting on i386

2021-09-22 Thread Gedare Bloom
On Tue, Sep 21, 2021 at 4:06 PM zack leung  wrote:
>
> all hex values now have 8 character width
> thread id is now hex
> ---
>  cpukit/score/cpu/i386/cpu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
> index 77b7a7161c..786cf8b0b6 100644
> --- a/cpukit/score/cpu/i386/cpu.c
> +++ b/cpukit/score/cpu/i386/cpu.c
> @@ -215,16 +215,16 @@ void _CPU_Exception_frame_print (const
> CPU_Exception_frame *ctx)
>  {
>unsigned int faultAddr = 0;
>printk("--\n");
> -  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
> PRId32 "\n",
> +  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
> PRIx32 "\n",

The thread ID does not have 8 character fixed width.

>   ctx->idtIndex,
>   ctx->eip,
>   _Thread_Executing->Object.id);
>printk("--\n");
>printk("Processor execution context at time of the fault was  :\n");
>printk("--\n");
> -  printk(" EAX = %" PRIx32 "EBX = %" PRIx32 "ECX = %" PRIx32 "
> EDX = %" PRIx32 "\n",
> +  printk(" EAX =  0x%08" PRIx32 "EBX =  0x%08" PRIx32 "ECX =
> 0x%08" PRIx32 "EDX =  0x%08" PRIx32 "\n",
>   ctx->eax, ctx->ebx, ctx->ecx, ctx->edx);
> -  printk(" ESI = %" PRIx32 "EDI = %" PRIx32 "EBP = %" PRIx32 "
> ESP = %" PRIx32 "\n",
> +  printk(" ESI = 0x%08" PRIx32 "EDI =  0x%08" PRIx32 "EBP =
> 0x%08" PRIx32 "ESP =  0x%08" PRIx32 "\n",
>   ctx->esi, ctx->edi, ctx->ebp, ctx->esp0);
>printk("--\n");
>printk("Error code pushed by processor itself (if not 0) = %" PRIx32
> "\n",
> --
> 2.33.0
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCHv5] improve the format error reporting on i386

2021-09-21 Thread zack leung
all hex values now have 8 character width
thread id is now hex
---
 cpukit/score/cpu/i386/cpu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
index 77b7a7161c..786cf8b0b6 100644
--- a/cpukit/score/cpu/i386/cpu.c
+++ b/cpukit/score/cpu/i386/cpu.c
@@ -215,16 +215,16 @@ void _CPU_Exception_frame_print (const
CPU_Exception_frame *ctx)
 {
   unsigned int faultAddr = 0;
   printk("--\n");
-  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
PRId32 "\n",
+  printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
PRIx32 "\n",
  ctx->idtIndex,
  ctx->eip,
  _Thread_Executing->Object.id);
   printk("--\n");
   printk("Processor execution context at time of the fault was  :\n");
   printk("--\n");
-  printk(" EAX = %" PRIx32 "EBX = %" PRIx32 "ECX = %" PRIx32 "
EDX = %" PRIx32 "\n",
+  printk(" EAX =  0x%08" PRIx32 "EBX =  0x%08" PRIx32 "ECX =
0x%08" PRIx32 "EDX =  0x%08" PRIx32 "\n",
  ctx->eax, ctx->ebx, ctx->ecx, ctx->edx);
-  printk(" ESI = %" PRIx32 "EDI = %" PRIx32 "EBP = %" PRIx32 "
ESP = %" PRIx32 "\n",
+  printk(" ESI = 0x%08" PRIx32 "EDI =  0x%08" PRIx32 "EBP =
0x%08" PRIx32 "ESP =  0x%08" PRIx32 "\n",
  ctx->esi, ctx->edi, ctx->ebp, ctx->esp0);
   printk("--\n");
   printk("Error code pushed by processor itself (if not 0) = %" PRIx32
"\n",
-- 
2.33.0
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel