Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [RFA] "constify" parse_exp_1
Date: Sat, 09 Mar 2013 01:04:00 -0000	[thread overview]
Message-ID: <513A8A80.4040905@redhat.com> (raw)
In-Reply-To: <513A899C.2030800@redhat.com>

On 03/08/2013 05:00 PM, Pedro Alves wrote:
>> This is perfectly fine:
>>
>>   	  for (loc = t->base.loc; loc; loc = loc->next)
>>   	    {
>> -	      p = tmp_p;
>> +	      const char *q;
>> +
>> +	      q = tmp_p;
>> -	      exp = parse_exp_1 (&p, loc->address,
>> +	      exp = parse_exp_1 (&q, loc->address,
>> 				 block_for_pc (loc->address), 1);
>> +	      p = (char *) q;
>>
>> It's perfectly valid, as we know Q on output must point within
>> the object/string TMP_P pointed at on entry.
>> This reads much more intuitively to me, no funny arithmetic, and
>> gets rid of the aliasing issue with the other suggestion, and
>> no new function necessary.
>
> And confirmed this approach is valid.

I have a revision, but after this morning's fiasco, I'm a bit leery of 
submitting it until substantial further review. My focus is waxing 
quickly right now.

I've also got amendments to address Tom's comments.

Thanks,
Keith


  reply	other threads:[~2013-03-09  1:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08  0:12 Keith Seitz
2013-03-08  0:22 ` Pedro Alves
2013-03-08  1:02   ` Keith Seitz
2013-03-08 12:27     ` Pedro Alves
2013-03-08 13:55       ` Pedro Alves
2013-03-09  1:00         ` Pedro Alves
2013-03-09  1:04           ` Keith Seitz [this message]
2013-03-11 22:09             ` Keith Seitz
2013-03-12 10:18               ` Pedro Alves
2013-03-12 17:40                 ` Keith Seitz
2013-03-08 14:54     ` Tom Tromey
2013-03-11 16:50       ` Keith Seitz
2013-03-11 18:30         ` Tom Tromey

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=513A8A80.4040905@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@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