aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2011-11-05 17:08:30 +0000
committerDoug Evans <dje@google.com>2011-11-05 17:08:30 +0000
commite565b8378e354b9c074839d1dd25b0655ee99f2a (patch)
tree5a34b39dc623bddfcd35a2536cd54408b0f23671 /gdb
parenta59306a3dbc3df83bebdac54e52fee9d9cd72ce1 (diff)
downloadgdb-e565b8378e354b9c074839d1dd25b0655ee99f2a.zip
gdb-e565b8378e354b9c074839d1dd25b0655ee99f2a.tar.gz
gdb-e565b8378e354b9c074839d1dd25b0655ee99f2a.tar.bz2
* main.c (captured_main): Set lim_at_start before calling
make_command_stats_cleanup.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/main.c13
2 files changed, 13 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f527f20..b2f84e3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-05 Doug Evans <dje@google.com>
+
+ * main.c (captured_main): Set lim_at_start before calling
+ make_command_stats_cleanup.
+
2011-11-04 Doug Evans <dje@google.com>
* utils.c: #include "timeval-utils.h".
diff --git a/gdb/main.c b/gdb/main.c
index c3816cc..288ec4b 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -300,7 +300,14 @@ captured_main (void *data)
int save_auto_load;
struct objfile *objfile;
- struct cleanup *pre_stat_chain = make_command_stats_cleanup (0);
+ struct cleanup *pre_stat_chain;
+
+#ifdef HAVE_SBRK
+ /* Set this before calling make_command_stats_cleanup. */
+ lim_at_start = (char *) sbrk (0);
+#endif
+
+ pre_stat_chain = make_command_stats_cleanup (0);
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
@@ -311,10 +318,6 @@ captured_main (void *data)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
-#ifdef HAVE_SBRK
- lim_at_start = (char *) sbrk (0);
-#endif
-
cmdsize = 1;
cmdarg = (struct cmdarg *) xmalloc (cmdsize * sizeof (*cmdarg));
ncmd = 0;