mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 397039
For some gdb implementations the "osId" cannot be retrieved because the "TreadIDs" output does not follow the Linux gdb format. Catch the "null" return and not output it as a string. Change-Id: I8d4b711d935c5d81d1e8ff3adb0de5e3fe220061 Reviewed-on: https://git.eclipse.org/r/9334 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
8ca35f737a
commit
2fba04a143
2 changed files with 12 additions and 4 deletions
|
@ -10,6 +10,7 @@
|
|||
* Onur Akdemir (TUBITAK BILGEM-ITI) - Multi-process debugging (Bug 237306)
|
||||
* John Dallaway - GDB 7.x MI thread details field ignored (Bug 325556)
|
||||
* Marc Khouzam (Ericsson) - Make each thread an IDisassemblyDMContext (bug 352748)
|
||||
* Andy Jin (QNX) - Not output thread osId as a string when it is null (Bug 397039)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.gdb.service;
|
||||
|
||||
|
@ -774,12 +775,15 @@ public class GDBProcesses_7_0 extends AbstractDsfService
|
|||
if (getData().getThreadList().length != 0) {
|
||||
MIThread thread = getData().getThreadList()[0];
|
||||
if (thread.getThreadId().equals(threadDmc.getId())) {
|
||||
String id = thread.getOsId();
|
||||
String id = ""; //$NON-NLS-1$
|
||||
if (thread.getOsId() != null) {
|
||||
id = thread.getOsId() + " "; //$NON-NLS-1$
|
||||
}
|
||||
// append thread details (if any) to the thread ID
|
||||
// as for GDB 6.x with CLIInfoThreadsInfo#getOsId()
|
||||
final String details = thread.getDetails();
|
||||
if (details != null && details.length() > 0) {
|
||||
id += " (" + details + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
id += "(" + details + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
threadData = new MIThreadDMData("", id); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Ericsson - initial API and implementation
|
||||
* Andy Jin (QNX) - Not output thread osId as a string when it is null (Bug 397039)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.gdb.service;
|
||||
|
||||
|
@ -175,12 +176,15 @@ public class GDBProcesses_7_1 extends GDBProcesses_7_0 {
|
|||
if (getData().getThreadList().length != 0) {
|
||||
MIThread thread = getData().getThreadList()[0];
|
||||
if (thread.getThreadId().equals(threadDmc.getId())) {
|
||||
String id = thread.getOsId();
|
||||
String id = ""; //$NON-NLS-1$
|
||||
if (thread.getOsId() != null) {
|
||||
id = thread.getOsId() + " "; //$NON-NLS-1$
|
||||
}
|
||||
// append thread details (if any) to the thread ID
|
||||
// as for GDB 6.x with CLIInfoThreadsInfo#getOsId()
|
||||
final String details = thread.getDetails();
|
||||
if (details != null && details.length() > 0) {
|
||||
id += " (" + details + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
id += "(" + details + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
String core = thread.getCore();
|
||||
|
|
Loading…
Add table
Reference in a new issue