lldb cocos android,android - lldb remote debugging cannot find symbol after running once - Stack Ove...

I compiled one helloworld.c using ndk, pushed it to my android, and launched it using lldb remote, following lldb's offcial manual https://lldb.llvm.org/use/remote.html.

in adb

./lldb-server platform --listen "*:8888" --server

in host shell

lldb

platform select remote-android

platform connect connect://localhost:8888

file helloworld

source list

I get output

4 int main() {

5 printf("Hello, world\n");

6 return 0;

7 }

then I launch process in lldb

b main

r

But I get

Process xxxx stopped

* thread #1, name = 'helloworld', stop reason = breakpoint 1.1

frame #0: 0x000000xxxx

error: memory read failed for 0x0000xxxx

Target 1: (helloworld) stopped.

and using bt I get similar output, both without source line symbol, although I indeed specify -g option to clang, and source list can display source content at first.

If I specify -m32 to tell clang generate an executable for 32-bit, and launch again, I can get correct result. But my lldb-server executable is 64-bit, since file lldb-server output:

lldb-server: ELF executable, 64-bit LSB arm64, static

Does anyone know why 64-bit ldb-server cannot run 64-bit helloworld executable?

And I found in vscode if using codelldb extension to launch 64-bit helloworld, I can get source symbol. What's the difference? Thanks

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值