You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TryGetTidFromTargetId() fails to parse thread ID from target-id if format is like Thread 123.123 #1448
We currently have two fields in DebuggedThread object, namely Id and TargetId.
We store the global numeric ID assigned to the thread by GDB in Id.
However, we strip all the target-specific string information and only use the numeric value to store in the TargetId. This can lead to complications when we are debugging with multiple devices. The target ID may be no longer unique. The TargetId needs to be a string and we need to fetch it as is. We had to temporarily change the "target-id" field from ZE to Thread but this cannot be up-streamed to gdb.
Also in AD7Thread that implements IDebugThread2.GetThreadId, we use TargetId to get ThreadId.
Activity
iyerrakesh commentedon Jul 17, 2024
We currently have two fields in DebuggedThread object, namely Id and TargetId.
We store the global numeric ID assigned to the thread by GDB in Id.
However, we strip all the target-specific string information and only use the numeric value to store in the TargetId. This can lead to complications when we are debugging with multiple devices. The target ID may be no longer unique. The TargetId needs to be a string and we need to fetch it as is. We had to temporarily change the "target-id" field from ZE to Thread but this cannot be up-streamed to gdb.
Also in AD7Thread that implements IDebugThread2.GetThreadId, we use TargetId to get ThreadId.
MIEngine/src/MIDebugEngine/AD7.Impl/AD7Thread.cs
Line 212 in b8bfa53
This method is called by AD7ExtensionMethods.
MIEngine/src/OpenDebugAD7/AD7ExtensionMethods.cs
Line 18 in b8bfa53
This is in turn used to identify ThreadId for Stopped Event.
MIEngine/src/OpenDebugAD7/AD7DebugSession.cs
Line 644 in b8bfa53
MIEngine: Convert TargetId to string