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
The "setsymbolserver -ms" added to the .lldbinit by dotnet-sos fails #3032
The "setsymbolserver -ms" added to the .lldbinit by dotnet-sos fails because the symbol service wrapper class needed by the C++ setsymbolserver command is per target and the target hasn't been created yet when the .lldbinit file is processed.
The fix is to port the setsymbolserver command to C# which will use the global ISymbolService remove the target dependency.
Configuration
Any Linux or MacOS under lldb installed with dotnet-sos.
Is this bug cause the "setsymbolserver -directory /directory/to/the/symbols" failed on latest Ubuntu 22.04 (lldb-11 or plus) too? BTW, are there any diagnostic logs about this command?
This bug only affects the command if it is in your .lldbinit or executed before a target (live session, attach or core dump) is created. The version of lldb or Linux distro should not matter.
Thanks for your response. But whenever I try to run the setsymbolserver command in lldbinit or lldb and despite the parameter I use (-directory,-ms or others), I always get this message: setsymbolserver xxxx -failed
Do you know where I can find some logs or more information about this?
BTW, sos command like clrstack works fine. But because of symbol missing, a lot of functions cannot be recognized when using commands like "thread btrace".
I am very appreciated if you can provide me some tips. 😁
It doesn't matter what the parameter or option if you run it in .lldbinit it will error. You need to run it at the lldb command line prompt. FYI, thread btrace is a lldb command not an SOS command. The only command that my help is loadsymbols which attempts to download the .NET Core native symbol files. But you will have to run setsymbolserver -ms first.
Thanks for your response and I did run the command directly from the lldb command line prompt too and every times, the setsymbolserver command return to me "setsymbolserver xxxx -failed" (before/after) I attached to the process. BTW, the command "thread btrace" can print the unmanged code too and that is what I want but without the symbols, I cannot know the function names for those unmanged code. Do you know what's wrong?
Very appreciated for your support and I think I found the root cause. It was caused by not specifying the architecture when I installed the dotnet-sos tool. Anyway, thanks so much for all your messages! 👍
Activity
SharryXu commentedon Apr 26, 2022
Hi @mikem8361 ,
Is this bug cause the "setsymbolserver -directory /directory/to/the/symbols" failed on latest Ubuntu 22.04 (lldb-11 or plus) too? BTW, are there any diagnostic logs about this command?
mikem8361 commentedon Apr 26, 2022
This bug only affects the command if it is in your .lldbinit or executed before a target (live session, attach or core dump) is created. The version of lldb or Linux distro should not matter.
SharryXu commentedon Apr 26, 2022
Hi @mikem8361 ,
Thanks for your response. But whenever I try to run the setsymbolserver command in lldbinit or lldb and despite the parameter I use (-directory,-ms or others), I always get this message: setsymbolserver xxxx -failed
Do you know where I can find some logs or more information about this?
BTW, sos command like clrstack works fine. But because of symbol missing, a lot of functions cannot be recognized when using commands like "thread btrace".
I am very appreciated if you can provide me some tips. 😁
mikem8361 commentedon Apr 26, 2022
It doesn't matter what the parameter or option if you run it in .lldbinit it will error. You need to run it at the lldb command line prompt. FYI,
thread btraceis a lldb command not an SOS command. The only command that my help isloadsymbolswhich attempts to download the .NET Core native symbol files. But you will have to runsetsymbolserver -msfirst.SharryXu commentedon Apr 27, 2022
Hi @mikem8361 ,
Thanks for your response and I did run the command directly from the lldb command line prompt too and every times, the setsymbolserver command return to me "setsymbolserver xxxx -failed" (before/after) I attached to the process. BTW, the command "thread btrace" can print the unmanged code too and that is what I want but without the symbols, I cannot know the function names for those unmanged code. Do you know what's wrong?
mikem8361 commentedon Apr 27, 2022
You can turn on logging with
logging enablebefore running thesetsymbolserver -mscommand. I have no idea what is wrong.Do you have a .NET Core runtime installed? You need to have 3.1 or greater installed.
dotnet --infowill display something like:SharryXu commentedon Apr 27, 2022
Hi @mikem8361 ,
Very appreciated for your support and I think I found the root cause. It was caused by not specifying the
architecturewhen I installed thedotnet-sostool. Anyway, thanks so much for all your messages! 👍Port setsymbolserver command to C#
Port setsymbolserver command to C#
Port setsymbolserver command to C# (#3050)
Merge main into release/stable (#3089)
Merge main into release/stable (#3100)