summaryrefslogtreecommitdiff
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
commit97cbec2f5740a8182114c5c99f0f700b868d2099 (patch)
tree4f38813abc92f08be353bf930318da24e71137bf /gdb/main.c
parent02a47a2860e5c04123acef234e318dda4370c209 (diff)
downloadgdb-97cbec2f5740a8182114c5c99f0f700b868d2099.tar.gz
* 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 fd25750b94e..240aa00acfd 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)