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的更多相关文章

  1. LLDB详解

    LLDB的Xcode默认的调试器,它与LLVM编译器一起,带给我们更丰富的流程控制和数据检测的调试功能.平时用Xcode运行程序,实际走的都是LLDB.熟练使用LLDB,可以让你debug事半功倍 L ...

  2. 教你如何反编译app,拿到加密方式

    大家知道app 有安卓和ios 安卓是apk 现在基本上apk都是经过加密的 想动态脱壳没一定的技术是搞不定的 IOS是ipa 今天我主要讲的是这个   准备好反编译设备 1.一套越狱的ios手机 我 ...

  3. 源码级调试的XNU内核

    i春秋翻译小组-FWorldCodeZ 源码级调试的XNU内核 无论你是在开发内核扩展,进行漏洞研究,还是还有其他需要进入macOS / iOS内核,XNU,有时你需要附加调试器.当你这样做时,使用源 ...

  4. jmeter sampler maven项目排错记

    eclipse 创建的maven项目,引入jar包之后出现红色叹号,一直找不到原因,连main方法都无法运行,提示找不到类: 错误: 找不到或无法加载主类 soapsampler.SoapSample ...

  5. Xcode LLDB Debug教程

    开胃小菜--简单的断点调试 在xcode中打开一个app,在想要break的行号上单击,即可生成一个深色的箭头标识--断点.如下图,在viewDidLoad:中设置了断点. 运行app,等待...就可 ...

  6. LLDB基础知识

    LLDB基础知识 LLDB控制台 Xcode中内嵌了LLDB控制台,在Xcode中代码的下方,我们可以看到LLDB控制台. LLDB控制台平时会输出一些log信息.如果我们想输入命令调试,必须让程序进 ...

  7. xcode调整debug,release模式

    今天调试的时候发现变量都不能查看了.在「lldb」中通过「po」命令来查看总是提示变量未找到. 环境 xcode 7, Swift 2 错误提示 ‘XXXX’ was compiled with op ...

  8. iOS LLDB调试器

    随着Xcode 5的发布,LLDB调试器已经取代了GDB,成为了Xcode工程中默认的调试器.它与LLVM编译器一起,带给我们更丰富的流程控制和数据检测的调试功能.LLDB为Xcode提供了底层调试环 ...

  9. iOS开发——开发技巧&LLDB详解

    开胃小菜--简单的断点调试 在xcode中打开一个app,在想要break的行号上单击,即可生成一个深色的箭头标识--断点.如下图,在viewDidLoad:中设置了断点. 运行app,等待...就可 ...

随机推荐

  1. Memcached 笔记与总结(1)Linux(CentOS 6.6) 和 Windows(7)下安装与配置 Memcached (1.4.24)与 Memcached 基础命令

    Memcached 官方网站:http://memcached.org/ 官网对其的描述是: What is Memcached? Free & open source, high-perfo ...

  2. UITableview 多行删除

    //  RootViewController.m #import "RootViewController.h"#import "NextViewController.h& ...

  3. SHELL 中的重定向和管道

    1. 什么叫重定向将输入或输出重新指定到别的位置. 2. 重定向输出2.1.命令执行数据流文件/设备---- 标准输入 -->命令 --- 标准输出 -->文件/设备            ...

  4. The insertion sort algorithm expressed in pseudocode - 插入排序

    Computer Science An Overview _J. Glenn Brookshear _11th Edition procedure Sort (List) N ← 2; while ( ...

  5. THE ARCHITECTURE OF COMPLEXITY HERBERT A. SIMON* Professor of Administration, Carnegie Institute of Technology (Read April 26, 1962)

    THE ARCHITECTURE OF COMPLEXITY HERBERT A. SIMON* Professor of Administration, Carnegie Institute of ...

  6. Apache Kafka源码分析 - kafka controller

    前面已经分析过kafka server的启动过程,以及server所能处理的所有的request,即KafkaApis 剩下的,其实关键就是controller,以及partition和replica ...

  7. TabHost详解

    [转]http://blog.csdn.net/harvic880925/article/details/17120325 前言:今天仔细研究了下TabHost,主要是为了实现微信底部导航栏的功能,最 ...

  8. myeclipse添加源码支持

    在MyEclipse中开发,习惯于点击类名,按Ctrl键查看源码,但是,如果是Spring/Hibernate/Struts/JDK这些开源jar的源码该如何看呢? 一般,我们导入的只有jar文 件, ...

  9. crossvcl.com - 用VCL开发MacOS软件

    还没正式发布.用力戳 http://crossvcl.com/ 消息来源:Delphi G+ Group.具体信息还没完全披露,但是可以肯定的是,不是通过FireMonkey,而是通过原生的MacOS ...

  10. c 生成随机不重复的整数序列

    #include <stdio.h> #include <malloc.h> #include <stdlib.h> #include <time.h> ...