-
Notifications
You must be signed in to change notification settings - Fork 48
Description
While adapting RTOS Views extension for gdbtarget, I figured out that some variable expressions are turned into array expressions where they imho should not. A struct or array member which is an array itself gets [] for the access expression, which results in an expression: ((TCB_t*)0x20005cd0)[pcTaskName], where pcTaskName is a char [16] array.
I have changed this to use GDB directly, but this could cause bandwidth issues when running GDB remotely, see: #390
If I got it correctly,
isArrayParent determines if the element itself is an array
isArrayChild determines if the element is part of an array
I want to understand why isArrayParent elements also gets brackets []. I thought about two-dimensional arrays, but they run fine on just using isArrayChild.
This change for arrayParent fixes the issue on parsing (my) expressions and survives 2D arrays:
const isArrayParent = arrayRegex.test(child.type) && arrayChildRegex.test(child.exp);
@asimgunes, @jonahgraham, can someone help?
Ref. (two approaches):
- minimum required changes to make RTOS Views extension work (would prefer now):
- greater approach (prob. later, if expressions require):