2

I'm trying to debug my C code in vscode, and I'm having some problems.
I'm using ubuntu and have gcc and gdb debugger installed. when I start debugging my code and reach to a line with `printf` or `scanf`, I get this error:
`Unable to open 'libc-start.c': Unable to read file '/build/glibc-eX1tMB/glibc-2.31/csu/libc-start.c' (Error: Unable to resolve nonexistent file '/build/glibc-eX1tMB/glibc-2.31/csu/libc-start.c').`
I read some answers to this question saying I have to install `glibc-source`, and I did that. then I added this to my launch.json:
"sourceFileMap": {
                "/build/glibc-S7xCS9": "/usr/src/glibc"
          }

still nothing's changed.
do you know anything that could help me? I could provide more information if needed.
0

1 Answer 1

2

I did that. then I added this to my launch.json:

"sourceFileMap": {
               "/build/glibc-S7xCS9": "/usr/src/glibc"
         }

Your error mentions /build/glibc-eX1tMB/.... You should change glibc-S7xCS9 to glibc-eX1tMB in your .json file.

(The directory /build/glibc-.... is a temporary directory created for each separate build. You would need to change it every time you update your GLIBC version.)

I'm having some problems.

Note that there isn't an actual problem here, unless you need to debug GLIBC internals.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, but how do I find this unique-identifier without the error message? VSCode seems to be able to find the glibc source code so it doesn't show error message, but I'm sure the unique identifier is wrong, and that's the reason it doesn't step into the source code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.