From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25100 invoked by alias); 26 May 2005 22:27:10 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25046 invoked by uid 22791); 26 May 2005 22:27:05 -0000 Received: from e34.co.us.ibm.com (HELO e34.co.us.ibm.com) (32.97.110.132) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 26 May 2005 22:27:05 +0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e34.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j4QMR3cE435984 for ; Thu, 26 May 2005 18:27:03 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j4QMR3hT231776 for ; Thu, 26 May 2005 16:27:03 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id j4QMR3qp011984 for ; Thu, 26 May 2005 16:27:03 -0600 Received: from austin.ibm.com (netmail2.austin.ibm.com [9.41.248.176]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j4QMR3pm011975 for ; Thu, 26 May 2005 16:27:03 -0600 Received: from lazy.austin.ibm.com (lazy.austin.ibm.com [9.53.94.97]) by austin.ibm.com (8.12.10/8.12.10) with ESMTP id j4QMR2Uf096828 for ; Thu, 26 May 2005 17:27:02 -0500 Date: Thu, 26 May 2005 22:50:00 -0000 From: Manoj Iyer X-X-Sender: manjo@lazy To: gdb-patches@sources.redhat.com Subject: [RFC] solib-svr4.c gdb_byteised. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2005-05/txt/msg00567.txt.bz2 solib-svr4.c compiles without errors on ppc64 with gcc4.0. Here is a patch... 2005-05-26 Manoj Iyer * solib-svr4.c: lm_info structure convert type of lm to gdb_byte. (elf_locate_base): Converted types of buf, bufend, pbuf, to gdb_byte. (first_link_map_member): Converted type of r_map_buf to gdb_byte. (open_symbol_file_object): Converted type of l_name_buf to gdb_byte. (svr4_fetch_objfile_link_map): Converted type of l_name_buf to gdb_byte. -------------------------------------------------------------------------- --- old/src/gdb/solib-svr4.c 2005-04-27 15:51:52.000000000 -0500 +++ new/src/gdb/solib-svr4.c 2005-05-26 17:05:10.000000000 -0500 @@ -57,7 +57,7 @@ struct lm_info /* Pointer to copy of link map from inferior. The type is char * rather than void *, so that we may use byte offsets to find the various fields without the need for a cast. */ - char *lm; + gdb_byte *lm; }; /* On SVR4 systems, a list of symbols in the dynamic linker where @@ -292,8 +292,8 @@ elf_locate_base (void) struct bfd_section *dyninfo_sect; int dyninfo_sect_size; CORE_ADDR dyninfo_addr; - char *buf; - char *bufend; + gdb_byte *buf; + gdb_byte *bufend; int arch_size; /* Find the start address of the .dynamic section. */ @@ -337,7 +337,7 @@ elf_locate_base (void) } else if (dyn_tag == DT_MIPS_RLD_MAP) { - char *pbuf; + gdb_byte *pbuf; int pbuf_size = TARGET_PTR_BIT / HOST_CHAR_BIT; pbuf = alloca (pbuf_size); @@ -372,7 +372,7 @@ elf_locate_base (void) } else if (dyn_tag == DT_MIPS_RLD_MAP) { - char *pbuf; + gdb_byte *pbuf; int pbuf_size = TARGET_PTR_BIT / HOST_CHAR_BIT; pbuf = alloca (pbuf_size); @@ -468,7 +468,7 @@ first_link_map_member (void) { CORE_ADDR lm = 0; struct link_map_offsets *lmo = svr4_fetch_link_map_offsets (); - char *r_map_buf = xmalloc (lmo->r_map_size); + gdb_byte *r_map_buf = xmalloc (lmo->r_map_size); struct cleanup *cleanups = make_cleanup (xfree, r_map_buf); read_memory (debug_base + lmo->r_map_offset, r_map_buf, lmo->r_map_size); @@ -515,7 +515,7 @@ open_symbol_file_object (void *from_ttyp int errcode; int from_tty = *(int *)from_ttyp; struct link_map_offsets *lmo = svr4_fetch_link_map_offsets (); - char *l_name_buf = xmalloc (lmo->l_name_size); + gdb_byte *l_name_buf = xmalloc (lmo->l_name_size); struct cleanup *cleanups = make_cleanup (xfree, l_name_buf); if (symfile_objfile) @@ -690,7 +690,7 @@ svr4_fetch_objfile_link_map (struct objf struct lm_info objfile_lm_info; struct cleanup *old_chain; CORE_ADDR name_address; - char *l_name_buf = xmalloc (lmo->l_name_size); + gdb_byte *l_name_buf = xmalloc (lmo->l_name_size); old_chain = make_cleanup (xfree, l_name_buf); /* Set up the buffer to contain the portion of the link_map ----- manjo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Cogito ergo sum + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++