|
|
|
runtime: runtime-gdb.py disable ifacematcher for windows.
Patch Set 1 #Patch Set 2 : diff -r b7e029136522 http://go.googlecode.com/hg/ #Patch Set 3 : diff -r b7e029136522 http://go.googlecode.com/hg/ #Total messages: 3
|
vcc
Hello golang-dev@googlegroups.com, I'd like you to review this change to http://go.googlecode.com/hg/
|
13 years, 11 months ago (2012年01月31日 13:19:24 UTC) #1 |
Hello golang-dev@googlegroups.com, I'd like you to review this change to http://go.googlecode.com/hg/
gdb 7.4 improve python support, can auto load runtime-gdb.py in windows now, but don't work with ifacematcher. in is_iface function: def is_iface(val): try: return str(val['tab'].type) == "struct runtime.itab *" \ and str(val['data'].type) == "void *" except: pass type(val) is int, val['tab'].type make gdb crash. my gdb 7.4 build for windows can download from <http://code.google.com/p/go-w64/downloads/list> 2012年1月31日 <vcc.163@gmail.com>: > Reviewers: golang-dev_googlegroups.com, > > Message: > Hello golang-dev@googlegroups.com, > > I'd like you to review this change to > http://go.googlecode.com/hg/ > > > Description: > runtime: runtime-gdb.py disable ifacematcher for windows. > > Please review this at http://codereview.appspot.com/5552057/ > > Affected files: > M src/pkg/runtime/runtime-gdb.py > > > Index: src/pkg/runtime/runtime-gdb.py > =================================================================== > --- a/src/pkg/runtime/runtime-gdb.py > +++ b/src/pkg/runtime/runtime-gdb.py > @@ -15,7 +15,7 @@ > # circumventing the pretty print triggering. > > > -import sys, re > +import sys, re, os > > print >>sys.stderr, "Loading Go Runtime support." > > @@ -258,7 +258,8 @@ > if is_iface(val) or is_eface(val): > return IfacePrinter(val) > > -goobjfile.pretty_printers.append(ifacematcher) > +if os.name != 'nt': > + goobjfile.pretty_printers.append(ifacematcher) > > # > # Convenience Functions > >
On Tue, Jan 31, 2012 at 14:26, Wei guangjing <vcc.163@gmail.com> wrote: > gdb 7.4 improve python support, can auto load runtime-gdb.py in > windows now, but don't work with ifacematcher. > in is_iface function: > def is_iface(val): > try: > return str(val['tab'].type) == "struct runtime.itab *" \ > and str(val['data'].type) == "void *" > except: > pass > > type(val) is int, val['tab'].type make gdb crash. i would have expected python to just throw an exception. anyways, i'd like to fix the root cause, which i suspect is related to the dwarf representation i chose for interfaces. is there a way you can send me a dump of the dwarfinfo from a windows binary? > > my gdb 7.4 build for windows can download from > <http://code.google.com/p/go-w64/downloads/list> > > 2012年1月31日 <vcc.163@gmail.com>: >> Reviewers: golang-dev_googlegroups.com, >> >> Message: >> Hello golang-dev@googlegroups.com, >> >> I'd like you to review this change to >> http://go.googlecode.com/hg/ >> >> >> Description: >> runtime: runtime-gdb.py disable ifacematcher for windows. >> >> Please review this at http://codereview.appspot.com/5552057/ >> >> Affected files: >> M src/pkg/runtime/runtime-gdb.py >> >> >> Index: src/pkg/runtime/runtime-gdb.py >> =================================================================== >> --- a/src/pkg/runtime/runtime-gdb.py >> +++ b/src/pkg/runtime/runtime-gdb.py >> @@ -15,7 +15,7 @@ >> # circumventing the pretty print triggering. >> >> >> -import sys, re >> +import sys, re, os >> >> print >>sys.stderr, "Loading Go Runtime support." >> >> @@ -258,7 +258,8 @@ >> if is_iface(val) or is_eface(val): >> return IfacePrinter(val) >> >> -goobjfile.pretty_printers.append(ifacematcher) >> +if os.name != 'nt': >> + goobjfile.pretty_printers.append(ifacematcher) >> >> # >> # Convenience Functions >> >>