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

lldb is unable to call/print c++ demangled functions in the global namespace #16226

Closed
llvmbot opened this issue Apr 26, 2013 · 3 comments
Closed
Labels
bugzilla Issues migrated from bugzilla lldb

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Apr 26, 2013

Bugzilla Link 15854
Resolution FIXED
Resolved on Sep 03, 2015 18:32
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @emaste

Extended Description

Example program:

static int static_value = 0;

int
a_function_to_call()
{
static_value++;
return static_value;
}

int main (int argc, char const *argv[])
{
a_function_to_call();
return 0;
}

Compiling this as a c++ program with -O0 and -g and trying to call or print the function pointer 'a_function_to_call' fails.

Output:

(lldb) b main
(lldb) r
...
(lldb) expression a_function_to_call
error: use of undeclared identifier 'a_function_to_call'
error: 1 errors parsing expression
(lldb) expression a_function_to_call()
error: use of undeclared identifier 'a_function_to_call'
error: 1 errors parsing expression

@llvmbot
Copy link
Collaborator Author

llvmbot commented May 11, 2013

Committed a temporary workaround in r181613 that fixes the issue. It also fixed the same problem for anonymous namespace functions.

@emaste
Copy link
Member

emaste commented Sep 9, 2013

This issue also affects FreeBSD. The temporary workaround in r181613 has been extended to apply to FreeBSD as well (r190319)

@llvmbot
Copy link
Collaborator Author

llvmbot commented Sep 4, 2015

Unable to reproduce. Marking it as RESOLVED.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 4, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla lldb
Projects
None yet
Development

No branches or pull requests

2 participants