Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] "tfind" across unavailable-stack frames.
Date: Tue, 17 Dec 2013 10:09:00 -0000	[thread overview]
Message-ID: <52B022C8.3090504@redhat.com> (raw)
In-Reply-To: <52B01328.8030707@codesourcery.com>

On 12/17/2013 09:02 AM, Yao Qi wrote:
> On 12/17/2013 12:19 AM, Pedro Alves wrote:
>>>> What does the last sentence mean in the comments?
>>>>
>> The same comment is in frame_id_build.  Re. what is means, see struct frame_id:
>>
>>   /* The frame's special address.  This shall be constant through out the
>>      lifetime of the frame.  This is used for architectures that may have
>>      frames that do not change the stack but are still distinct and have
>>      some form of distinct identifier (e.g. the ia64 which uses a 2nd
>>      stack for registers).  This field is treated as unordered - i.e. will
>>      not be used in frame ordering comparisons.
>>
>>      This field is valid only if special_addr_p is true.  Otherwise, this
>>      frame is considered to have a wildcard special address, i.e. one that
>>                                                              ^^^^^^^^^^^^^
>>      matches every address value in frame comparisons.  */
>>      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>   CORE_ADDR special_addr;
> 
> The last sentence, especially "wildcard" stuff, is still confusing to
> me.  Go through the usage of "special_addr", looks "special_addr" is
> used only if "special_addr_p" is true.  Comment "This field is valid
> only if special_addr_p is true" is clear and sufficient.  

It is clear, but it is not as precise or sufficient.  A wild
card means that given these frame ids:

 fid1: {code_p,stack_p,special_p}
 fid2: {!code_p,stack_p,!special_p}

 fid3: {code_p,stack_p,special_p}
 fid4: {code_p,stack_p,!special_p}

{fid1, fid2} with same stack addresses,
and {fid3, fid4} with same code and stack addresses,
both:

 frame_id_eq(fid1, fid2)
 frame_id_eq(fid3, fid4)

return true.

> I don't see
> any extra information the last sentence "Otherwise, xxxxx" delivered
> except confusion.

The extra information indicates that e.g., frame_id_eq(fid3, fid4)
above returns true, not false, as one might at first expect.

Whether this whole wildcarding business is a good idea, is
another story.

-- 
Pedro Alves


  reply	other threads:[~2013-12-17 10:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 18:26 [patch] circ.exp Abid, Hafiz
2013-04-11 22:59 ` Abid, Hafiz
2013-04-16  7:52 ` Pedro Alves
2013-04-16 20:53   ` Abid, Hafiz
2013-04-17 20:33     ` Pedro Alves
2013-04-17 20:54       ` Abid, Hafiz
2013-04-18 10:30         ` Pedro Alves
2013-04-18 11:09           ` Pedro Alves
2013-12-13 17:49           ` [PATCH] "tfind" across unavailable-stack frames Pedro Alves
2013-12-14  6:23             ` Yao Qi
2013-12-16 16:19               ` Pedro Alves
2013-12-17  9:04                 ` Yao Qi
2013-12-17 10:09                   ` Pedro Alves [this message]
2013-12-17 12:39                     ` Yao Qi
2013-12-17 20:55                       ` Pedro Alves
2013-12-16  8:40             ` Metzger, Markus T
2013-12-16 16:25               ` Pedro Alves
2013-12-16 16:42                 ` [PATCH v2] " Pedro Alves
2013-04-19 14:27       ` [patch] circ.exp Abid, Hafiz
2013-04-19 14:28         ` Pedro Alves
2013-05-08 10:12           ` Abid, Hafiz
2013-05-08 15:13             ` Pedro Alves
2013-05-08 16:18               ` Abid, Hafiz

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=52B022C8.3090504@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.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