cdt-gdb-adapter icon indicating copy to clipboard operation
cdt-gdb-adapter copied to clipboard

Local Variable of same name in between function update variable failed.

Open noneghost opened this issue 6 months ago • 0 comments

I found a phenomenon similar to cortex-debug issue

#include <stdio.h>
#include <unistd.h>

void function_one() {
    int num = 10;
    printf("function one\r\n");
}

void function_two() {
    int num = 20;
    printf("function two\r\n");
}


int main() {
    printf("hello world!");
    function_one();
    function_two();
    return 0;
}

function_one context:

Image

function_two context:

Image

Additional:

CDT GDB Debug Adapter Extension: v2.0.1 Version 1.60.200 VS Code API Version: 1.98.2

noneghost avatar Apr 24 '25 05:04 noneghost