From: Matt Funk <matze999@gmx.net>
To: "Michael Snyder" <Michael.Snyder@access-company.com>,
gdb@sourceware.org
Subject: Re: basic gdb usage question
Date: Mon, 25 Jun 2007 23:36:00 -0000 [thread overview]
Message-ID: <200706251736.22816.matze999@gmx.net> (raw)
In-Reply-To: <655C3D4066B7954481633935A40BB36F041415@ussunex02.svl.access-company.com>
thanks for the reply first of all,
well, with respect to the local scope this is what i thought i tried. In
particular this is what i did:
break myfile_1.cpp:700 if (myfile_1.cpp:mylocalvar_1==1 &&
myfile_2.cpp:myothervar==2)
but gdb gave me:
"Junk at end of arguments."
So i figure something is wrong with my syntax.
Is there anything wrong with the above?
mat
On Monday 25 June 2007 17:22, Michael Snyder wrote:
> The condition on a breakpoint can be anything that could be expressed as a
> C expression, eg:
>
> (gdb) break <file A>:<line M> if (X && Y)
>
> You're right, two breakpoints would not meet that requirement.
> However, you CAN have arbitrarily many breakpoints at the same
> location, and their conditions will all be evaluated, so if you
> had an "or" instead of an "and" (if you wanted to stop if X or Y),
> you could use multiple breakpoints:
>
> break foo.c:17 if (X)
> break foo.c:17 if (Y)
>
> X and Y don't have to be in the local scope, so long as they are
> in "visible scope". gdb's concept of visible scope is a bit more
> permissive than C -- a static variable from another source file
> can be used so long as it is unambiguous. If it is ambiguous, it
> can be specified as "foo.c:var".
next prev parent reply other threads:[~2007-06-25 23:36 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 [this message]
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
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=200706251736.22816.matze999@gmx.net \
--to=matze999@gmx.net \
--cc=Michael.Snyder@access-company.com \
--cc=gdb@sourceware.org \
/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