aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-06-02 16:02:59 +0000
committerRichard Henderson <rth@redhat.com>2003-06-02 16:02:59 +0000
commit6dd77b815f4252948dae6b0a7e467789b09c6bbb (patch)
tree2776aa7f0c3036e5f302fffd78f1dc1c6b457026 /gdb/main.c
parentf6347e16334910d73f974b8b35092a979ddabb04 (diff)
downloadgdb-6dd77b815f4252948dae6b0a7e467789b09c6bbb.zip
gdb-6dd77b815f4252948dae6b0a7e467789b09c6bbb.tar.gz
gdb-6dd77b815f4252948dae6b0a7e467789b09c6bbb.tar.bz2
* top.h (lim_at_start): Declare.
* main.c (captured_main): Set it. * top.c (lim_at_start): Define. (command_loop): Use it instead of &environ. * event-top.c (command_handler): Likewise. * gdb.base/selftest.exp: Next over lim_at_start initialization.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/main.c b/gdb/main.c
index fd25750..240aa00 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -168,6 +168,10 @@ captured_main (void *data)
/* This needs to happen before the first use of malloc. */
init_malloc (NULL);
+#ifdef HAVE_SBRK
+ lim_at_start = (char *) sbrk (0);
+#endif
+
#if defined (ALIGN_STACK_ON_STARTUP)
i = (int) &count & 0x3;
if (i != 0)