Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: gdb-patches@sourceware.org
Cc: kevinb@redhat.com
Subject: RFA: Fix compile time warnings building iq2000-tdep.c
Date: Tue, 28 Nov 2006 16:41:00 -0000	[thread overview]
Message-ID: <m3r6vnfrnh.fsf@redhat.com> (raw)

Hi Guys,

  The iq2000 port of GDB currently fails to build on the 6.6 branch
  and mainline because of compile time warnings triggered in
  iq2000-tdep.c, (which are now being treated as errors).  The
  patch below fixes them by changing various void* variables into
  gdb_byte*.

  May I apply the patch please ? 

Cheers
  Nick Clifton

gdb/ChangeLog
2006-11-28  Nick Clifton  <nickc@redhat.com>

	* iq2000-tdep.c: Fix compile time warnings:
	(iq2000_pointer_to_address): Change type of buf	parameter to
	gdb_byte*.
	(iq2000_address_to_pointer): Likewise.
	(iq2000_frame_prev_register): Likewise.
	(iq2000_extract_return_value): Change type of return_buffer to
	gdb_byte.
	(iq2000_return_value): Change type of readbuf and writebuf to
	gdb_byte.

Index: gdb/iq2000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/iq2000-tdep.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 iq2000-tdep.c
*** gdb/iq2000-tdep.c	17 Dec 2005 22:34:01 -0000	1.2
--- gdb/iq2000-tdep.c	28 Nov 2006 16:08:04 -0000
*************** insn_addr_from_ptr (CORE_ADDR ptr)	/* ta
*** 88,94 ****
     Convert a target pointer to an address in host (CORE_ADDR) format. */
  
  static CORE_ADDR
! iq2000_pointer_to_address (struct type * type, const void * buf)
  {
    enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
    CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
--- 88,94 ----
     Convert a target pointer to an address in host (CORE_ADDR) format. */
  
  static CORE_ADDR
! iq2000_pointer_to_address (struct type * type, const gdb_byte * buf)
  {
    enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
    CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
*************** iq2000_pointer_to_address (struct type *
*** 105,111 ****
     Convert a host-format address (CORE_ADDR) into a target pointer.  */
  
  static void
! iq2000_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
  {
    enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
  
--- 105,111 ----
     Convert a host-format address (CORE_ADDR) into a target pointer.  */
  
  static void
! iq2000_address_to_pointer (struct type *type, gdb_byte *buf, CORE_ADDR addr)
  {
    enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
  
*************** static void
*** 395,401 ****
  iq2000_frame_prev_register (struct frame_info *next_frame, void **this_cache,
  			    int regnum, int *optimizedp,
  			    enum lval_type *lvalp, CORE_ADDR *addrp,
! 			    int *realnump, void *valuep)
  {
    struct iq2000_frame_cache *cache = iq2000_frame_cache (next_frame, this_cache);
    if (regnum == E_SP_REGNUM && cache->saved_sp)
--- 395,401 ----
  iq2000_frame_prev_register (struct frame_info *next_frame, void **this_cache,
  			    int regnum, int *optimizedp,
  			    enum lval_type *lvalp, CORE_ADDR *addrp,
! 			    int *realnump, gdb_byte *valuep)
  {
    struct iq2000_frame_cache *cache = iq2000_frame_cache (next_frame, this_cache);
    if (regnum == E_SP_REGNUM && cache->saved_sp)
*************** iq2000_extract_return_value (struct type
*** 558,564 ****
       returned in a register, and if larger than 8 bytes, it is 
       returned in a stack location which is pointed to by the same
       register.  */
!   CORE_ADDR return_buffer;
    int len = TYPE_LENGTH (type);
  
    if (len <= (2 * 4))
--- 558,564 ----
       returned in a register, and if larger than 8 bytes, it is 
       returned in a stack location which is pointed to by the same
       register.  */
!   gdb_byte return_buffer;
    int len = TYPE_LENGTH (type);
  
    if (len <= (2 * 4))
*************** iq2000_extract_return_value (struct type
*** 592,598 ****
  static enum return_value_convention
  iq2000_return_value (struct gdbarch *gdbarch, struct type *type,
  		     struct regcache *regcache,
! 		     void *readbuf, const void *writebuf)
  {
    if (iq2000_use_struct_convention (type))
      return RETURN_VALUE_STRUCT_CONVENTION;
--- 592,598 ----
  static enum return_value_convention
  iq2000_return_value (struct gdbarch *gdbarch, struct type *type,
  		     struct regcache *regcache,
! 		     gdb_byte *readbuf, const gdb_byte *writebuf)
  {
    if (iq2000_use_struct_convention (type))
      return RETURN_VALUE_STRUCT_CONVENTION;


             reply	other threads:[~2006-11-28 16:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-28 16:41 Nick Clifton [this message]
2006-11-28 16:56 ` Daniel Jacobowitz
2006-11-28 17:12   ` Nick Clifton
2006-11-28 17:17     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3r6vnfrnh.fsf@redhat.com \
    --to=nickc@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox