-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path Substitutions Ignored for Attach #293
Comments
Good catch! |
I was looking into this a bit more and it seems like this likely doesn't work at all for LLDB. I don't typically use LLDB, but installed it to experiment with a potential fix to this. I noticed that in "lldb.js", neither "launchRequest" nor "attachRequest" call "setPathSubstitutions" (as they do in the gdb.ts versions), so no extra commands are even enqueued for LLDB. I played around with adding a call to "setPathSubstitutions" in the LLDB "launchRequest" to see if it would then at least work for the launch configuration, but ran into another problem. It appears the "settings set target.source-map" (used in the LLDB version of "setPathSubstitutions") is not recognized by LLDB-MI (at least lldb-mi-9 that I was using).
It's unclear to me if this was not tested or maybe my lldb-mi version is too old. Is there an alternative command that should be used here instead or do I need a newer version of lldb-mi? |
That is not lldb-mi command, it should be sent to lldb as "normal command" as it is when you enter a command in the console - which should work, doesn't it? If that works the |
Thanks. I think my problem is that I needed to use "sendCliCommand" instead of just "sendCommand". That seems to fix that particular issue I was having. I'll keep working on this. |
The path substitutions are intially handled in "setPathSubstitutions" (i.e., gdb.ts and lldb.ts) by adding specific debugger commands (e.g., "set substitute-path" for GDB), to the list of "extraCommands" in miDebugger. However, these extra commands are only sent to the backend for the "launch" configuration, but not for the "attach". It appears the only place the "extraCommands" are referenced are in "MI2.initCommands", which is only invoked from the "MI2.load" API (which corresponds to the "launch" configuration). It is likely "initCommands" should also be called from the "MI2.connect" and "MI2.attach" APIs as well, which correspond to the "attach" configuration.
The text was updated successfully, but these errors were encountered: