Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joakim Hove <hove@ift.uib.no>
To: fedevaps@yahoo.dk
Cc: gdb@sources.redhat.com
Subject: Re: Still cannot print variable
Date: Fri, 15 Apr 2005 09:27:00 -0000	[thread overview]
Message-ID: <bjjis2ola1v.fsf@termo1.fi.uib.no> (raw)
In-Reply-To: <d3o02u$t10$1@sea.gmane.org> (fedevaps@yahoo.dk's message of "Fri, 15 Apr 2005 11:09:09 +0200")

JS <fedevaps@yahoo.dk> writes:


> I run "gdb test" followed by "print d" and then I get this error:

You must explicitly start test with the run command from gdb:

bash% gdb test
<...>
(gdb) run


However, that is also not enough because the current program will
immediately complete, and hence when you get back to the (gdb) prompt
the context of the (no longer) running program is void. Hence you must
set a breakpoint to halt the execution:


bash% gdb test
<...>
(gdb) break test.c:5    # Break at line 5 in file test.c
(gdb) run
(gdb) print d



HTH - Joakim

-- 
Joakim Hove
hove AT ift uib no                 /    
Tlf: +47 (55 5)8 27 90            /     Stabburveien 18		 
Fax: +47 (55 5)8 94 40           /      N-5231 Paradis		 
http://www.ift.uib.no/~hove/    /      	55 91 28 18 / 92 68 57 04


  parent reply	other threads:[~2005-04-15  9:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-15  9:09 JS
2005-04-15  9:20 ` Konstantin Karganov
2005-04-15 10:02   ` JS
2005-04-15 10:11     ` Re[2]: " Konstantin Karganov
2005-04-15 10:22       ` JS
2005-04-15  9:27 ` Joakim Hove [this message]
2005-04-15  9:30 ` Eli Zaretskii
2005-04-15 11:55 ` Bob Rossi
2005-04-15 12:01   ` Dave Korn
2005-04-15 12:06   ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bjjis2ola1v.fsf@termo1.fi.uib.no \
    --to=hove@ift.uib.no \
    --cc=fedevaps@yahoo.dk \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox