From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3682 invoked by alias); 15 Oct 2004 13:30:45 -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 3586 invoked from network); 15 Oct 2004 13:30:43 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 15 Oct 2004 13:30:43 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i9FDUh0G020687 for ; Fri, 15 Oct 2004 09:30:43 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9FDUbr01808; Fri, 15 Oct 2004 09:30:42 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 20A8A28CF; Fri, 15 Oct 2004 09:30:32 -0400 (EDT) Message-ID: <416FD0F7.6010603@gnu.org> Date: Fri, 15 Oct 2004 13:30:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20041009 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [commit] malloc and sys/wait.h tweaks Content-Type: multipart/mixed; boundary="------------080508070005000300090005" X-SW-Source: 2004-10/txt/msg00272.txt.bz2 This is a multi-part message in MIME format. --------------080508070005000300090005 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 144 FYI, ARI tweaks, Only interesting bit is that I changed the .l.c and .y.c rules so that they don't do s/xmalloc/xxmalloc/. committed, Andrew --------------080508070005000300090005 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 6565 2004-10-15 Andrew Cagney * ada-exp.y, ada-lex.l: Use xmalloc and xrealloc through out. * inf-ptrace.c: Include "gdb_wait.h" instead of . * Makefile.in (.y.c, .l.c): Don't replace xmalloc with xxmalloc. Update dependencies. Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.641 diff -p -u -r1.641 Makefile.in --- Makefile.in 12 Oct 2004 22:18:54 -0000 1.641 +++ Makefile.in 15 Oct 2004 13:09:41 -0000 @@ -656,7 +656,7 @@ cp_support_h = cp-support.h $(symtab_h) dcache_h = dcache.h defs_h = defs.h $(config_h) $(ansidecl_h) $(gdb_locale_h) $(gdb_signals_h) \ $(libiberty_h) $(bfd_h) $(ui_file_h) $(xm_h) $(nm_h) $(tm_h) \ - $(fopen_same_h) $(gdbarch_h) + $(fopen_bin_h) $(gdbarch_h) dictionary_h = dictionary.h disasm_h = disasm.h doublest_h = doublest.h $(floatformat_h) @@ -1575,8 +1575,8 @@ po/$(PACKAGE).pot: force -e '/extern.*realloc/d' \ -e '/extern.*free/d' \ -e '/include.*malloc.h/d' \ - -e 's/malloc/xmalloc/g' \ - -e 's/realloc/xrealloc/g' \ + -e 's/[^x]malloc/xmalloc/g' \ + -e 's/[^x]realloc/xrealloc/g' \ -e '/^#line.*y.tab.c/d' \ < $@.tmp > $@.new -rm $@.tmp @@ -1589,8 +1589,8 @@ po/$(PACKAGE).pot: force -e '/extern.*realloc/d' \ -e '/extern.*free/d' \ -e '/include.*malloc.h/d' \ - -e 's/malloc/xmalloc/g' \ - -e 's/realloc/xrealloc/g' \ + -e 's/[^x]malloc/xmalloc/g' \ + -e 's/[^x]realloc/xrealloc/g' \ -e 's/yy_flex_xrealloc/yyxrealloc/g' \ < $@ > $@.new && \ rm -f $@ && \ @@ -2083,7 +2083,7 @@ inflow.o: inflow.c $(defs_h) $(frame_h) $(inflow_h) inf-ptrace.o: inf-ptrace.c $(defs_h) $(observer_h) $(gdb_ptrace_h) \ $(inflow_h) $(inferior_h) $(regcache_h) $(command_h) $(gdbcore_h) \ - $(inf_child_h) $(gdbcmd_h) $(gdb_string_h) + $(inf_child_h) $(gdbcmd_h) $(gdb_string_h) $(gdb_wait_h) infptrace.o: infptrace.c $(defs_h) $(command_h) $(frame_h) $(gdbcore_h) \ $(inferior_h) $(regcache_h) $(target_h) $(gdb_assert_h) \ $(gdb_wait_h) $(gdb_string_h) $(gdb_dirent_h) $(gdb_ptrace_h) @@ -2148,10 +2148,11 @@ m2-valprint.o: m2-valprint.c $(defs_h) $ $(m2_lang_h) m32r-linux-nat.o: m32r-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ - $(m32r_tdep_h) + $(gregset_h) $(m32r_tdep_h) m32r-linux-tdep.o: m32r-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ $(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \ - $(gdb_string_h) $(glibc_tdep_h) $(solib_svr4_h) $(m32r_tdep_h) + $(gdb_string_h) $(glibc_tdep_h) $(solib_svr4_h) $(trad_frame_h) \ + $(frame_unwind_h) $(m32r_tdep_h) m32r-rom.o: m32r-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ $(serial_h) $(symtab_h) $(command_h) $(gdbcmd_h) $(symfile_h) \ $(gdb_string_h) $(objfiles_h) $(inferior_h) $(regcache_h) @@ -2187,7 +2188,7 @@ m68k-tdep.o: m68k-tdep.c $(defs_h) $(dwa $(inferior_h) $(regcache_h) $(arch_utils_h) $(osabi_h) $(dis_asm_h) \ $(m68k_tdep_h) $(gregset_h) m88kbsd-nat.o: m88kbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ - $(target_h) $(m88k_tdep_h) $(inf_ptrace.h) + $(target_h) $(m88k_tdep_h) $(inf_ptrace_h) m88k-tdep.o: m88k-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) $(frame_h) \ $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \ $(regcache_h) $(regset_h) $(symtab_h) $(trad_frame_h) $(value_h) \ @@ -2608,8 +2609,9 @@ symtab.o: symtab.c $(defs_h) $(symtab_h) $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \ $(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \ $(language_h) $(demangle_h) $(inferior_h) $(linespec_h) $(source_h) \ - $(filenames_h) $(objc_lang_h) $(hashtab_h) $(gdb_obstack_h) \ - $(block_h) $(dictionary_h) $(gdb_string_h) $(gdb_stat_h) $(cp_abi_h) + $(filenames_h) $(objc_lang_h) $(ada_lang_h) $(hashtab_h) \ + $(gdb_obstack_h) $(block_h) $(dictionary_h) $(gdb_string_h) \ + $(gdb_stat_h) $(cp_abi_h) target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \ $(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ $(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) $(gdbcore_h) @@ -2675,8 +2677,8 @@ values.o: values.c $(defs_h) $(gdb_strin $(gdb_assert_h) $(regcache_h) $(block_h) varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \ $(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h) -vaxbsd-nat.o: vaxbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ - $(target_h) $(vax_tdep_h) $(inf_ptrace_h) $(bsd_kvm_h) +vaxbsd-nat.o: vaxbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) $(target_h) \ + $(vax_tdep_h) $(inf_ptrace_h) $(bsd_kvm_h) vax-nat.o: vax-nat.c $(defs_h) $(inferior_h) $(gdb_assert_h) $(vax_tdep_h) vaxnbsd-tdep.o: vaxnbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \ $(vax_tdep_h) $(solib_svr4_h) $(gdb_string_h) Index: ada-exp.y =================================================================== RCS file: /cvs/src/src/gdb/ada-exp.y,v retrieving revision 1.13 diff -p -u -r1.13 ada-exp.y --- ada-exp.y 6 Oct 2004 09:28:55 -0000 1.13 +++ ada-exp.y 15 Oct 2004 13:09:41 -0000 @@ -852,7 +852,7 @@ write_object_renaming (struct block *ori if (end == NULL) end = suffix + strlen (suffix); field_name.length = end - suffix; - field_name.ptr = (char *) malloc (end - suffix + 1); + field_name.ptr = xmalloc (end - suffix + 1); strncpy (field_name.ptr, suffix, end - suffix); field_name.ptr[end - suffix] = '\000'; suffix = end; Index: ada-lex.l =================================================================== RCS file: /cvs/src/src/gdb/ada-lex.l,v retrieving revision 1.10 diff -p -u -r1.10 ada-lex.l --- ada-lex.l 9 Oct 2004 04:56:48 -0000 1.10 +++ ada-lex.l 15 Oct 2004 13:09:41 -0000 @@ -345,7 +345,7 @@ resize_tempbuf (unsigned int n) if (tempbufsize < n) { tempbufsize = (n+63) & ~63; - tempbuf = (char *) realloc (tempbuf, tempbufsize); + tempbuf = xrealloc (tempbuf, tempbufsize); } } Index: inf-ptrace.c =================================================================== RCS file: /cvs/src/src/gdb/inf-ptrace.c,v retrieving revision 1.10 diff -p -u -r1.10 inf-ptrace.c --- inf-ptrace.c 1 Oct 2004 16:12:26 -0000 1.10 +++ inf-ptrace.c 15 Oct 2004 13:09:41 -0000 @@ -32,7 +32,7 @@ #include "gdbcmd.h" #include "gdb_string.h" -#include +#include "gdb_wait.h" #include /* HACK: Save the ptrace ops returned by ptrace_target. */ --------------080508070005000300090005--