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,等待...就可 ...
随机推荐
- ubuntu&FAQ
转自-笨小孩 查看进程: ,ps -e 命令 ,feng@feng:~$ sudo netstat -antup Active Internet connections (servers an ...
- memcached学习笔记4--memcache扩展操作memcached
1. 安装并配置memcache扩展库 找到php.ini文件 添加: extendsion= php_memcache.dll 并把对应的dll文件拷贝到ext目录 2. 使用PHP对Memcahc ...
- MyCAT安装指南
MyCAT安装指南 MyCAT 1.2版本 快速上手-安装指南(安装单机) Mycat的server和mysql位于同一台服务器,centos6.2.4环境 Mycat:10.191.116.175 ...
- Fortran并行计算的一些例子
以下例子来自https://computing.llnl.gov/tutorials/openMP/exercise.html网站 一.打印线程(Hello world) C************* ...
- CSS子元素margin-top对于父元素的影响
父元素的盒子包含一个子元素盒子,给子元素盒子一个垂直外边距margin-top,父元素盒子也会往下走margin-top的值,而子元素和父元素的边距则没有发生变化. html代码如下 <styl ...
- XMLHttpRequest函数
function createXmlHttpRequest(){ if(window.ActiveXObject){ return new ActiveXObject("Microsoft. ...
- Nginx的配置中与流量分发相关的配置规范:
1.除首页外,其他页面都在某个目录中首页可以直接在根目录下,其他页面都要在根目录下的目录中.不同的location尽量使用第一个dir的模式进行区分,便于区分该流量是落在nginx本地,还是转发到后端 ...
- iOS archive(归档)的总结 (序列化和反序列化,持久化到文件)
http://www.cnblogs.com/ios8/p/ios-archive.html
- Android高级之第十一讲Hybird开发
本文来自http://blog.csdn.net/liuxian13183/ ,引用必须注明出处! 随着移动端应用平台的兴起,需求和交互方式的多样化,H5开发逐渐在移动端流行起来:常见的移动产品有We ...
- [LeetCode] Combination Sum II (递归)
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in ...