Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: matze999@gmx.net
Cc: gdb@sourceware.org
Subject: Re: basic gdb usage question
Date: Wed, 27 Jun 2007 03:29:00 -0000	[thread overview]
Message-ID: <u645ankhc.fsf@gnu.org> (raw)
In-Reply-To: <200706261013.39409.matze999@gmx.net> (message from Matt Funk on 	Tue, 26 Jun 2007 10:13:37 -0600)

> From: Matt Funk <matze999@gmx.net>
> Date: Tue, 26 Jun 2007 10:13:37 -0600
> 
> > > I thought
> > > about setting two breakpoints but that would not do what i need it to do.
> >
> > Why not?  You could set the second breakpoint from the commands
> > defined for the first breakpoint.  Would this do what you want?
> 
> Not sure what you mean by 'setting a breakpoint from the commands
> defined for the first breakpoint' to be honest. Can you point me to somewhere 
> in the docs where it mentions how to do this?

I meant the command "commands" which allows you to specify the
commands executed when a breakpoint is hit.  Those commands can
include setting a breakpoint at another location.

> > > Along the same lines, is it then possible to create a condition that
> > > references a variable outside the local scope?
> >
> > AFAIK, only if it has global scope in its file.  You can use the
> > FILE:VARIABLE syntax.
> 
> Ah, ok. So it is not possible to reference a member of class A while being in 
> a method of class B? Also, it doesn't seem to allow me to reference a public 
> member of class A in a method of class A. Should it, or am I simply being 
> ignorant about something?

Please show sample code and the commands you were typing.  It's hard
to talk theoretically.

> > Btw, I'd be eager to know which ones of the answers above cannot be
> > found in the user's manual.  That will help us improve the docs.
> 
> Well, i didn't see the links to the expressions section the first time around. 
> Sorry. However, it still didn't help. I'm still curious why the command :
> (gdb) break myfile_1.cpp:70 if ('myfile_1.cpp'::myvar == 4)
> gives :
> Junk at the end of arguments

Lose the parentheses, you don't need them.  If this isn't clear from
the manual, we should improve it.

> A way to improve the docs would be to give many (and diverse) examples of how 
> to set breakpoints. Maybe ranging from very simple to pretty complex 
> breakpoints. 

I think there are examples, but I will read that section again.
Thanks.


  reply	other threads:[~2007-06-27  3:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-23 16:31 Non-uniform address spaces Michael Eager
2007-06-23 21:25 ` Daniel Jacobowitz
2007-06-23 21:47   ` Michael Eager
2007-06-23 23:09     ` Daniel Jacobowitz
2007-06-25 17:46     ` Jim Blandy
2007-06-25 18:08       ` Michael Eager
2007-06-25 19:05         ` Jim Blandy
2007-06-25 19:09           ` Daniel Jacobowitz
2007-06-25 20:04           ` Michael Eager
2007-06-25 22:23             ` Jim Blandy
2007-06-25 22:55               ` Michael Eager
2007-06-25 23:08                 ` basic gdb usage question Matt Funk
     [not found]                   ` <655C3D4066B7954481633935A40BB36F041415@ussunex02.svl.access-company.com>
2007-06-25 23:36                     ` Matt Funk
2007-06-26  1:25                       ` Michael Eager
2007-06-26  3:12                   ` Eli Zaretskii
2007-06-26 16:13                     ` Matt Funk
2007-06-27  3:29                       ` Eli Zaretskii [this message]
2007-06-26 16:56                 ` Non-uniform address spaces Jim Blandy
2007-06-26 17:22                   ` Michael Eager
2007-06-26 17:55                     ` Jim Blandy
2007-06-26 18:08                     ` Jim Blandy
2007-06-26 23:08                       ` Michael Eager
2007-06-26 23:39                         ` Jim Blandy

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=u645ankhc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=matze999@gmx.net \
    /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