[bug-notifications] [gdb 0004967]: Can't use gdb to list out source code from gccgo compiled binary with -g option
Mantis Bug Tracker
noreply at opencsw.org
Fri Jul 27 18:36:30 CEST 2012
A NOTE has been added to this issue.
======================================================================
https://www.opencsw.org/mantis/view.php?id=4967
======================================================================
Reported By: tjyang
Assigned To: pfelecan
======================================================================
Project: gdb
Issue ID: 4967
Category: regular use
Reproducibility: always
Severity: major
Priority: normal
Status: closed
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2012-06-26 16:23 CEST
Last Modified: 2012-07-27 18:36 CEST
======================================================================
Summary: Can't use gdb to list out source code from gccgo
compiled binary with -g option
Description:
The test helloworld.go was compiled and ran ok by gccgo 4.7.1as shown
below.
But when doing a debugging session to list out source code, it failed.
$ cat helloworld.go
package main
import "fmt"
func main() {
fmt.Println("Hello, World")
}
$ ./hellow
Hello, World
$
======================================================================
----------------------------------------------------------------------
(0010060) tjyang (developer) - 2012-07-27 18:36
https://www.opencsw.org/mantis/view.php?id=4967#c10060
----------------------------------------------------------------------
Thanks, gdb-4.1 works ok to list out source code if I do a "list
main.main".
Except following message
/home/maciej/src/opencsw/pkg/gcc4/trunk/work/solaris10-i386/build-isa-pentium_pro/gcc-4.7.1/libgo/runtime/proc.c:
No such file or directory.
-bash-4.1$ gccgo -g -o hello.bin helloworld.go
-bash-4.1$ gdb hello.bin
GNU gdb (GDB) 7.4.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.10".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /export/home/gobuild/hello.bin...done.
(gdb) l
34
/home/maciej/src/opencsw/pkg/gcc4/trunk/work/solaris10-i386/build-isa-pentium_pro/gcc-4.7.1/libgo/runtime/go-main.c:
No such file or directory.
(gdb) l main.main
1 package main
2
3 import "fmt"
4
5 func main() {
6 fmt.Println("Hello, World")
7 }
(gdb) q
-bash-4.1$ uname -a
SunOS b-solaris11-amd64 5.11 11.0 i86pc i386 i86pc
-bash-4.1$ date
Friday, July 27, 2012 11:31:46 AM CDT
-bash-4.1$
More information about the bug-notifications
mailing list