• R/O
  • SSH
  • HTTPS

chibios: Commit


Commit MetaInfo

Revision14055 (tree)
Time2021-02-20 18:27:23
Authorgdisirio

Log Message

Updated RT6 plugin to make it compatible with latest changes in queues/lists.

Change Summary

Incremental Difference

--- branches/chibistudio_trunk/common/chibistudio_update_site/site.xml (revision 14054)
+++ branches/chibistudio_trunk/common/chibistudio_update_site/site.xml (revision 14055)
@@ -3,7 +3,7 @@
33 <description name="ChibiStudio Update Site" url="http://www.chibios.org/eclipse/chibistudio">
44 ChibiStudio Eclipse Update Site.
55 </description>
6- <feature url="features/org.chibios.eclipse.tools.feature_4.1.1.qualifier.jar" id="org.chibios.eclipse.tools.feature" version="4.1.1.qualifier">
6+ <feature url="features/org.chibios.eclipse.tools.feature_4.2.0.qualifier.jar" id="org.chibios.eclipse.tools.feature" version="4.2.0.qualifier">
77 <category name="chibistudio_components"/>
88 </feature>
99 <category-def name="chibistudio_components" label="ChibiStudio Eclipse Components">
--- branches/chibistudio_trunk/tools/chibios-rt6_debug_support/src/org/chibios/tools/eclipse/debug/utils/KernelObjects.java (revision 14054)
+++ branches/chibistudio_trunk/tools/chibios-rt6_debug_support/src/org/chibios/tools/eclipse/debug/utils/KernelObjects.java (revision 14055)
@@ -217,8 +217,18 @@
217217 n = evaluateExpressionNumber("(uint32_t)((struct ch_thread *)" + current + ")->flags");
218218 map.put("flags", Long.toString(n));
219219
220- n = evaluateExpressionNumber("(uint32_t)((struct ch_thread *)" + current + ")->prio");
221- map.put("prio", Long.toString(n));
220+ try {
221+ n = evaluateExpressionNumber("(uint32_t)((struct ch_thread *)" + current + ")->hdr.pqueue.prio");
222+ map.put("prio", Long.toString(n));
223+ } catch (DebugProxyException e) {
224+ // Fallback for older ChibiOS versions.
225+ try {
226+ n = evaluateExpressionNumber("(uint32_t)((struct ch_thread *)" + current + ")->prio");
227+ map.put("prio", Long.toString(n));
228+ } catch (DebugProxyException ex) {
229+ map.put("prio", "-");
230+ }
231+ }
222232
223233 try {
224234 n = evaluateExpressionNumber("(uint32_t)((struct ch_thread *)" + current + ")->refs");
@@ -315,7 +325,12 @@
315325 while (true) {
316326
317327 // Fetching next timer in the delta list (next link).
318- current = evaluateExpression("(uint32_t)((struct ch_virtual_timer *)" + current + ")->next");
328+ try {
329+ current = evaluateExpression("(uint32_t)((struct ch_virtual_timer *)" + current + ")->dlist.next");
330+ } catch (DebugProxyException e) {
331+ // Fallback for older ChibiOS versions.
332+ current = evaluateExpression("(uint32_t)((struct ch_virtual_timer *)" + current + ")->next");
333+ }
319334
320335 // This can happen if the kernel is not initialized yet or if the
321336 // delta list is corrupted.
@@ -325,7 +340,13 @@
325340 // TODO: integrity check on the pointer value (alignment, range).
326341
327342 // The previous timer in the delta list is fetched as a integrity check.
328- String prev = evaluateExpression("(uint32_t)((struct ch_virtual_timer *)" + current + ")->prev");
343+ String prev;
344+ try {
345+ prev = evaluateExpression("(uint32_t)((struct ch_virtual_timer *)" + current + ")->dlist.prev");
346+ } catch (DebugProxyException e) {
347+ // Fallback for older ChibiOS versions.
348+ prev = evaluateExpression("(uint32_t)((struct ch_virtual_timer *)" + current + ")->prev");
349+ }
329350 if (prev.compareTo("0") == 0)
330351 throw new DebugProxyException("ChibiOS/RT delta list integrity check failed, NULL pointer");
331352 if (previous.compareTo(prev) != 0)
@@ -340,7 +361,13 @@
340361
341362 // Fetch of the various fields in the virtual_timer_t structure. Some fields
342363 // are optional so are placed within try-catch.
343- long n = evaluateExpressionNumber("(uint32_t)((struct ch_virtual_timer *)" + current + ")->delta");
364+ long n;
365+ try {
366+ n = evaluateExpressionNumber("(uint32_t)((struct ch_virtual_timer *)" + current + ")->dlist.delta");
367+ } catch (DebugProxyException e) {
368+ // Fallback for older ChibiOS versions.
369+ n = evaluateExpressionNumber("(uint32_t)((struct ch_virtual_timer *)" + current + ")->delta");
370+ }
344371 map.put("delta", Long.toString(n));
345372
346373 n = evaluateExpressionNumber("(uint32_t)((struct ch_virtual_timer *)" + current + ")->func");
@@ -496,12 +523,20 @@
496523 LinkedHashMap<String, String> map = new LinkedHashMap<String, String>(16);
497524
498525 try {
526+ String vt_lasttime = evaluateExpression("(uint32_t)ch.vtlist.dlist.delta");
527+ if (vt_lasttime == null)
528+ return null;
529+ map.put("vt_lasttime", vt_lasttime);
530+ } catch (DebugProxyException e) {
531+ // Fallback for older ChibiOS versions.
532+ try {
499533 String vt_lasttime = evaluateExpression("(uint32_t)ch.vtlist.delta");
500534 if (vt_lasttime == null)
501535 return null;
502536 map.put("vt_lasttime", vt_lasttime);
503- } catch (DebugProxyException e1) {
504- throw new DebugProxyException("virtual timers list not found on target");
537+ } catch (DebugProxyException ex) {
538+ throw new DebugProxyException("virtual timers list not found on target");
539+ }
505540 } catch (Exception e) {
506541 return null;
507542 }
--- branches/chibistudio_trunk/tools/chibios_eclipse_feature/feature.xml (revision 14054)
+++ branches/chibistudio_trunk/tools/chibios_eclipse_feature/feature.xml (revision 14055)
@@ -2,7 +2,7 @@
22 <feature
33 id="org.chibios.eclipse.tools.feature"
44 label="ChibiOS Eclipse Tools"
5- version="4.1.1.qualifier"
5+ version="4.2.0.qualifier"
66 provider-name="www.chibios.org"
77 plugin="org.chibios.chibistudio.branding"
88 exclusive="true">
Show on old repository browser