Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] "tfind" across unavailable-stack frames.
Date: Mon, 16 Dec 2013 16:25:00 -0000	[thread overview]
Message-ID: <52AF2965.8070902@redhat.com> (raw)
In-Reply-To: <A78C989F6D9628469189715575E55B230AA38AD2@IRSMSX104.ger.corp.intel.com>

On 12/16/2013 08:39 AM, Metzger, Markus T wrote:
>> -----Original Message-----
>> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
>> owner@sourceware.org] On Behalf Of Pedro Alves
>> Sent: Friday, December 13, 2013 6:50 PM
> 
> 
>> +/* See frame.h.  */
>> +
>> +struct frame_id
>> +frame_id_build_unavailable_stack (CORE_ADDR code_addr)
>> +{
>> +  struct frame_id id = null_frame_id;
>> +
>> +  id.stack_status = FID_STACK_UNAVAILABLE;
>> +  id.code_addr = code_addr;
>> +  id.code_addr_p = 1;
>> +  return id;
>> +}
> 
> For record-btrace, we would also need to allow special_addr.
> I can also add another build function for this case.

Yes, quite similar to the one you were adding.

>>  struct frame_info;
>> @@ -97,8 +115,8 @@ struct frame_id
>>       function pointer register or stack pointer register.  They are
>>       wrong.
>>
>> -     This field is valid only if stack_addr_p is true.  Otherwise, this
>> -     frame represents the null frame.  */
>> +     This field is valid only if frame_id.stack_status is
>> +     FID_STACK_VALID.  */
>>    CORE_ADDR stack_addr;
> 
> Maybe the comment should say that this field must be zero unless
> stack_status == FID_STACK_VALID.
> 
> Frame_id_eq would compare stack_addr if stack_status compares
> equal.

Indeed.  I'll do that.  I had considered changing frame_id_eq
to only compare stack_addr if stack_status == FID_STACK_VALID,
but then since in practice we always centrally control what we
put in stack_addr, and put 0 zero anyway, might as well just
document that, and avoid ever seeing confusing garbage there.

Thanks,
-- 
Pedro Alves


  reply	other threads:[~2013-12-16 16:25 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
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 [this message]
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=52AF2965.8070902@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.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