debug 使用lldb
http://www.zddhub.com/memo/2015/12/20/lldb-golang-debug/
go build -gcflags "-N -l" -o test test.go
MoJetdeMacBook-Pro:Downloads mojet$ lldb test
(lldb) target create "test"
Current executable set to 'test' (x86_64).
(lldb) breakpoint set --file test.go
error: invalid combination of options for the given command
(lldb) b test.go:17
Breakpoint 1: where = test`main.main + 68 at test.go:17, address = 0x0000000000002134
(lldb) b test.go:10
Breakpoint 2: where = test`main.counting + 43 at test.go:10, address = 0x000000000000206b
(lldb) b test.go:23
Breakpoint 3: where = test`main.main + 514 at test.go:23, address = 0x00000000000022f2
(lldb) br list
Current breakpoints:
1: file = 'test.go', line = 17, locations = 1
1.1: where = test`main.main + 68 at test.go:17, address = test[0x0000000000002134], unresolved, hit count = 0
2: file = 'test.go', line = 10, locations = 1
2.1: where = test`main.counting + 43 at test.go:10, address = test[0x000000000000206b], unresolved, hit count = 0
3: file = 'test.go', line = 23, locations = 1
3.1: where = test`main.main + 514 at test.go:23, address = test[0x00000000000022f2], unresolved, hit count = 0
(lldb) run
error: argdumper exited with error 127
(lldb) process launch test
Process 58501 launched: '/Users/mojet/Downloads/test' (x86_64)
Process 58501 stopped
* thread #1: tid = 0x4a03e1, 0x0000000000002134 test`main.main + 68 at test.go:17, stop reason = breakpoint 1.1
frame #0: 0x0000000000002134 test`main.main + 68 at test.go:17
14 }
15
16 func main() {
-> 17 msg := "Starting main"
18 fmt.Println(msg)
19 bus := make(chan int)
20 msg = "starting a gorountie"
(lldb) c
debug 使用lldb的更多相关文章
- LLDB详解
LLDB的Xcode默认的调试器,它与LLVM编译器一起,带给我们更丰富的流程控制和数据检测的调试功能.平时用Xcode运行程序,实际走的都是LLDB.熟练使用LLDB,可以让你debug事半功倍 L ...
- 教你如何反编译app,拿到加密方式
大家知道app 有安卓和ios 安卓是apk 现在基本上apk都是经过加密的 想动态脱壳没一定的技术是搞不定的 IOS是ipa 今天我主要讲的是这个 准备好反编译设备 1.一套越狱的ios手机 我 ...
- 源码级调试的XNU内核
i春秋翻译小组-FWorldCodeZ 源码级调试的XNU内核 无论你是在开发内核扩展,进行漏洞研究,还是还有其他需要进入macOS / iOS内核,XNU,有时你需要附加调试器.当你这样做时,使用源 ...
- jmeter sampler maven项目排错记
eclipse 创建的maven项目,引入jar包之后出现红色叹号,一直找不到原因,连main方法都无法运行,提示找不到类: 错误: 找不到或无法加载主类 soapsampler.SoapSample ...
- Xcode LLDB Debug教程
开胃小菜--简单的断点调试 在xcode中打开一个app,在想要break的行号上单击,即可生成一个深色的箭头标识--断点.如下图,在viewDidLoad:中设置了断点. 运行app,等待...就可 ...
- LLDB基础知识
LLDB基础知识 LLDB控制台 Xcode中内嵌了LLDB控制台,在Xcode中代码的下方,我们可以看到LLDB控制台. LLDB控制台平时会输出一些log信息.如果我们想输入命令调试,必须让程序进 ...
- xcode调整debug,release模式
今天调试的时候发现变量都不能查看了.在「lldb」中通过「po」命令来查看总是提示变量未找到. 环境 xcode 7, Swift 2 错误提示 ‘XXXX’ was compiled with op ...
- iOS LLDB调试器
随着Xcode 5的发布,LLDB调试器已经取代了GDB,成为了Xcode工程中默认的调试器.它与LLVM编译器一起,带给我们更丰富的流程控制和数据检测的调试功能.LLDB为Xcode提供了底层调试环 ...
- iOS开发——开发技巧&LLDB详解
开胃小菜--简单的断点调试 在xcode中打开一个app,在想要break的行号上单击,即可生成一个深色的箭头标识--断点.如下图,在viewDidLoad:中设置了断点. 运行app,等待...就可 ...
随机推荐
- C#安全API
Bouncycastle库C#版 官网地址为:http://www.bouncycastle.org/csharp/. http://blog.csdn.net/popozhu/article/det ...
- [听点音乐]American Music Awards 2015 Winners
“see you again” - wiz khalifa feat. charlie puth Lyrics It's been a long day without you my friend ...
- Javascript 笔记与总结(2-3)Javascript 运算符、控制结构与对象操作
[连接运算符 + ] <script> console.log(1+2+'a'+3+4); </script> 输出: 3a34 [逻辑运算符]返回的是最早能判断表达式结果的那 ...
- java build path->source folder分析
1.build path下的source folde,指的是项目存放源码的位置,即存放Java代码的位置!!! 如果将一个文件夹设为java build path里的source folder下,则这 ...
- DOM下的节点属性和操作小结
属性: 1 .nodeName 节点名称,相当于tagName.属性节点返回属性名,文本节点返回#text.nodeName,是只读的. 2 .nodeType 值:1,元素节点:2,属性节点:3,文 ...
- sql语句 当前时间查找重复 时间戳转换
查找重复数据 select id, name, memo from A ) >= ) mysql 当前时间 SELECT NOW(); //2015-10-27 16:43:45 UNIX时间戳 ...
- ArcGIS Server发布服务,报错001270
错误001270 这个问题一般是因为数据源文件太大导致. 解决办法: 对于001270的错误,官方帮助中给出了一些可能的原因并提供了相应的解决办法(http://resources.arcgis.c ...
- java CountDownLatch
Listing -. Using a Countdown Latch to Trigger a Coordinated Start import java.util.concurrent.CountD ...
- jQuery对象与JS原生dom对象之间的转换
jQuery就是JS的一个扩展库,工具库,提供很多方便快捷的方法,所以将JS对象转换为jQuery对象后,能更方便地操作这个对象.但是jQuery对象也不是万能的,有一些JS对象有的能,jQuery对 ...
- zepto源码--extend--学习笔记
对象继承函数: $.extend(){},默认传递一个参数,需要继承的对象目标.函数展示: 最终实现的过程,需要调用工具函数extend,首先分析extend函数. 默认传递三个参数,继承的目标对象- ...