Groups
Groups
Sign in
Groups
Groups
golang-nuts
Conversations
About
Send feedback
Help
gdb and module variables
108 views
Skip to first unread message
Anatoly Galiulin
unread,
Dec 23, 2013, 6:26:12 AM
12/23/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
I am trying to debug go program, built with
-gcflags "-N -l"
flags.
Command "
print os.Args"
returns "
No symbol "os" in current context
",
b
ut "
info variables Args
" shows "
struct []string os.Args;
"
How can I view the contents of module variable
while debugging?
Ian Lance Taylor
unread,
Dec 23, 2013, 11:00:56 PM
12/23/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Anatoly Galiulin, golang-nuts
gdb doesn't understand Go syntax. You need to write
print 'os.Args'
using single quotes to show that os.Args is a single name.
Ian
Anatoly Galiulin
unread,
Dec 23, 2013, 11:17:44 PM
12/23/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Thanks, Ian!
Reply all
Reply to author
Forward
0 new messages