This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: RFA: Remove D10V-specific code from arch-independent modules


Jim,

Some immediate comments:

--

> +     struct type *code_ptr_type;


should this be a builtin_type?  GDB has:


> /* Address/pointer types: */
> /* (C) Language pointer type. Some target platforms use an implicitly
> {sign,zero} -extended 32 bit C language pointer on a 64 bit ISA. */
> extern struct type *builtin_type_ptr;

I think having:

   extern struct type *builtin_type_data_ptr;
   extern struct type *builtin_type_{func,insn,???}_ptr;

would make more sense.  It would also eliminate the need for the hack:

> !   /* We can't create this type until the D10V gdbarch object has been
> !      made current, or else the size will be wrong.  This means we
> !      can't initialize it in d10v_gdbarch_init.  So we do it here, the
> !      first time we need it.  */
> !   if (! tdep->code_ptr_type)
> !     tdep->code_ptr_type
> !       = lookup_pointer_type (lookup_function_type (builtin_type_void));
> ! 


--

The s/D10V_MAKE_IADDR/d10v_make_iaddr/ et.al. applied to d10v-tdep.c can 
go straight in as an obvious fix.  This should make the final patch a 
lot smaller :-)

--

The convert to/from virtual/raw register functions are borderline 
deprecated.  They are being replaced by the much simpler functions 
gdbarch_register_{read,write}.  If, for the d10v, those conversion 
functions are being eliminated then I'd just delete them.

--

Once I've got a more concrete feel for the change (the examples) I'll go 
back through this.

	Andrew



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