Skip to content

[lldb][LoongArch] expression command cannot call the function #136561

Closed
@wangleiat

Description

@wangleiat

test commit: be48727

user@Debian-Sid:~/llvm-project/github-main/_build_lldb$ ./bin/lldb ./a.out 
(lldb) target create "./a.out"
Current executable set to '/home/user/llvm-project/github-main/_build_lldb/a.out' (loongarch64).
(lldb) b main
Breakpoint 1: where = a.out`main + 12 at test.c:6:10, address = 0x000000000000078c
(lldb) r
Process 430727 launched: '/home/user/llvm-project/github-main/_build_lldb/a.out' (loongarch64)
Process 430727 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
    frame #0: 0x000055555555078c a.out`main at test.c:6:10
   3    }
   4   
   5    int main() {
-> 6      return 0;
   7    }
   8   
(lldb) list 1
   1    int add(int a, int b) {
   2      return a+b;
   3    }
   4   
   5    int main() {
   6      return 0;
   7    }
   8   
(lldb) expression add(2,3)
                  
error: Expression execution was interrupted: signal SIGBUS: illegal address.
The process has been returned to the state before expression evaluation.
(lldb)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions