Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Matt Rice <ratmice@gmail.com>
Cc: Abhijit Halder <abhijit.k.halder@gmail.com>,
	gdb-patches@sourceware.org, 	Tom Tromey <tromey@redhat.com>
Subject: Re: PATCH
Date: Tue, 12 Jul 2011 19:25:00 -0000	[thread overview]
Message-ID: <CAJaTeToT6TNch2HexNGeVrLSbMOAp=TsWa_Ee43faTriQFS_Tw@mail.gmail.com> (raw)
In-Reply-To: <CACTLOFqJtQDuZvtfddWZ8rAmYMspdXz5ZrnBorvgpxZmtG3XPg@mail.gmail.com>

On Tue, Jul 12, 2011 at 13:31, Matt Rice wrote:
> On Tue, Jul 12, 2011 at 8:59 AM, Mike Frysinger wrote:
>> On Tue, Jul 12, 2011 at 03:15, Abhijit Halder wrote:
>>> since the pipe (|) symbol is also a c operator, it will confuse gdb.
>>> Even if we use |& we may land up into a trouble situation.
>>>
>>> Breakpoint 1, main (argc=1, argv=0x7fffb6e506a8) at test.c:15
>>> 15          return (SUCCESS) ;
>>> (gdb) p argc|&*argc
>>> $1 = 1
>>> (gdb) p argc |& *argc
>>> $2 = 1
>>> (gdb)
>>
>> i'm not seeing this.  on an unmodified gdb-7.2, i get:
>> (gdb) p g
>> $1 = 0xa
>> (gdb) p g |& g
>> Argument to arithmetic operation not a number or boolean.
>>
>> so what am i missing ?
>
> this one should work.
>
> p 0 |& argv[argc] - &argv[0]

oh, i see now.  creative spacing.  "...|& FOO" is taking the address
of FOO.  hrm, this would also mean ">&" wont work as that could be a
comparison against the address of a variable.

">|" might work.  it's not as intuitive, but it's muscle memory in the
end and people will learn soon enough :P.
-mike


  reply	other threads:[~2011-07-12 18:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-09 13:09 PATCH Abhijit Halder
2011-07-09 19:06 ` PATCH oza Pawandeep
2011-07-11 12:13   ` PATCH Abhijit Halder
2011-07-11 13:42     ` PATCH Abhijit Halder
2011-07-10  7:47 ` PATCH Mike Frysinger
2011-07-11 21:10 ` PATCH Tom Tromey
2011-07-12  0:51   ` PATCH Abhijit Halder
2011-07-12  7:15     ` PATCH Abhijit Halder
2011-07-12  8:34       ` PATCH Mike Frysinger
2011-07-12  9:01         ` PATCH Abhijit Halder
2011-07-12 17:31           ` PATCH Mike Frysinger
2011-07-12 17:49             ` PATCH Matt Rice
2011-07-12 19:25               ` Mike Frysinger [this message]
2011-07-12 19:49       ` PATCH Tom Tromey
2011-07-12 20:43         ` PATCH Mike Frysinger
2011-07-13  8:45           ` PATCH Abhijit Halder
2011-07-15 14:15             ` PATCH Abhijit Halder
2011-07-15 20:49               ` PATCH Tom Tromey
2011-07-20 19:25               ` PATCH Sergio Durigan Junior
2011-07-21 11:08           ` gdb output pipelining to shell (was: Re: PATCH) Pedro Alves

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='CAJaTeToT6TNch2HexNGeVrLSbMOAp=TsWa_Ee43faTriQFS_Tw@mail.gmail.com' \
    --to=vapier@gentoo.org \
    --cc=abhijit.k.halder@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ratmice@gmail.com \
    --cc=tromey@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