2004-01-19 Michael Chastain <mec.gnu@mindspring.com>

* MAINTAINERS: Delete mmalloc.
	* Makefile.in: Delete MMALLOC, MMALLOC_CFLAGS, -lmmalloc, mmalloc_h.
	* NEWS: Mention removal of --with-malloc.
	* acconfig.h: Delete USE_MMALLOC, MMCHECK_FORCE.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.in: Delete MMALLOC_CFLAGS, MMALLOC, --with-mmalloc, USE_MMALLOC, MMCHECK_FORCE.
	* gdbinit.in: Remove mmalloc.
	* utils.c: Delete USE_MMALLOC, NO_MMCHECK, MMCHECK_FORCE, malloc_botch.
	* config/alpha/alpha-linux.mh: Delete MMALLOC, MMALLOC_CFLAGS.
	* config/i386/go32.mh: Likewise.
	* config/i386/interix.mh: Likewise.
	* config/powerpc/xm-linux.h: Delete MMAP_BASE_ADDRESS, MMAP_INCREMENT.

2004-01-19  Michael Chastain  <mec.gnu@mindspring.com>

	* gdbint.texinfo: Delete USE_MMALLOC, NO_MMCHECK, MMCHECK_FORCE,
	MMAP_BASE_ADDRESS, MMAP_INCREMENT.
This commit is contained in:
Michael Chastain 2004-01-20 09:29:18 +00:00
parent b3208fb8f7
commit 9175c9a32c
16 changed files with 582 additions and 750 deletions

View File

@ -1,3 +1,19 @@
2004-01-19 Michael Chastain <mec.gnu@mindspring.com>
* MAINTAINERS: Delete mmalloc.
* Makefile.in: Delete MMALLOC, MMALLOC_CFLAGS, -lmmalloc, mmalloc_h.
* NEWS: Mention removal of --with-malloc.
* acconfig.h: Delete USE_MMALLOC, MMCHECK_FORCE.
* config.in: Regenerate.
* configure: Regenerate.
* configure.in: Delete MMALLOC_CFLAGS, MMALLOC, --with-mmalloc, USE_MMALLOC, MMCHECK_FORCE.
* gdbinit.in: Remove mmalloc.
* utils.c: Delete USE_MMALLOC, NO_MMCHECK, MMCHECK_FORCE, malloc_botch.
* config/alpha/alpha-linux.mh: Delete MMALLOC, MMALLOC_CFLAGS.
* config/i386/go32.mh: Likewise.
* config/i386/interix.mh: Likewise.
* config/powerpc/xm-linux.h: Delete MMAP_BASE_ADDRESS, MMAP_INCREMENT.
2004-01-19 Jeff Johnston <jjohnstn@redhat.com>
* linespec.c (decode_variable, symtab_from_filename): Call

View File

@ -174,8 +174,8 @@ support - typically shared libraries and quirks to procfs/ptrace/...
The Native maintainer works with the Arch and Core maintainers when
resolving more generic problems.
The host maintainer ensures that gdb (including mmalloc) can be built
as a cross debugger on their platform.
The host maintainer ensures that gdb can be built as a cross debugger on
their platform.
AIX Peter Schauer Peter.Schauer@regent.e-technik.tu-muenchen.de
Kevin Buettner kevinb@redhat.com

View File

@ -106,10 +106,6 @@ INCLUDE_CFLAGS = -I$(INCLUDE_DIR)
# Where is the "-liberty" library? Typically in ../libiberty.
LIBIBERTY = ../libiberty/libiberty.a
# Configured by the --with-mmalloc option to configure.
MMALLOC = @MMALLOC@
MMALLOC_CFLAGS = @MMALLOC_CFLAGS@
# Where is the BFD library? Typically in ../bfd.
BFD_DIR = ../bfd
BFD = $(BFD_DIR)/libbfd.a
@ -364,7 +360,7 @@ CXXFLAGS = -g -O
INTERNAL_WARN_CFLAGS = \
$(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
$(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \
$(BFD_CFLAGS) $(INCLUDE_CFLAGS) \
$(INTL_CFLAGS) $(ENABLE_CFLAGS) \
$(GDB_WARN_CFLAGS)
INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
@ -384,19 +380,18 @@ INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_
# Libraries and corresponding dependencies for compiling gdb.
# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
# MMALLOC comes after anything else that might want an allocation function.
# LIBIBERTY appears twice on purpose.
# If you have the Cygnus libraries installed,
# you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS='
INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \
$(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
-lmmalloc -lintl -liberty
-lintl -liberty
CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \
$(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
$(LIBICONV) \
$(MMALLOC) $(LIBIBERTY) $(WIN32LIBS)
$(LIBIBERTY) $(WIN32LIBS)
CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
$(OPCODES) $(MMALLOC) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS)
$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS)
ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
@ -405,7 +400,7 @@ DIST=gdb
LINT=/usr/5bin/lint
LINTFLAGS= $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
$(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \
$(BFD_CFLAGS) $(INCLUDE_CFLAGS) \
$(INTL_CFLAGS)
RUNTEST = `if [ -f $${rootsrc}/../dejagnu/runtest ] ; then \
@ -2134,7 +2129,7 @@ objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_assert_h) \
$(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) $(hashtab_h) \
$(breakpoint_h) $(block_h) $(dictionary_h) $(mmalloc_h)
$(breakpoint_h) $(block_h) $(dictionary_h)
observer.o: observer.c $(defs_h) $(observer_h)
ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \
@ -2467,7 +2462,7 @@ user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \
utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \
$(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \
$(expression_h) $(language_h) $(charset_h) $(annotate_h) \
$(filenames_h) $(inferior_h) $(mmalloc_h)
$(filenames_h) $(inferior_h)
uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \
$(regcache_h) $(gregset_h)
v850ice.o: v850ice.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \

View File

@ -3,6 +3,11 @@
*** Changes since GDB 6.0:
* Removed --with-mmalloc
Support for the mmalloc memory manager has been removed, as it
conflicted with the internal gdb byte cache.
* Changes in AMD64 configurations
The AMD64 target now includes the %cs and %ss registers. As a result

View File

@ -108,15 +108,6 @@
/* Define if you have HPUX threads */
#undef HAVE_HPUX_THREAD_SUPPORT
/* Define if you want to use the memory mapped malloc package (mmalloc). */
#undef USE_MMALLOC
/* Define if the runtime uses a routine from mmalloc before gdb has a chance
to initialize mmalloc, and we want to force checking to be used anyway.
This may cause spurious memory corruption messages if the runtime tries
to explicitly deallocate that memory when gdb calls exit. */
#undef MMCHECK_FORCE
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS

View File

@ -136,15 +136,6 @@
/* Define if you have HPUX threads */
#undef HAVE_HPUX_THREAD_SUPPORT
/* Define if you want to use the memory mapped malloc package (mmalloc). */
#undef USE_MMALLOC
/* Define if the runtime uses a routine from mmalloc before gdb has a chance
to initialize mmalloc, and we want to force checking to be used anyway.
This may cause spurious memory corruption messages if the runtime tries
to explicitly deallocate that memory when gdb calls exit. */
#undef MMCHECK_FORCE
/* Define if <proc_service.h> on solaris uses int instead of
size_t, and assorted other type changes. */
#undef PROC_SERVICE_IS_OLD

View File

@ -7,9 +7,6 @@ NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o linux-proc.o \
LOADLIBES = -ldl -rdynamic
MMALLOC =
MMALLOC_CFLAGS = -DNO_MMALLOC
# doublest.c currently assumes some properties of FP arithmetic
# on the host which require this.
MH_CFLAGS = -mieee

View File

@ -1,8 +1,5 @@
# Host: Intel x86 running DJGPP
# we don't need mmalloc on DJGPP
MH_CFLAGS= -DNO_MMALLOC
MMALLOC=
MMALLOC_CFLAGS=
MH_CFLAGS=
XM_FILE= xm-go32.h

View File

@ -4,6 +4,3 @@ NATDEPFILES= corelow.o core-regset.o fork-child.o i386-interix-nat.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
NAT_FILE= nm-interix.h
XM_FILE= xm-interix.h
# The below may be temporary; mmalloc relies on sbrk() at the moment
MMALLOC=
MMALLOC_CFLAGS=-DNO_MMALLOC

View File

@ -25,14 +25,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
to get the offset in the core file of the register values. */
#define KERNEL_U_ADDR 0x0
/* If you expect to use the mmalloc package to obtain mapped symbol files,
for now you have to specify some parameters that determine how gdb places
the mappings in it's address space. See the comments in map_to_address()
for details. This is expected to only be a short term solution. Yes it
is a kludge.
FIXME: Make this more automatic. */
#define MMAP_BASE_ADDRESS 0x20000000 /* First mapping here */
#define MMAP_INCREMENT 0x01000000 /* Increment to next mapping */
#endif /* #ifndef XM_LINUX_H */

1122
gdb/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1082,26 +1082,6 @@ fi
AC_SUBST(WARN_CFLAGS)
AC_SUBST(WERROR_CFLAGS)
MMALLOC_CFLAGS=
MMALLOC=
AC_SUBST(MMALLOC_CFLAGS)
AC_SUBST(MMALLOC)
AC_ARG_WITH(mmalloc,
[ --with-mmalloc Use memory mapped malloc package],
[case "${withval}" in
yes) want_mmalloc=true ;;
no) want_mmalloc=false;;
*) AC_MSG_ERROR(bad value ${withval} for GDB with-mmalloc option) ;;
esac],[want_mmalloc=false])dnl
if test x$want_mmalloc = xtrue; then
AC_DEFINE(USE_MMALLOC)
AC_DEFINE(MMCHECK_FORCE)
MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
MMALLOC='../mmalloc/libmmalloc.a'
fi
# In the Cygwin environment, we need some additional flags.
AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin,
[AC_EGREP_CPP(lose, [

View File

@ -1,3 +1,8 @@
2004-01-19 Michael Chastain <mec.gnu@mindspring.com>
* gdbint.texinfo: Delete USE_MMALLOC, NO_MMCHECK, MMCHECK_FORCE,
MMAP_BASE_ADDRESS, MMAP_INCREMENT.
2004-01-19 Nick Roberts <nick@nick.uklinux.net>
* gdb.texinfo (GDB/MI Stack Manipulation): Describe extension to

View File

@ -2238,12 +2238,6 @@ This macro is used as the argument to @code{lseek} (or, most commonly,
@code{bfd_seek}). FIXME, should be replaced by SEEK_SET instead,
which is the POSIX equivalent.
@item MMAP_BASE_ADDRESS
When using HAVE_MMAP, the first mapping should go at this address.
@item MMAP_INCREMENT
when using HAVE_MMAP, this is the increment between mappings.
@item NORETURN
If defined, this should be one or more tokens, such as @code{volatile},
that can be used in both the declaration and definition of functions to
@ -2257,37 +2251,6 @@ of functions to indicate that they never return. The default is already
set correctly if compiling with GCC. This will almost never need to be
defined.
@item USE_MMALLOC
@findex mmalloc
@value{GDBN} will use the @code{mmalloc} library for memory allocation
for symbol reading if this symbol is defined. Be careful defining it
since there are systems on which @code{mmalloc} does not work for some
reason. One example is the DECstation, where its RPC library can't
cope with our redefinition of @code{malloc} to call @code{mmalloc}.
When defining @code{USE_MMALLOC}, you will also have to set
@code{MMALLOC} in the Makefile, to point to the @code{mmalloc} library. This
define is set when you configure with @samp{--with-mmalloc}.
@item NO_MMCHECK
@findex mmcheck
Define this if you are using @code{mmalloc}, but don't want the overhead
of checking the heap with @code{mmcheck}. Note that on some systems,
the C runtime makes calls to @code{malloc} prior to calling @code{main}, and if
@code{free} is ever called with these pointers after calling
@code{mmcheck} to enable checking, a memory corruption abort is certain
to occur. These systems can still use @code{mmalloc}, but must define
@code{NO_MMCHECK}.
@item MMCHECK_FORCE
Define this to 1 if the C runtime allocates memory prior to
@code{mmcheck} being called, but that memory is never freed so we don't
have to worry about it triggering a memory corruption abort. The
default is 0, which means that @code{mmcheck} will only install the heap
checking functions if there has not yet been any memory allocation
calls, and if it fails to install the functions, @value{GDBN} will issue a
warning. This is currently defined if you configure using
@samp{--with-mmalloc}.
@item NO_SIGINTERRUPT
@findex siginterrupt
Define this to indicate that @code{siginterrupt} is not available.

View File

@ -10,7 +10,6 @@ commands
return
end
dir @srcdir@/../mmalloc
dir @srcdir@/../libiberty
dir @srcdir@/../bfd
dir @srcdir@

View File

@ -61,10 +61,6 @@
#include <readline/readline.h>
#ifdef USE_MMALLOC
#include "mmalloc.h"
#endif
#ifdef NEED_DECLARATION_MALLOC
extern PTR malloc (); /* OK: PTR */
#endif
@ -98,10 +94,6 @@ static void fputs_maybe_filtered (const char *, struct ui_file *, int);
static void do_my_cleanups (struct cleanup **, struct cleanup *);
#if defined (USE_MMALLOC) && !defined (NO_MMCHECK)
static void malloc_botch (void);
#endif
static void prompt_for_continue (void);
static void set_screen_size (void);
@ -993,8 +985,6 @@ request_quit (int signo)
/* Memory management stuff (malloc friends). */
#if !defined (USE_MMALLOC)
static void *
mmalloc (void *md, size_t size)
{
@ -1022,63 +1012,13 @@ mfree (void *md, void *ptr)
free (ptr); /* NOTE: GDB's only call to free() */
}
#endif /* USE_MMALLOC */
#if !defined (USE_MMALLOC) || defined (NO_MMCHECK)
/* This used to do something interesting with USE_MMALLOC.
* It can be retired any time. -- chastain 2004-01-19. */
void
init_malloc (void *md)
{
}
#else /* Have mmalloc and want corruption checking */
static void
malloc_botch (void)
{
fprintf_unfiltered (gdb_stderr, "Memory corruption\n");
internal_error (__FILE__, __LINE__, "failed internal consistency check");
}
/* Attempt to install hooks in mmalloc/mrealloc/mfree for the heap specified
by MD, to detect memory corruption. Note that MD may be NULL to specify
the default heap that grows via sbrk.
Note that for freshly created regions, we must call mmcheckf prior to any
mallocs in the region. Otherwise, any region which was allocated prior to
installing the checking hooks, which is later reallocated or freed, will
fail the checks! The mmcheck function only allows initial hooks to be
installed before the first mmalloc. However, anytime after we have called
mmcheck the first time to install the checking hooks, we can call it again
to update the function pointer to the memory corruption handler.
Returns zero on failure, non-zero on success. */
#ifndef MMCHECK_FORCE
#define MMCHECK_FORCE 0
#endif
void
init_malloc (void *md)
{
if (!mmcheckf (md, malloc_botch, MMCHECK_FORCE))
{
/* Don't use warning(), which relies on current_target being set
to something other than dummy_target, until after
initialize_all_files(). */
fprintf_unfiltered
(gdb_stderr,
"warning: failed to install memory consistency checks; ");
fprintf_unfiltered (gdb_stderr,
"configuration should define NO_MMCHECK or MMCHECK_FORCE\n");
}
mmtrace ();
}
#endif /* Have mmalloc and want corruption checking */
/* Called when a memory allocation fails, with the number of bytes of
memory requested in SIZE. */