~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/pkg/runtime/debug/stack.go

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-11-18 15:12:26 UTC
  • mfrom: (14.2.12 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20141118151226-zug7vn93mn3dtiz3
Tags: 2:1.3.2-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - Support co-installability with gccgo-go tool:
    - d/rules,golang-go.install: Rename bin/go -> bin/golang-go
    - d/golang-go.{postinst,prerm}: Install/remove /usr/bin/go using
      alternatives.
  - d/copyright: Amendments for full compiliance with copyright format.
  - d/control: Demote golang-go.tools to Suggests to support Ubuntu MIR.
  - dropped patches (now upstream):
    - d/p/issue27650045_40001_50001.diff
    - d/p/issue28050043_60001_70001.diff
    - d/p/issue54790044_100001_110001.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
        dunno     = []byte("???")
19
19
        centerDot = []byte("·")
20
20
        dot       = []byte(".")
 
21
        slash     = []byte("/")
21
22
)
22
23
 
23
24
// PrintStack prints to standard error the stack trace returned by Stack.
84
85
        //      runtime/debug.*T·ptrmethod
85
86
        // and want
86
87
        //      *T.ptrmethod
 
88
        // Since the package path might contains dots (e.g. code.google.com/...),
 
89
        // we first remove the path prefix if there is one.
 
90
        if lastslash := bytes.LastIndex(name, slash); lastslash >= 0 {
 
91
                name = name[lastslash+1:]
 
92
        }
87
93
        if period := bytes.Index(name, dot); period >= 0 {
88
94
                name = name[period+1:]
89
95
        }