Turn value_bitpos into method

This changes value_bitpos to be a method of value.  Much of this patch
was written by script.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 09:44:47 -07:00
parent f49d5fa263
commit 5011c493fb
6 changed files with 30 additions and 39 deletions

View File

@@ -2096,7 +2096,7 @@ update_watchpoint (struct watchpoint *b, bool reparse)
{
/* Extract the bit parameters out from the bitfield
sub-expression. */
bitpos = value_bitpos (v);
bitpos = v->bitpos ();
bitsize = v->bitsize ();
}
else if (v == result && b->val_bitsize != 0)
@@ -10198,7 +10198,7 @@ watch_command_1 (const char *arg, int accessflag, int from_tty,
if (val_as_value != NULL && just_location)
{
saved_bitpos = value_bitpos (val_as_value);
saved_bitpos = val_as_value->bitpos ();
saved_bitsize = val_as_value->bitsize ();
}