* PATH: reset innermost_block on 'run'
@ 2002-04-11 17:04 Per Bothner
2002-04-11 17:49 ` Michael Snyder
0 siblings, 1 reply; 3+ messages in thread
From: Per Bothner @ 2002-04-11 17:04 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 448 bytes --]
It's been a while since I made this change, but as I recall
without it gdb will tend to crash when you re-start the
inferior using a 'run' command.
Now I don't know exactly the best place to reset the
innermost_block variable, but it *is* a cache variable
that must be reset whenever execution continues, including
on each 'run'.
* infcmd.c (run_command): Reset innermost_block.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
[-- Attachment #2: innermost.patch --]
[-- Type: text/plain, Size: 456 bytes --]
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.43
diff -u -p -r1.43 infcmd.c
--- infcmd.c 28 Mar 2002 01:35:55 -0000 1.43
+++ infcmd.c 11 Apr 2002 23:57:47 -0000
@@ -387,6 +387,8 @@ Start it from the beginning? "))
init_wait_for_inferior ();
}
+ innermost_block = NULL;
+
clear_breakpoint_hit_counts ();
/* Purge old solib objfiles. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATH: reset innermost_block on 'run'
2002-04-11 17:04 PATH: reset innermost_block on 'run' Per Bothner
@ 2002-04-11 17:49 ` Michael Snyder
2002-04-11 17:54 ` Michael Snyder
0 siblings, 1 reply; 3+ messages in thread
From: Michael Snyder @ 2002-04-11 17:49 UTC (permalink / raw)
To: Per Bothner; +Cc: gdb-patches
Per Bothner wrote:
>
> It's been a while since I made this change, but as I recall
> without it gdb will tend to crash when you re-start the
> inferior using a 'run' command.
>
> Now I don't know exactly the best place to reset the
> innermost_block variable, but it *is* a cache variable
> that must be reset whenever execution continues, including
> on each 'run'.
Eeeewww! I believe you're right! ;-(
Thanks for the catch, but I don't believe run_command is the right spot.
If we want to do it whenever execution resumes, then how about putting
it
in resume()?
>
> * infcmd.c (run_command): Reset innermost_block.
> --
> --Per Bothner
> per@bothner.com http://www.bothner.com/per/
>
> ------------------------------------------------------------------------
> Index: infcmd.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/infcmd.c,v
> retrieving revision 1.43
> diff -u -p -r1.43 infcmd.c
> --- infcmd.c 28 Mar 2002 01:35:55 -0000 1.43
> +++ infcmd.c 11 Apr 2002 23:57:47 -0000
> @@ -387,6 +387,8 @@ Start it from the beginning? "))
> init_wait_for_inferior ();
> }
>
> + innermost_block = NULL;
> +
> clear_breakpoint_hit_counts ();
>
> /* Purge old solib objfiles. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATH: reset innermost_block on 'run'
2002-04-11 17:49 ` Michael Snyder
@ 2002-04-11 17:54 ` Michael Snyder
0 siblings, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2002-04-11 17:54 UTC (permalink / raw)
To: Per Bothner, gdb-patches
Michael Snyder wrote:
>
> Per Bothner wrote:
> >
> > It's been a while since I made this change, but as I recall
> > without it gdb will tend to crash when you re-start the
> > inferior using a 'run' command.
> >
> > Now I don't know exactly the best place to reset the
> > innermost_block variable, but it *is* a cache variable
> > that must be reset whenever execution continues, including
> > on each 'run'.
>
> Eeeewww! I believe you're right! ;-(
> Thanks for the catch, but I don't believe run_command is the right spot.
> If we want to do it whenever execution resumes, then how about putting
> it in resume()?
Moreover, there are two global extern declarations for this variable:
one in parser-defs.h, and one in expression.h. Which one should we
eliminate? I think that everything that includes parser-defs.h
also includes expression.h (or should), but not vice versa, so
maybe keep it in expression.h?
>
> >
> > * infcmd.c (run_command): Reset innermost_block.
> > --
> > --Per Bothner
> > per@bothner.com http://www.bothner.com/per/
> >
> > ------------------------------------------------------------------------
> > Index: infcmd.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/infcmd.c,v
> > retrieving revision 1.43
> > diff -u -p -r1.43 infcmd.c
> > --- infcmd.c 28 Mar 2002 01:35:55 -0000 1.43
> > +++ infcmd.c 11 Apr 2002 23:57:47 -0000
> > @@ -387,6 +387,8 @@ Start it from the beginning? "))
> > init_wait_for_inferior ();
> > }
> >
> > + innermost_block = NULL;
> > +
> > clear_breakpoint_hit_counts ();
> >
> > /* Purge old solib objfiles. */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-04-12 0:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-11 17:04 PATH: reset innermost_block on 'run' Per Bothner
2002-04-11 17:49 ` Michael Snyder
2002-04-11 17:54 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox