Debug using Lldb

Source: Internet
Author: User

http://www.zddhub.com/memo/2015/12/20/lldb-golang-debug/

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 + test.go:17, address = 0x0000000000002134

(LLDB) b test.go:10

Breakpoint 2:where = Test ' main.counting + 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 = +, locations = 1

1.1:where = Test ' Main.main + at test.go:17, address = test[0x0000000000002134], unresolved, hit count = 0

2:file = ' Test.go ', line = ten, locations = 1

2.1:where = Test ' main.counting + at test.go:10, address = test[0x000000000000206b], unresolved, hit count = 0

3:file = ' Test.go ', line = all, 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 + at test.go:17, stop reason = Breakpoint 1.1

Frame #0:0x0000000000002134 test ' Main.main + at test.go:17

+ }

15

Func Main () {

+ msg: = "Starting main"

FMT. PRINTLN (msg)

Bus: = Make (chan int)

msg = "Starting a Gorountie"

(LLDB) C

Debug using Lldb

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.