Community
Participate
Working Groups
When threads are selected and/or unselected in the multicore visualizer, the selection is synchronized in the debug view. I noticed that this only seems to work for the first debug session, however. Not the first session created, but whatever session is the first (topmost in the debug view) at any given moment. After a bit of investigation, I think the reason is how DebugViewTreeWalker.getRootPath() is implemented. Consider the following line from that method: Object root = (items == null || items.length == 0) ? null : items[0].getData(); It seems that each debug session has its entry in the "items" array above. So, in the current code, only the first session is considered. To give a bit of context, here is the whole method: public TreePath getRootPath() { // (?) This doesn't always return the expected root element. //return m_viewer.getTopElementPath(); TreePath path = null; if (m_viewer != null) { Tree tree = (Tree) m_viewer.getControl(); TreeItem[] items = tree.getItems(); Object root = (items == null || items.length == 0) ? null : items[0].getData(); if (root != null) path = new TreePath(new Object[] {root}); } return path; }
Hi, Here is a proposed patch for this bug: https://git.eclipse.org/r/11547 Basically I did a small update so that getRootPath() now returns an array of root paths, each one being the root for a debug session. Also the walk() method iterates through all those paths. The effect is that all sessions are now walked, not just the first one. ---------------- w/r to the patch submitted in this bug, I declare the following: 1) that I am authorized to submit this code change 2) that the code is 100% my own work Marc Dumais
Change submitted through Gerrit.