Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Plugin update] IDE freezes when debugger handles a watch item with special content
#1
Sometimes the debugger freezes out of the blue. I succeeded in removing the randomness:

- Setting
  - EmBitz 2.00
  - Debugger Plugin 2.1 (2.0 ditto)
  - EBlink 4.4-[31]
  - STM32F103C8T6
  - WinXP (Win7 ditto)

- ToDo
  - add code
    typedef struct
    {
      int8_t Val;
    } TTestSubStruct;
    struct
    {
      TTestSubStruct TestSubStruct;
    } TestStruct;
    int main(void)
    {
      TestStruct.TestSubStruct.Val = 0x27; // 'magic value'
      while(true)
      {
      }
    }
  - run program
  - add watch on "TestStruct"
  - EmBitz hangs immediately


I hope you can reproduce this.
Reply
#2
(09-11-2021, 07:25 PM)Daniel Wrote: Sometimes the debugger freezes out of the blue. I succeeded in removing the randomness:

...
I hope you can reproduce this.

Thanks,

Attached a version which should solve this.
Reply
#3
With the new version version 2.2 (alias 2.02) it's working with 0x27 for "TestStruct.TestSubStruct.Val". But it does not working with 0x5c anymore.  :-)
Reply
#4
(12-11-2021, 01:55 PM)Daniel Wrote: With the new version version 2.2 (alias 2.02) it's working with 0x27 for "TestStruct.TestSubStruct.Val". But it does not working with 0x5c anymore.  :-)


That MI protocol really sucks, time to replace it by e.g. json.

New plugin with following test scenario

Code:
typedef struct
{
    int8_t Val;
} TTestSubStruct;


struct
{
    int8_t val;
    TTestSubStruct TestSubStruct;
} TestStruct;


int main(void)
{
    TestStruct.val = '{';
    TestStruct.TestSubStruct.Val = '\''; // 'magic value'
    TestStruct.TestSubStruct.Val = '\\'; // 'magic value'
    TestStruct.TestSubStruct.Val = '\"'; // 'magic value'
    TestStruct.TestSubStruct.Val = '='; // 'magic value'
    TestStruct.TestSubStruct.Val = '}'; // 'magic value'
    TestStruct.val = '[';
    TestStruct.TestSubStruct.Val = ']'; // 'magic value'
    while(1)
    {
    }
}
Reply
#5
I'm so sorry, there is another problem case. I've added two lines:




Code:
typedef struct
{
    int8_t Val;
    int8_t Arr[2]; // ### new ###
} TTestSubStruct;


struct
{
    int8_t val;
    TTestSubStruct TestSubStruct;
} TestStruct;


int main(void)
{
    TestStruct.val = '{';
    TestStruct.TestSubStruct.Val = '\''; // 'magic value'
    TestStruct.TestSubStruct.Val = '\\'; // 'magic value'
    TestStruct.TestSubStruct.Val = '\"'; // 'magic value'
    TestStruct.TestSubStruct.Val = '='; // 'magic value'
    TestStruct.TestSubStruct.Val = '}'; // 'magic value'
    TestStruct.val = '[';
    TestStruct.TestSubStruct.Val = ']'; // 'magic value'
    TestStruct.TestSubStruct.Arr[0] = '\''; // ### new ###
    while(1)
    {
    }
}


BTW: The Raspberry EBlink version works great!
Reply
#6
Test code:

Code:
typedef struct
{
    int8_t Val;
    int8_t Arr[3];
} TTestSubStruct;


struct
{
    int8_t val;
    TTestSubStruct TestSubStruct;
} TestStruct;


int main(void)
{
    while(1)
    {
        TestStruct.val = '{';
        TestStruct.TestSubStruct.Val = '\'';
        TestStruct.TestSubStruct.Val = '\\';
        TestStruct.TestSubStruct.Val = '\"';
        TestStruct.TestSubStruct.Arr[0] = '\'';
        TestStruct.TestSubStruct.Arr[1] = '\\';
        TestStruct.TestSubStruct.Arr[2] = '\\';
        TestStruct.TestSubStruct.Val = '=';
        TestStruct.TestSubStruct.Val = '}';
        TestStruct.val = '[';
        TestStruct.TestSubStruct.Arr[1] = '"';
        TestStruct.TestSubStruct.Val = ']';
        TestStruct.TestSubStruct.Arr[2] = '}';

    }
}


Attached new version. See if we can tackle this Wink


Attached Files
.zip   Debugger plugin 2.0.4.zip (Size: 521 KB / Downloads: 31)
Reply
#7
Good news! My project program is not able to mangle the debugger plugin anymore. The previous plugins "lasted" only a few minutes. The version 2.04 is running for hours now. I think it's done. Smile

Thank you!!

-

And yes, "Speed matters".
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)