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: [PATCH] Python API: Add gdb.is_in_prologue and gdb.is_in_epilogue.


Pedro Alves wrote:
> On 10/24/2014 05:57 AM, Doug Evans wrote:
> > If one went that route then I wonder whether we need two API functions.
> > [If we did go with only one function I'd choose a different name than
> > foo_destroyed of course.]
> 
> Do you have a better suggestion for the gdbarch hook?  I think we
> should just rename it for good, avoiding these confusions further.

So if the only use of this interface is to check whether the result of
some other interface (I assume something like Frame.read_var ?) is
reliable, then I guess we might consider moving the check actually
into that other interface.  E.g. have Frame.read_var itself check
in_epilogue and return an unavailable or optimized-out value if
the value would be unreliable otherwise.

This might in the end even push the check into the GDB core itself,
so that we might no longer need the explicit checks in breakpoint.c.
Not sure if that it feasible ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


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