Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdb: Gdb doesn't show strings values #8546

Open
gopherbot opened this issue Aug 18, 2014 · 1 comment
Open

gdb: Gdb doesn't show strings values #8546

gopherbot opened this issue Aug 18, 2014 · 1 comment
Milestone

Comments

@gopherbot
Copy link

by ignatovs:

Mac OS X 10.9.4

What does 'go version' print?
go version go1.3.1 darwin/amd64 (via brew)

GNU gdb (GDB) 7.7.1 (via brew)
Copyright (C) 2014 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 "x86_64-apple-darwin13.3.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>;.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>;.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) show configuration
This GDB was configured as follows:
   configure --host=x86_64-apple-darwin13.3.0 --target=x86_64-apple-darwin13.3.0
             --with-auto-load-dir=:${prefix}/share/auto-load
             --with-auto-load-safe-path=:${prefix}/share/auto-load
             --with-expat
             --with-gdb-datadir=/usr/local/Cellar/gdb/7.7.1/share/gdb (relocatable)
             --with-jit-reader-dir=/usr/local/Cellar/gdb/7.7.1/lib/gdb (relocatable)
             --without-libunwind-ia64
             --without-lzma
             --with-python=/System/Library/Frameworks/Python.framework/Versions/2.7
             --with-separate-debug-dir=/usr/local/Cellar/gdb/7.7.1/lib/debug (relocatable)
             --with-zlib
             --without-babeltrace

("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)


1. Build a sample http://play.golang.org/p/n2L68VzRen as a binary m (via go build m.go)
2. Run gdb m
3. Setup a new breakpoint at line 9
4. Run the executable
5. Try to view local variables via info locals

What happened?
(gdb) info locals 
x = map[string]string<error reading variable: Cannot access memory at address 0x10>
z =  []string = {<error reading variable: Cannot access memory at address 0x0>, 
  <error reading variable: Cannot access memory at address 0x15fb60>, "", "", "", ""}
y =  []int

What should have happened instead?
I'd like to see something more readable :)

Please provide any additional information below.
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added repo-main, release-none.

@bradfitz bradfitz removed the new label Dec 18, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants