This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: gdbtk build patch
- From: Keith Seitz <keiths at redhat dot com>
- To: Ben Elliston <bje at au1 dot ibm dot com>
- Cc: "insight at sources dot redhat dot com" <insight at sources dot redhat dot com>
- Date: Mon, 09 Aug 2004 09:56:31 -0700
- Subject: Re: gdbtk build patch
- References: <87k6w8ub18.fsf@au.ibm.com>
On Sun, 2004-08-08 at 22:37, Ben Elliston wrote:
> This fixes a build problem introduced on 2004-08-02.
> Okay to commit?
Absolutely. Thanks.
Keith
>
> 2004-08-09 Ben Elliston <bje@au.ibm.com>
>
> * generic/gdbtk-register.c (get_register_size): Use
> register_size() instead of DEPRECATED_REGISTER_RAW_SIZE.
> (get_register): Likewise.
> (register_changed_p): Likewise.
>
> Index: gdbtk-register.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-register.c,v
> retrieving revision 1.25
> diff -u -p -r1.25 gdbtk-register.c
> --- gdbtk-register.c 11 Jun 2004 18:49:38 -0000 1.25
> +++ gdbtk-register.c 9 Aug 2004 05:31:28 -0000
> @@ -202,8 +202,7 @@ static void
> get_register_size (int regnum, void *arg)
> {
> Tcl_ListObjAppendElement (gdbtk_interp, result_ptr->obj_ptr,
> - Tcl_NewIntObj (DEPRECATED_REGISTER_RAW_SIZE
> - (regnum)));
> + Tcl_NewIntObj (register_size (current_gdbarch, regnum)));
> }
>
> /* returns a list of valid types for a register */
> @@ -311,10 +310,10 @@ get_register (int regnum, void *arg)
>
> strcpy (buf, "0x");
> ptr = buf + 2;
> - for (j = 0; j < DEPRECATED_REGISTER_RAW_SIZE (regnum); j++)
> + for (j = 0; j < register_size (current_gdbarch, regnum); j++)
> {
> int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
> - : DEPRECATED_REGISTER_RAW_SIZE (regnum) - 1 - j;
> + : register_size (current_gdbarch, regnum) - 1 - j;
> sprintf (ptr, "%02x", (unsigned char) buffer[idx]);
> ptr += 2;
> }
> @@ -435,13 +434,13 @@ register_changed_p (int regnum, void *ar
> return;
>
> if (memcmp (&old_regs[regnum * MAX_REGISTER_SIZE], raw_buffer,
> - DEPRECATED_REGISTER_RAW_SIZE (regnum)) == 0)
> + register_size (current_gdbarch, regnum)) == 0)
> return;
>
> /* Found a changed register. Save new value and return its number. */
>
> memcpy (&old_regs[regnum * MAX_REGISTER_SIZE], raw_buffer,
> - DEPRECATED_REGISTER_RAW_SIZE (regnum));
> + register_size (current_gdbarch, regnum));
>
> Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewIntObj (regnum));
> }