This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFC: Frame cache s not always available.


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]