From: "Andrew Burgess" <aburgess@broadcom.com>
To: insight@sourceware.org
Cc: "Keith Seitz" <keiths@redhat.com>
Subject: Re: [PATCH] Remove use of deprecated_frame_register_read
Date: Fri, 20 Sep 2013 11:51:00 -0000 [thread overview]
Message-ID: <523C36AC.4060403@broadcom.com> (raw)
In-Reply-To: <523B94D9.6070907@redhat.com>
On 20/09/2013 1:20 AM, Keith Seitz wrote:
> On 09/18/2013 07:16 AM, Andrew Burgess wrote:
>> Continuing the theme of removing deprecated_* things, this
>> patch removes the use of deprecated_frame_register_read,
>> there's only one of them.
>>
>> OK to apply?
>
> With the two small nits mentioned below checked/fixed, please commit,
> and again, thank you for your help.
Both fixed and committed.
Thanks for reviewing.
Andrew
>> diff -u -p -r1.49 gdbtk-register.c
>> --- ./gdb/gdbtk/generic/gdbtk-register.c 6 Sep 2013 09:23:00
>> -0000 1.49
>> +++ ./gdb/gdbtk/generic/gdbtk-register.c 18 Sep 2013 13:26:40 -0000
>> @@ -443,21 +443,25 @@ map_arg_registers (Tcl_Interp *interp, i
>> static void
>> register_changed_p (int regnum, map_arg arg)
>> {
>> - gdb_byte raw_buffer[MAX_REGISTER_SIZE];
>> + struct value *val;
>> gdb_assert (regnum < old_regs_count);
>>
>> - if (!target_has_registers
>> - || !deprecated_frame_register_read (get_selected_frame (NULL),
>> regnum,
>> - raw_buffer))
>> + if (!target_has_registers)
>> return;
>> +
>
> (1/2) This line looks like it has trailing whitespace. Could you
> double-check?
>
>> + val = get_frame_register_value (get_selected_frame (NULL), regnum);
>> + if (value_optimized_out (val) || !value_entirely_available (val))
>> + return;
>
> (2/2) So does this line.
>
>>
>> - if (memcmp (&old_regs[regnum * MAX_REGISTER_SIZE], raw_buffer,
>> + if (memcmp (&old_regs[regnum * MAX_REGISTER_SIZE],
>> + value_contents_all (val),
>> register_size (get_current_arch (), regnum)) == 0)
>> return;
>>
>> /* Found a changed register. Save new value and return its
>> number. */
>>
>> - memcpy (&old_regs[regnum * MAX_REGISTER_SIZE], raw_buffer,
>> + memcpy (&old_regs[regnum * MAX_REGISTER_SIZE],
>> + value_contents_all (val),
>> register_size (get_current_arch (), regnum));
>>
>> Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewIntObj
>> (regnum));
>>
>
>
>
>
prev parent reply other threads:[~2013-09-20 11:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-18 14:17 Andrew Burgess
[not found] ` <523B94D9.6070907@redhat.com>
2013-09-20 11:51 ` Andrew Burgess [this message]
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=523C36AC.4060403@broadcom.com \
--to=aburgess@broadcom.com \
--cc=insight@sourceware.org \
--cc=keiths@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).