From: "Andrew Burgess" <aburgess@broadcom.com>
To: insight@sourceware.org
Subject: [PATCH] Remove use of deprecated_frame_register_read
Date: Wed, 18 Sep 2013 14:17:00 -0000 [thread overview]
Message-ID: <5239B5D5.3090006@broadcom.com> (raw)
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?
Thanks,
Andrew
2013-09-18 Andrew Burgess <aburgess@broadcom.com>
* generic/gdbtk-register.c (register_changed_p): Replace use of
deprecated_frame_register_read with get_frame_register_value.
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;
+
+ val = get_frame_register_value (get_selected_frame (NULL), regnum);
+ if (value_optimized_out (val) || !value_entirely_available (val))
+ return;
- 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));
next reply other threads:[~2013-09-18 14:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-18 14:17 Andrew Burgess [this message]
[not found] ` <523B94D9.6070907@redhat.com>
2013-09-20 11:51 ` Andrew Burgess
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=5239B5D5.3090006@broadcom.com \
--to=aburgess@broadcom.com \
--cc=insight@sourceware.org \
/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).