The problem of Golang runtime-gdb.py

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

Problem:

(GDB) source/users/sherlock/documents/go/src/runtime/runtime-gdb.pyloading go Runtime support. Traceback (most recent):  File "/users/sherlock/documents/go/src/runtime/runtime-gdb.py", line 205, in <module>    _rctp_type = Gdb.lookup_type ("struct Runtime.rtype"). Pointer () gdb.error:No struct type named Runtime.rtype.

Solution:

1. Git clone https://github.com/golang/example.git

2. Go test-c in the Stringutil directory.

3.

Gdb-q./stringutil.testreading symbols from./stringutil.test...done. (GDB) source/usr/src/go/src/runtime/runtime-gdb.pyloading go Runtime support. Traceback (most recent):  File "/usr/src/go/src/runtime/runtime-gdb.py", line 205, in <module>    _ Rctp_type = Gdb.lookup_type ("struct Runtime.rtype"). Pointer () gdb.error:No struct type named Runtime.rtype. (GDB) Set pagination off (GDB) set logging oncopying output to gdb.txt. (GDB) Info types# much output (GDB) quit

4. Command line

grep runtime gdb.txt   | grep type;

5. Draw conclusions

struct []*runtime._type;typedef struct runtime.iface error;typedef struct runtime.iface flag. value;typedef struct runtime.iface flag.boolflag;typedef struct runtime.iface fmt. formatter;typedef struct Runtime.iface fmt. gostringer;typedef struct Runtime.iface fmt. scanner;typedef struct Runtime.iface fmt. stringer;typedef struct runtime.iface fmt.runeunreader;typedef void (struct runtime.g *) func (*runtime.g); typedef void ( struct Runtime.stkframe *, void *, BOOL *) func (*runtime.stkframe, unsafe. Pointer) bool;typedef void (struct []runtime. Stackrecord, int *, BOOL *) func ([]runtime. Stackrecord) (int, bool); typedef struct RUNTIME.IFACE Interface {runtime.f ()};typedef struct runtime.eface interface {}; typedef struct RUNTIME.IFACE IO. reader;typedef struct Runtime.iface io. readerfrom;typedef struct Runtime.iface io. runereader;typedef struct Runtime.iface io. writer;typedef struct Runtime.iface io. writerto;typedef struct hash<string,*runtime/pprof. Profile> * map[string]*runtime/pprof. Profile;typedef struct Runtime.iface os. fileinfo;typedef struct Runtime.iface os. signal;typedef struct runtime.iface reflect. type;typedef struct Runtime.iface regexp.input;struct runtime._type;typedef runtime.buckettype;struct runtime.chantype;typedef struct Runtime.iface runtime.finterface;struct runtime.functype;struct Runtime.interfacetype;typedef runtime.intptr;struct runtime.maptype;typedef runtime.pageid;struct runtime.ptrtype; struct runtime.slicetype;typedef struct runtime.iface runtime.stringer;struct runtime.typealg;typedef Runtime.uintreg;struct runtime.uncommontype;typedef struct Runtime.iface runtime/pprof.countprofile;typedef struct Runtime.iface sort. interface;typedef struct Runtime.iface sync. Locker;

6. Modify the runtime-gdb.py No. 205 line rtype Change to _type

Note: My platform is Mac OS X 10.10.3, go1.4.2

Other platforms may not be

struct []*runtime._type;

Related Article

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.