the gdb-patches@sources.redhat.com mailing list for the Date Prev ]


Index Nav: [ Author Index ] [ Date Index -- Thread Index ] [ Subject Index [
xstrdup -- . Index Nav: Subject Date Next ] ] [ Date Index ] [ Subject Index ]

Re: [RFA] strdup->xstrdup


 part of GDB.   @@ -56,10 +56,6 @@ extern int memcmp ();  #ifndef strerror  extern char *strerror (int);/* X3.159-1989  4.11.6.2 */  #endif -#endif - -#ifdef NEED_DECLARATION_STRDUP -extern char *strdup ();/* full prototype collides w/ some OSes (AIX 3.2.5) */  #endif    #ifdef NEED_DECLARATION_STRSTR Index: remote-udi.c =================================================================== RCS file: /cvs/src/src/gdb/remote-udi.c,v retrieving revision 1.9 diff -u -p -r1.9 remote-udi.c --- remote-udi.c2001/01/23 22:48:551.9 +++ remote-udi.c2001/01/25 16:44:08 @@ -234,7 +234,7 @@ udi_open (char *name, int from_tty)    if (!name)      error ("Usage: target udi config_id, where config_id appears in udi_soc file");   -  udi_config_id = strdup (strtok (name, " \t")); +  udi_config_id = xstrdup (strtok (name, " \t"));      if (UDIConnect (udi_config_id, &udi_session_id))      /* FIXME: Should set udi_session_id to make GDB run on a copy of the patch.  sigh.  2001-01-24  Jeff Holcomb  <jeffh@redhat.com>          * remote-udi.c (udi_open): Change strdup to make GDB run by @@ -1072,7 +1072,7 @@ delete_variable_1 (struct cpstack **resu       yet been installed, don"t report it, it belongs to -1 here.  */ Index: thread.c =================================================================== RCS file: /cvs/src/src/gdb/thread.c,v retrieving revision 1.9 diff -u -p -r1.9 thread.c --- thread.c2000/12/15 01:01:501.9 +++ thread.c2001/01/25 16:44:08 @@ -1,5 +1,5 @@  /* Multi-process/thread control for libiberty */ -extern char *strdup (char *);    /* Signal handler for kernel debugger KDB.  */   Index: config/rs6000/xm-rs6000.h =================================================================== RCS file: /cvs/src/src/gdb/config/rs6000/xm-rs6000.h,v retrieving revision 1.2 diff -u -p -r1.2 xm-rs6000.h --- xm-rs6000.h2000/05/28 01:12:391.2 +++ xm-rs6000.h2001/01/25 16:44:09 @@ -1,5 +1,5 @@  /* Parameters for hosting on an RS6000, for vaxult2, Index: config/vax/xm-vaxult2.h =================================================================== RCS file: /cvs/src/src/gdb/config/vax/xm-vaxult2.h,v retrieving revision 1.1.1.2 diff -u -p -r1.1.1.2 xm-vaxult2.h --- xm-vaxult2.h1999/07/07 20:17:351.1.1.2 +++ xm-vaxult2.h2001/01/25 16:44:09 @@ -1,8 +1,6 @@  /* Definitions to xstrdup.         Update copyright message.         * varobj.c (delete_variable_1): Likewise.          * gdb_string.h: Remove declaration on the Mac, so we need a bit tenacious about sharing text segments, disallowing bpts.  */  #defineONE_PROCESS_WRITETEXT - -extern char *strdup (const char *);    /* Interface definitions for SIGWINCH `window size changed". */   Index: config/vax/xm-vaxult.h =================================================================== RCS file: /cvs/src/src/gdb/config/vax/xm-vaxult.h,v retrieving revision 1.1.1.2 diff -u -p -r1.1.1.2 xm-vaxult.h --- xm-vaxult.h1999/07/07 20:17:341.1.1.2 +++ xm-vaxult.h2001/01/25 16:44:09 @@ -1,8 +1,6 @@  /* Definitions to the command in case it is clobbered by Lynx Real-Time Systems, Inc.  Los Gatos, CA.     Free Software Foundation, Inc. @@ -531,7 +531,7 @@ thread_apply_all_command (char *cmd, int      /* Save a copy of strdup in MPW"s string.h, oddly enough. */ - -char *strdup (char *s1);    /* "." indicates drivers on Mach on an Intel 386 -   Copyright (C) 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc. +   Copyright (C) 1986, 1987, 1989, 1991, 1992, 2001 Free Software Foundation, Inc.       This file is part of GDB. @@ -66,9 +66,6 @@  /* Setpgrp() takes arguments, unlike ordinary Sys V"s.  */    #defineSETPGRP_ARGS a vax under Ultrix. */    #include "vax/xm-vax.h" -extern char *strdup (); -  /* This is required for GDB, the caller... */    if (var->obj_name != NULL)      { -      cppush (resultp, strdup (var->obj_name)); +      cppush (resultp, xstrdup (var->obj_name));        *delcountp = *delcountp + 1;      }   Index: config/xm-mpw.h =================================================================== RCS file: /cvs/src/src/gdb/config/xm-mpw.h,v retrieving revision 1.1.1.2 diff -u -p -r1.1.1.2 xm-mpw.h --- xm-mpw.h1999/07/07 20:11:401.1.1.2 +++ xm-mpw.h2001/01/25 16:44:08 @@ -1,5 +1,5 @@  /* Macro definitions for Ultrix 3.1b, not for running GDB on a vax under Ultrix. */    #include "vax/xm-vax.h" -extern char *strdup (); -  #define NO_PTRACE_H    /* Old versions of GDB.   @@ -41,10 +41,6 @@  #define fgetc hacked_fgetc    #define POSIX_UTIME - -/* No declaration of GDB.   @@ -30,8 +30,6 @@    /* Kernel is part of the FD_* macros.  */ 1 > Oops.  Lets try again.  Thanks for later versions.  Ultrix     3.1b can"t just use xm-vaxult2.h because Ultrix 3.1b does define     FD_SET.  Sure, we could have separate configurations for hosting on xstrdup.         * thread.c (thread_apply_all_command): Change strdup to GNU General Public License as published for GDB, the GNU debugger. -   Copyright 1986, 1987, 1988, 1993, 1998, 1999, 2000 +   Copyright 1986, 1987, 1988, 1993, 1998, 1999, 2000, 2001       Contributed by       execute_command */ -  saved_cmd = strdup (cmd); +  saved_cmd = xstrdup (cmd);    saved_cmd_cleanup_chain = make_cleanup (xfree, (void *) saved_cmd);    for (tp = thread_list; tp; tp = tp->next)      if (thread_alive (tp)) @@ -574,7 +574,7 @@ thread_apply_command (char *tidlist, int      /* Save a Hewlett-Packard 9000/300, running bsd. -   Copyright 1986, 1987, 1989, 1991, 1992, 1993  Free Software Foundation, Inc. +   Copyright 1986, 1987, 1989, 1991, 1992, 1993, 2001  Free Software Foundation, Inc.       This file is the terms of GDB.   @@ -21,5 +21,3 @@  #define HOST_BYTE_ORDER BIG_ENDIAN    #define ALIGN_STACK_ON_STARTUP - -extern char *strdup (); Index: config/m68k/xm-hp300bsd.h =================================================================== RCS file: /cvs/src/src/gdb/config/m68k/xm-hp300bsd.h,v retrieving revision 1.2 diff -u -p -r1.2 xm-hp300bsd.h --- xm-hp300bsd.h2000/05/28 01:12:361.2 +++ xm-hp300bsd.h2001/01/25 16:44:09 @@ -1,5 +1,5 @@  /* Parameters for an Apollo m68k in BSD mode -   Copyright (C) 1992 Free Software Foundation, Inc. +   Copyright (C) 1992, 2001 Free Software Foundation, Inc.       This file is a - -/* AIX doesn"t have strdup, so we need to make GDB run on Apple Macintoshes. -   Copyright (C) 1994, 1995 Free Software Foundation, Inc. +   Copyright (C) 1994, 1995, 2001 Free Software Foundation, Inc.       This file is free software; you can redistribute it and/or modify     it under of strdup.  Update copyright         message.         * config/xm-mpw.h: Likewise.         * config/i386/xm-i386mach.h: Likewise.         * config/m68k/xm-apollo68b.h: Likewise.         * config/m68k/xm-hp300bsd.h: Likewise.         * config/rs6000/xm-rs6000.h: Likewise.         * config/vax/xm-vaxult.h: Remove declaration of the ChangeLog as part of the GNU debugger. -   Copyright 1986-87, 1989, 1991-96, 1998 Free Software Foundation, Inc. +   Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2001 Free Software Foundation, Inc.     Contributed by IBM Corporation.       This file is clobbered by       execute_command */ -  saved_cmd = strdup (cmd); +  saved_cmd = xstrdup (cmd);    saved_cmd_cleanup_chain = make_cleanup (xfree, (void *) saved_cmd);    while (tidlist < cmd)      { Index: varobj.c =================================================================== RCS file: /cvs/src/src/gdb/varobj.c,v retrieving revision 1.15 diff -u -p -r1.15 varobj.c --- varobj.c2001/01/19 05:45:161.15 +++ varobj.c2001/01/25 16:44:08 @@ -1,5 +1,5 @@  /* Implementation of the command in case it is part of ultrix have fd_set but not the GDB variable objects API. -   Copyright 1999, 2000 Free Software Foundation, Inc. +   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.       This program is part of GDB.   @@ -27,5 +27,3 @@    /* <errno.h> only defines this if __STDC__!!! */  extern int errno; - -extern char *strdup (); Index: config/m68k/xm-apollo68b.h =================================================================== RCS file: /cvs/src/src/gdb/config/m68k/xm-apollo68b.h,v retrieving revision 1.1.1.2 diff -u -p -r1.1.1.2 xm-apollo68b.h --- xm-apollo68b.h1999/07/07 20:14:411.1.1.2 +++ xm-apollo68b.h2001/01/25 16:44:08 @@ -1,5 +1,5 @@  /* Macro definitions for looking this over.  :)  This time without the different filename. */   Index: config/i386/xm-i386mach.h =================================================================== RCS file: /cvs/src/src/gdb/config/i386/xm-i386mach.h,v retrieving revision 1.1.1.2 diff -u -p -r1.1.1.2 xm-i386mach.h --- xm-i386mach.h1999/07/07 20:13:351.1.1.2 +++ xm-i386mach.h2001/01/25 16:44:08 @@ -1,5 +1,5 @@  /* Definitions to declare it is part of strdup.         * config/vax/xm-vaxult2.h: Likewise.   Index: gdb_string.h =================================================================== RCS file: /cvs/src/src/gdb/gdb_string.h,v retrieving revision 1.2 diff -u -p -r1.2 gdb_string.h --- gdb_string.h2000/05/28 01:12:271.2 +++ gdb_string.h2001/01/25 16:44:07 @@ -1,5 +1,5 @@  /* Portable <string.h> -   Copyright 1995, 1998 Free Software Foundation, Inc. +   Copyright 1995, 1998, 2001 Free Software Foundation, Inc.       This file 

GDB project [ Thread Next ] [ Thread Prev ] [ Author Index ] Thread Index ]
Message Nav: [ Message Nav: ] [ Date Next cc ] [ Thread Next ] [ Thread Prev Date