This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: RFC: Frame cache s not always available.
- To: dan at cgsoftware dot com
- Subject: Re: RFC: Frame cache s not always available.
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 29 Feb 2000 18:01:15 +1100
- CC: Fernando Nasser <fnasser at redhat dot com>, gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <38B40EB5.E9503E1C@redhat.com> <bt57svje.fsf@dan.resnet.rochester.edu>
Daniel Berlin wrote:
>
> >>>>> "FN" == Fernando Nasser <fnasser@redhat.com> writes:
>
> FN> considered valid. For some oversighting, or maybe because it is
> FN> gradually being implemented, gdb only tests for the return value of
> FN> get_current_frame() in one place and assumes in several places that
> FN> selected_frame is set.
>
> FN> I found two places that are more troublesome and created the attached
> FN> patch. I did implement the frame invalid situation in the arm target
> FN> (on my sandbox only) and this two changes alone were enough. We may
> FN> found a few others in the future, and the situation were we do not
> FN> have a current or selected frame are not checked in yet, but I believe
> FN> we should make the code more robust and check this patch in anyway.
>
> I've found a few places in the code as well where the frame is invalid
> because we switched threads.
> I had to manually force gdb to reinit the frame cache, or else we wouldn't
> have the right frames.
>
> However, i believe this may be a side effect of the way the beos port is
> done, so i have them #ifdef'd for BEOS.
> Just wanted to throw this out in case someone was working with threads and
> saw incorrect stack backtraces.
> --Dan
I'd suspect that it was a bug.
Must likely the reason it hasn't been noticed is that BE goes places
where other OS's fear to tread :-)
Andrew