Skip to content

Conversation

@richardelms
Copy link
Contributor

Goal

Some Unity stacktraces contain lines like the following
at (wrapper managed-to-native) Program.NativeMethod(Program/StructToMarshal)
Our trace formatter was confused by this and stripping out useful information, ending up with something like this:
at(wrapper managed-to-native):0

Now it will match the wrapper info and produce a frame like so:
(wrapper managed-to-native)Program.NativeMethod(Program/StructToMarshal)

Changeset

Add a regex check for any wrapper type before a method name. If matched, then it temporarly removes it, allows the normal method parser to do it's work, and then reattaches the wrapper name to the beginning of the line.

Testing

Added a unit test

@richardelms richardelms self-assigned this May 23, 2023
@richardelms richardelms requested a review from kstenerud May 23, 2023 11:30
@richardelms richardelms marked this pull request as ready for review May 23, 2023 14:17
@richardelms richardelms requested a review from tomlongridge May 23, 2023 14:18
@richardelms richardelms merged commit 074ba26 into next May 24, 2023
@richardelms richardelms deleted the methodFormattingFix branch May 24, 2023 07:46
@richardelms richardelms mentioned this pull request May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants