diff options
author | Doug Evans <dje@google.com> | 2011-11-05 17:08:29 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2011-11-05 17:08:29 +0000 |
commit | a9ef6cf52c9a7dde7adbe8bb948281374e5775ac (patch) | |
tree | 20233c2be9619a1aecca4174769a2aac81707528 /gdb/main.c | |
parent | 5d8be5d03609785af475d20862308b4a1b4747f1 (diff) | |
download | gdb-a9ef6cf52c9a7dde7adbe8bb948281374e5775ac.tar.gz |
* main.c (captured_main): Set lim_at_start before calling
make_command_stats_cleanup.
Diffstat (limited to 'gdb/main.c')
-rw-r--r-- | gdb/main.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gdb/main.c b/gdb/main.c index c3816ccde95..288ec4b1f19 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; |