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

Impossible to call dumpil /i on Linux #1478

Closed
kevingosse opened this issue Aug 24, 2020 · 1 comment
Closed

Impossible to call dumpil /i on Linux #1478

kevingosse opened this issue Aug 24, 2020 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kevingosse
Copy link
Contributor

kevingosse commented Aug 24, 2020

dumpil can't be called on Linux with the i parameter (to feed a direct address to IL code)

> dumpil -i 0x00007fce8c983790
Unknown option: -i
> dumpil /i 0x00007fce8c983790
Incorrect argument: 0x00007fce8c983790

The problem is that one one side dumpil declares the /i parameter:

    CMDOption option[] =
    {   // name, vptr, type, hasValue
        {"/d", &dml, COBOOL, FALSE},
        {"/i", &fILPointerDirectlySpecified, COBOOL, FALSE},
    };

But then on Linux, parameters are not allowed to start with a /:

#ifndef FEATURE_PAL
        if (ptr[0] != '-' && ptr[0] != '/') {
#else
        if (ptr[0] != '-') {
#endif

The fix could be to declare the parameter as -i on Linux, but this would cause inconsistencies with the documentation. I don't know why / is filtered out to begin with.

@mikem8361 mikem8361 self-assigned this Aug 24, 2020
@mikem8361 mikem8361 added the bug Something isn't working label Aug 24, 2020
@mikem8361 mikem8361 added this to Needs Triage in .NET Core Diagnostics via automation Aug 24, 2020
@mikem8361 mikem8361 added this to the 5.0 milestone Aug 24, 2020
@mikem8361
Copy link
Member

The reason '/' is not allowed on xplat is that it caused problems parsing file paths as args. It most cases '-' is used except for this case and for the dml '/d' which isn't supported on lldb.

I'll fix it by adding -i as an option and add it to the doc.

mikem8361 added a commit to mikem8361/diagnostics that referenced this issue Aug 24, 2020
On Linux/MacOS '/' isn't allowed as an option but the dumpil command had '/i'. The reason '/' is not allowed on xplat is that it caused problems parsing file paths as args. It most cases '-' is used except for this case and for the dml '/d' which isn't supported on lldb.

I'll fix it by adding -i as an option to dumpil and add it to the doc.

This also give me the chance to remove a bunch of unnecessary #ifndef FEATURE_PAL around the "/d" DML option.

Issue #dotnet#1478
mikem8361 added a commit that referenced this issue Aug 25, 2020
On Linux/MacOS '/' isn't allowed as an option but the dumpil command had '/i'. The reason '/' is not allowed on xplat is that it caused problems parsing file paths as args. It most cases '-' is used except for this case and for the dml '/d' which isn't supported on lldb.

I'll fix it by adding -i as an option to dumpil and add it to the doc.

This also give me the chance to remove a bunch of unnecessary #ifndef FEATURE_PAL around the "/d" DML option.

Issue ##1478
.NET Core Diagnostics automation moved this from Needs Triage to Done Aug 25, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Jun 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants