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 1/2] mips: Switch inferior function calls to ON_STACK method.


>>>>> "Maciej" == Maciej W Rozycki <macro@codesourcery.com> writes:

Maciej>  It would make sense IMHO though if GDB was capable to catch that 
Maciej> exception and report that the function returned with such rather than 
Maciej> normally (if it already does not, that is -- I don't deal with C++ or 
Maciej> other code using exceptions much, so I don't know).

GDB tries, see "help show unwind-on-terminating-exception".

The problem here is that gdb doesn't try to modify the unwind data when
making an inferior call.  So, if the inferior call reuses memory covered
by the unwind data, then the unwinder will go ahead and try to use this
data, resulting in weird behavior.

It is probably possible to fix the problem other ways, but ON_STACK is
pretty simple in comparison to modifying the unwind data or hooking into
the unwinder.

Tom


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