@@ -1177,6 +1177,7 @@ export class GDBDebugSession extends LoggingDebugSession {
11771177 args . name . replace ( / ^ \[ ( \d + ) \] / , '$1' ) ;
11781178 const stackDepth = await mi . sendStackInfoDepth ( this . gdb , {
11791179 maxDepth : 100 ,
1180+ threadId : frame . threadId ,
11801181 } ) ;
11811182 const depth = parseInt ( stackDepth . depth , 10 ) ;
11821183 let varobj = this . gdb . varManager . getVar (
@@ -1321,6 +1322,7 @@ export class GDBDebugSession extends LoggingDebugSession {
13211322
13221323 const stackDepth = await mi . sendStackInfoDepth ( this . gdb , {
13231324 maxDepth : 100 ,
1325+ threadId : frame . threadId ,
13241326 } ) ;
13251327 const depth = parseInt ( stackDepth . depth , 10 ) ;
13261328 let varobj = this . gdb . varManager . getVar (
@@ -1908,6 +1910,7 @@ export class GDBDebugSession extends LoggingDebugSession {
19081910 // stack depth necessary for differentiating between similarly named variables at different stack depths
19091911 const stackDepth = await mi . sendStackInfoDepth ( this . gdb , {
19101912 maxDepth : 100 ,
1913+ threadId : frame . threadId ,
19111914 } ) ;
19121915 const depth = parseInt ( stackDepth . depth , 10 ) ;
19131916
@@ -2061,6 +2064,7 @@ export class GDBDebugSession extends LoggingDebugSession {
20612064 // fetch stack depth to obtain frameId/threadId/depth tuple
20622065 const stackDepth = await mi . sendStackInfoDepth ( this . gdb , {
20632066 maxDepth : 100 ,
2067+ threadId : frame . threadId ,
20642068 } ) ;
20652069 const depth = parseInt ( stackDepth . depth , 10 ) ;
20662070 // we need to keep track of children and the parent varname in GDB
0 commit comments