Go language gdb Debug Step Pit

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

The whole is a Docker environment: 1.12.1, I made the image myself.

OS version: Ubuntu 14.04.5 LTS

Go version: 1.6.3


in the gdb executed in Run Command Error !

Hear

Error Output :

Warning:error Disabling address space randomization:operation not permitted

Environment :d ocker

Hear

Solutions :

Warning:error Disabling address space randomization:operation not permitted

Hear

conclusion

When running within a dockercontainer, I got this error until I added --security-optseccomp=unconfined Listen to the Listen Dockerrun . Listen – Listen Cameron Taggart Listen June 7 at 4:28

Hear

from < http://stackoverflow.com/questions/35860527/ warning-error-disabling-address-space-randomization-operation-not-permitted>

Hear

Hear

Info goroutines:undefined Info command: "Goroutines"

Error Output :

(GDB) Info goroutines

Undefinedinfo command: "Goroutines". Listen to try "help info".

Hear

Related information:

Undefinedinfo command: "Goroutines"

Debugging Go Code with GDB

Text filesrc/runtime/runtime-gdb.py

Hear

Conclusion:

Use GDB Debug GO program

Http://www.cnblogs.com/guxuanqing/p/5638363.html

Establish ~/.gdbinit

add-auto-load-safe-path/usr/local/go/src/runtime/ Listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, hear, hear,

Setauto-load Safe-path Listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, listen, hear, hear, hear, hear, hear,

Pythonsys.path.append ("/usr/share/gdb/python")

Hear

How did GdB get out of the/usr/local/go/src/runtime/runtime-gdb.py?

Goobjfile= gdb.current_objfile () or gdb.objfiles () [0]

To see the conclusion of a question

It's supposed to be /usr/share/gdb/python Add the stuff to the Sys.path there it goes.


This article is from the "Cavalry Blog" blog, please be sure to keep this source http://3732370.blog.51cto.com/3722370/1885675

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.