This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [3/3] Remove deprecated_register_gdbarch_swap infrastructure


Brian Dessent wrote:

> Insight is still a user of deprecated_register_gdbarch_swap, so now it's
> broken.  What's the proper replacement for the following -
> 
> int
> Gdbtk_Register_Init (Tcl_Interp *interp)
> {
>   Tcl_CreateObjCommand (interp, "gdb_reginfo", gdbtk_call_wrapper,
>                         gdb_register_info, NULL);
> 
>   /* Register/initialize any architecture specific data */
>   setup_architecture_data ();
> 
>   deprecated_register_gdbarch_swap (&old_regs, sizeof (old_regs), NULL);
>   deprecated_register_gdbarch_swap (&regformat, sizeof (regformat),
> NULL);
>   deprecated_register_gdbarch_swap (&regtype, sizeof (regtype), NULL);
>   deprecated_register_gdbarch_swap (NULL, 0, setup_architecture_data);
> 
>   return TCL_OK;
> }

There's no direct replacement.  You'd have to eliminate those global
variables (old_regs, regformat, regtype), and replace them by something
that explicitly takes the architecture into account.

I've actually never looked at Insight before.  Where's that code
located?

Bye,


-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]