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,等待...就可 ...
随机推荐
- AngularJS+ckEditor管理ng-model
1.首先去ckeditor的官网下载ckeditor包,http://ckeditor.com/download: 2.把ckeditor文件夹放入工程中(webapp文件夹下能访问到的都行). 3. ...
- Ruby--正则
1. 只取数字(用的是字符串替换) gsub(/[^0-9]/, “”)
- DateTime Related Functions
string a = "to_date('" + dtpStart.Value.ToString("yyyy/MM/dd") + "', 'yyyy/ ...
- 页面静态化3 --- (伪静态+ob缓存)实现优化
要求:使用伪静态完成简单的新闻查询! 伪静态是站在SEO的角度来看的,他对应的页面不是真正存在的(而真静态的页面是事先生成的),而是每次查询数据库得到的信息!
- BAT批处理(二)
在前一篇中已对BAT批处理基础作了一些总结,但是对于BAT批处理还有很多的知识点没有讲解到,比如DOS中的特殊符号:IF.FOR的使用:变量:更多的DOS命令等等.本文在前一篇的基础上继续对BAT批处 ...
- a read only variable
SHOW VARIABLES LIKE '%FORMAT%' SET DATE_FORMAT ='%Y-%m-%d' [SQL]SET DATE_FORMAT ='%Y-%m-%d' [Err] 12 ...
- concurrency parallel 并发 并行
Computer Systems A Programmer's Perspective Second Edition The general phenomenon of multiple flows ...
- php concurrence
- NSString的常见方法
//1.创建常量字符串. NSString *astring = @"This is a String!"; //2.创建空字符串,给予赋值. NSString *astrin ...
- Java程序设计的基本原则
Java程序设计的基本原则-1 1.面向对象 这是java编程里面大家公认的第一原则 2.优先使用对象组合而非类继承 3.分层 最典型的三层架构,表现层-->逻辑层-->数据层 表现层功能 ...