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

Demangle function names in backtraces #458

Closed
jclark opened this issue Sep 16, 2021 · 1 comment · Fixed by #468
Closed

Demangle function names in backtraces #458

jclark opened this issue Sep 16, 2021 · 1 comment · Fixed by #468
Assignees
Milestone

Comments

@jclark
Copy link
Contributor

jclark commented Sep 16, 2021

When a panic prints out a function name, it should demangle it.

Mangling is described here: #448 (comment)

@jclark jclark added this to the Subset 8 milestone Sep 16, 2021
@jclark jclark mentioned this issue Sep 16, 2021
8 tasks
@jclark
Copy link
Contributor Author

jclark commented Sep 16, 2021

The backtrace should make sense to a Ballerina programmer. It should only include stack frames corresponding to Ballerina functions. These all start with _B. It needs to reverse the mangling that is done in nback/symbol.bal and turn it into something that makes sense in Ballerina.

Non-public names should be printed without any prefix.

For a public name e.g. with module id ballerina/lang.array and local name push, I suggest we print it as lang.array:push i.e. leave out the organization name.

The C runtime should implement a function _bal_print_mangled_name(const char *, FILE *)

@jclark jclark added the in progress Currently being implemented label Sep 16, 2021
jclark pushed a commit that referenced this issue Sep 27, 2021
@KavinduZoysa KavinduZoysa removed the in progress Currently being implemented label Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants