Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

mikem8361
Copy link

Add and implement new ICorDebugDataTarget4 unwind interface using lldb stack unwinder ABIs. The implementation
does a linear search of the native frames for the stack pointer provided. It doesn't happen often so the
performance is fine.

Stub out the DBI's ICorDebugDataTarget4 (in ShimDataTarget::VirtualUnwind) for now. Since PAL_VirtualUnwindOutOfProc
is disabled it makes sense to just return E_NOTIMPL.

Fix bpmd command so it doesn't stop in lldb when it isn't a CLRN exception (continues).

@mikem8361
Copy link
Author

@sergiy-k and @jkotas could you review? @janvorli you may want to look at it too when you wake up.

@mikem8361
Copy link
Author

The issue this fixes: #1950

Copy link
Member

Choose a reason for hiding this comment

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

Is the byreference passing of SBFrame just a performance optimization, or is the value actually modified anywhere?

If it is just a performance optimization, it may be nice to mark all the byrefererence arguments with const to make the intent clear.

Copy link
Author

Choose a reason for hiding this comment

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

All the them were added for perf reasons. I'll add const to them.

Copy link
Author

Choose a reason for hiding this comment

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

I get compiler errors when it is used to call the lldb API:

/ssd/coreclr/src/ToolBox/SOS/lldbplugin/debugclient.cpp:990:30: error: member function 'FindRegister' not viable: 'this' argument has type 'const lldb::SBFrame', but function is not
marked const
lldb::SBValue regValue = frame.FindRegister(name);

/ssd/coreclr/src/ToolBox/SOS/lldbplugin/debugclient.cpp:714:23: error: member function 'GetNumSections' not viable: 'this' argument has type 'const lldb::SBModule', but function is
not marked const
int numSections = module.GetNumSections();
^~~~~~

Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to add the const as a comment /* const */ then

Add and implement new ICorDebugDataTarget4 unwind interface using lldb stack unwinder ABIs. The implementation
does a linear search of the native frames for the stack pointer provided. It doesn't happen often so the
performance is fine.

Stub out the DBI's ICorDebugDataTarget4 (in ShimDataTarget::VirtualUnwind) for now. Since PAL_VirtualUnwindOutOfProc
is disabled it makes sense to just return E_NOTIMPL.

Fix bpmd command so it doesn't stop in lldb when it isn't a CLRN exception (continues).
mikem8361 pushed a commit that referenced this pull request Nov 4, 2015
Fix sos clrstack unwinding for the special HelperMethodFrame.
@mikem8361 mikem8361 merged commit 810b116 into dotnet:master Nov 4, 2015
@mikem8361 mikem8361 deleted the unwindi branch November 4, 2015 03:55
mikem8361 pushed a commit that referenced this pull request Nov 5, 2015
mikem8361 pushed a commit to mikem8361/coreclr that referenced this pull request Nov 5, 2015
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Fix sos clrstack unwinding for the special HelperMethodFrame.

Commit migrated from dotnet/coreclr@810b116
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
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.

3 participants