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]
Other format: [Raw text]

[RFA] Update D10V target to use new Harvardized type casts.



This one-line change lets the D10V back-end recognize the new
Harvardized type casts eg. "(@code int *)", so that a pointer 
can be forced into the address space of choice.

The exact same change can be used for (most) other Harvard back-ends.

2001-11-14  Michael Snyder  <msnyder@redhat.com>

	* d10v-tdep.c (d10v_pointer_to_address): Use new type flag
	TYPE_FLAG_CODE_SPACE to recognize a pointer that has been cast
	into the instruction address space.

Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.25
diff -p -r1.25 d10v-tdep.c
*** d10v-tdep.c	2001/10/15 18:18:29	1.25
--- d10v-tdep.c	2001/11/14 20:56:37
*************** d10v_pointer_to_address (struct type *ty
*** 413,419 ****
  
    /* Is it a code address?  */
    if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
!       || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD)
      return d10v_make_iaddr (addr);
    else
      return d10v_make_daddr (addr);
--- 413,420 ----
  
    /* Is it a code address?  */
    if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
!       || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD ||
!       (TYPE_FLAGS (TYPE_TARGET_TYPE (type)) & TYPE_FLAG_CODE_SPACE) != 0)
      return d10v_make_iaddr (addr);
    else
      return d10v_make_daddr (addr);


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