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,等待...就可 ...
随机推荐
- Jenkins+Maven+Svn搭建持续集成环境持续集成和自动部署
Jenkins和Hudson有很深的渊源,Jenkins目前更新频繁,目前选用Jenkins为持续集成工具和自动部署 Jenkins的使用有很多的介绍,主要记录如下要点: 192.168.1.240: ...
- HDR Defered Shading (using MRT)
http://http.download.nvidia.com/developer/SDK/Individual_Samples/DEMOS/Direct3D9/DeferredShading.zip ...
- 开放平台鉴权以及OAuth2.0介绍
OAuth 2.0 协议 OAuth是一个开发标准,允许用户授权第三方网站或应用访问他们存储在另外的服务提供者上的信息,而不需要将用户名和密码提供给第三方网站或分享他们数据的内容. OAuth 2.0 ...
- TI CC2541 BLE协议栈蓝牙MAC 地址
在Flash中有一块只读区域,从地址0x780E开始,蓝牙的MAC以小端方式存放在里面. 在TI的Peripheral例程里面,添加一个特征值,只读属性,6字节长度(蓝牙MAC长度为48-bit,6字 ...
- Python For Data Analysis -- Pandas
首先pandas的作者就是这本书的作者 对于Numpy,我们处理的对象是矩阵 pandas是基于numpy进行封装的,pandas的处理对象是二维表(tabular, spreadsheet-like ...
- volatile in thread
public class TestCalc { public static void main(String[] args) { class StoppableThread extends Threa ...
- IOS NSDate NSDateFormatter 导致相差8小时
时间问题应该是所有编程语言都要处理的.详细学过php的同学知道,php中也会有相差8小时的问题,然而php可以非常方便的解决的,直接设置下就好了 我最近在学习IOS的过程中,发现IOS的日期处理也是个 ...
- android硬件调试之无法识别android设备解决办法
DDMS 中无法识别华为荣耀六手机, 用豌豆荚开始显示无法连接, 用豌豆荚安装完驱动后,就可以连接了 http://www.zhihu.com/question/30588024 http://w ...
- hadoop-2.7.3 在windows环境下安装(无需Cygwin)
http://blog.csdn.net/kokjuis/article/details/53537029
- SQL集合函数中利用case when then 技巧
我们都知道SQL中适用case when then来转化数据库中的信息 比如 select (case sex when 0 then '男' else '女' end) AS sex from ...