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

gopherbot opened this issue Aug 18, 2014 · 1 comment


Copy link

commented Aug 18, 2014

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 <>;
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:
Find the GDB manual and other documentation resources online at:
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-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)
             --with-separate-debug-dir=/usr/local/Cellar/gdb/7.7.1/lib/debug (relocatable)

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

1. Build a sample 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.

This comment has been minimized.

Copy link

commented Aug 21, 2014

Comment 1:

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

@gopherbot gopherbot added new labels Aug 21, 2014
@bradfitz bradfitz removed the new label Dec 18, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc removed release-none labels Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.