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

[debugger][mono][icordbg] Implement minimal version of dbgshim to start an application on desktop #50505

Merged
merged 16 commits into from
Apr 13, 2021

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented Mar 31, 2021

  • Implemented more things on icordbg to try to run coreclr debugger tests
  • Implemented dbgshim to start the process on desktop with debugger enabled and load the correct mscordbi to connect to it.
  • Created a new folder for dlls, now we have dbgshim and mscordbi, as coreclr has.

Next steps:

  • Continue implementing icordebug to make the tests pass.
  • dbgshim be able to start app for android and ios.
  • Make it work for x86

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a rough pass over the code.

The LoadLibrary hack is pretty ugly. I'd like to avoid it if we can.

Overall some good progress, though.

src/mono/dlls/dbgshim/dbgshim.cpp Outdated Show resolved Hide resolved
src/mono/mono/mini/debugger-agent.c Outdated Show resolved Hide resolved
src/mono/mono/mini/debugger-agent.c Outdated Show resolved Hide resolved
thaystg and others added 3 commits March 31, 2021 17:41
…shim_mono

# By Aaron Robinson (10) and others
# Via GitHub
* upstream/main: (108 commits)
  [mbr] Add Apple sample (dotnet#50740)
  make EstablishProxyTunnelAsync throw on failure status code from proxy (dotnet#50763)
  Improve RGB Min Max evaluation performance by using 2 or 3 comparison… (dotnet#50622)
  [mono] More domain cleanups (dotnet#50479)
  Fix Crossgen2 of PlatformDefaultMemberFunction methods and calls. (dotnet#50754)
  Disable EventSource generator in design-time builds (dotnet#50741)
  Fix X509 test failures on Android (dotnet#50301)
  Do not confuse fgDispBasicBlocks in fgMorphBlocks (dotnet#50703)
  Enforce 64KB event payload size limit on EventPipe  (dotnet#50600)
  Reorganize CoreCLR native build to reduce CMake reconfigures when the build system is untouched (dotnet#49906)
  [mbr] Turn on hot reload for iOS, tvOS and MacCatalyst (dotnet#50458)
  improve connection scavenge logic by doing zero-byte read (dotnet#50545)
  Resolve call mdtokens when making tier 1 inline observations (dotnet#50675)
  Annotate APIs in System.Private.Xml (dotnet#49682)
  Support compiling against OpenSSL 3 headers
  Change Configuration.Json to use a regular Dictionary. (dotnet#50611)
  Remove unused BigNumFromBinary P/Invoke (dotnet#50670)
  Make Ninja the default CMake generator on Windows for the repo (dotnet#49715)
  [AppleAppBuilder] Entitlements to run tests on catalyst using the JIT (dotnet#50637)
  [mono] Fix delegate invokes to dynamic methods in mixed mode. (dotnet#50547)
  ...

# Conflicts:
#	src/mono/dlls/mscordbi/CMakeLists.txt
@thaystg thaystg marked this pull request as ready for review April 6, 2021 14:06
Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

src/mono/mono/mini/debugger-protocol.c Outdated Show resolved Hide resolved
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
@thaystg thaystg merged commit 82e8d0e into dotnet:main Apr 13, 2021
@filipnavara
Copy link
Member

🎉

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CLR_DIR ${PROJECT_SOURCE_DIR}/../../coreclr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like this is one level short.

${PROJECT_SOURCE_DIR}/../mscordbi
${PROJECT_SOURCE_DIR}/../mscordbi/socket-dbi
${PROJECT_SOURCE_DIR}/../../../coreclr/md/enc
${PROJECT_SOURCE_DIR}/../../../coreclr/inc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the CLR_DIR property here?

{
if (!m_pAssemblyName) {
LOG((LF_CORDB, LL_INFO1000000, "CordbAssembly - GetName - IMPLEMENTED\n"));
MdbgProtBuffer localbuf;
Copy link
Member

@hoyosjs hoyosjs Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not refer to Mdbg here. It was a test debugger and it's no longer something we distribute. If this is the old managed debugger tool

@ghost ghost locked as resolved and limited conversation to collaborators May 13, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants