This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [RFA] backtrace in mixed language applications


On Wed, Aug 15, 2007 at 12:18:34PM -0700, Joel Brobecker wrote:
> I think this opens the chance for the debugger to change the selected
> frame if something goes wrong (or the user presses controlC), which is an
> unexpected side-effect.

Correct.  If you have to switch the global selected frame, please use
a cleanup.  It's better to pass the selected frame explicitly where
possible, but it may not be practical depending what is checking the
language.

> Also, I'm thinking this is the wrong place for doing this frame switch.
> How about doing it inside print_frame? I think this would make sure
> we cover all the cases where we print a frame, such as after an "up",
> "down", or a "frame" command. And I think the frame selection needs
> to be protected against error raising.
> 
> What do others think?

Yes, I agree.  If we really need to change the selected frame to print
a frame correctly, then let's do it lower down (or document/assert
the requirement).

-- 
Daniel Jacobowitz
CodeSourcery


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