Skip to content
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

Where is corerun ? #8514

Closed
micli opened this issue Jul 10, 2017 · 6 comments
Closed

Where is corerun ? #8514

micli opened this issue Jul 10, 2017 · 6 comments
Labels
area-Meta documentation Documentation bug or enhancement, does not impact product or test code help wanted [up-for-grabs] Good issue for external contributors untriaged New issue has not been triaged by the area owner
Milestone

Comments

@micli
Copy link

micli commented Jul 10, 2017

At the .NET Core debugging instruction markdown file
https://github.com/dotnet/coreclr/blob/master/Documentation/building/debugging-instructions.md
mentioned that:
Start lldb (the version the plugin was built with, currently 3.6): lldb-3.6 corerun HelloWorld.exe linux

But I cannot find corerun from official installation package.
If I compiled manually, I can find some corerun locations like this:
corerun:[micl@centos7dotnet dotnet]$ find -name corerun ./coreclr/src/coreclr/hosts/corerun ./coreclr/bin/Product/Linux.x64.Debug/corerun ./coreclr/bin/obj/Linux.x64.Debug/src/coreclr/hosts/unixcorerun/corerun ./corefx/packages/runtime.linux-x64.microsoft.netcore.testhost/2.1.0-preview1-25409-01/runtimes/linux-x64/native/corerun ./corefx/bin/runtime/netcoreapp-Linux-Debug-x64/corerun ./corefx/bin/testhost/netcoreapp-Linux-Debug-x64/shared/Microsoft.NETCore.App/9.9.9/corerun ./corefx/bin/Unix.AnyCPU.Debug/runtime/netcoreapp/corerun

If I want to launch process from LLDB, how can I do ? Thanks!

@micli
Copy link
Author

micli commented Jul 10, 2017

Actually, if you run dotnet run in .NET project folder, the compiled binary will be HelloWorld.dll not HelloWorld.exe . I don't know how to launch a HelloWorld.dll process by LLDB.

@mikedn
Copy link
Contributor

mikedn commented Jul 10, 2017

I'm not exactly familiar with this but have you tried running via the dotnet command?

The instructions you're looking at are about debugging the runtime itself so they assume that you build it, use its own corerun and some test managed executable.

@micli
Copy link
Author

micli commented Jul 10, 2017

@mikedn I know how to run a dll on Linux. But now I am going to debug process and have to lunch it by LLDB.

Finally I launched lldb with below command:
lldb /usr/local/bin/dotnet ~/dotnet/demos/HelloWorld/bin/Debug/netcoreapp2.0/HelloWorld.dll
It works.

It seems dotnet functionally replaced corerun. But the confused is that I did not find corerun in official .NET Core SDK package. But If I compiled coreclr project, I will find corerun in some folders as below.
./coreclr/src/coreclr/hosts/corerun ./coreclr/bin/Product/Linux.x64.Debug/corerun ./coreclr/bin/obj/Linux.x64.Debug/src/coreclr/hosts/unixcorerun/corerun ./corefx/packages/runtime.linux-x64.microsoft.netcore.testhost/2.1.0-preview1-25409-01/runtimes/linux-x64/native/corerun ./corefx/bin/runtime/netcoreapp-Linux-Debug-x64/corerun ./corefx/bin/testhost/netcoreapp-Linux-Debug-x64/shared/Microsoft.NETCore.App/9.9.9/corerun ./corefx/bin/Unix.AnyCPU.Debug/runtime/netcoreapp/corerun

Actually, I want to clarify below information:
a) Is corerun is a prerequisites components in coreclr ?
b) Is corerun has been replaced by dotnet in future?
c) Is the document https://github.com/dotnet/coreclr/blob/master/Documentation/building/debugging-instructions.md tooooo old? or my operations are wrong?

@mikedn
Copy link
Contributor

mikedn commented Jul 10, 2017

It seems dotnet functionally replaced corerun.

Not really, as far as .NET Core is concerned dotnet is the way to run apps, that's how it has always been. corerun is a coreclr specific tool used to debug and test the runtime itself.

@jkotas
Copy link
Member

jkotas commented Jul 10, 2017

Check https://docs.microsoft.com/en-us/dotnet/core/tutorials/netcore-hosting

dotnet is a more complex host that has built-in support for NuGet abstractions. You get it by default from .NET Core tooling.

corerun is a simple host that runs whatever is in the given directory. It tends to be preferred by engineers who work on low-level runtime.

Would you mind updating the debugging instructions to clarify that they work equally well for both dotnet and corerun hosts?

@danmoseley
Copy link
Member

Out of date now I think.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Meta documentation Documentation bug or enhancement, does not impact product or test code help wanted [up-for-grabs] Good issue for external contributors untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

6 participants