This is the mail archive of the gdb@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: What should be used instead of deprecated_read_memory_nobpt()?


On Tue, Nov 29, 2005 at 11:04:27PM +0100, Mark Kettenis wrote:
> > From: Paul Gilliam <pgilliam@us.ibm.com>
> > Date: Tue, 29 Nov 2005 14:01:30 -0800
> > 
> > I need to write an implementation of
> > 'gdbarch_in_function_epilogue_p()'.  In looking for a model to use,
> > I see that 'hppa_in_function_epilogue_p()' and
> > 's390_in_function_epilogue_p()' both use
> > 'deprecated_read_memory_nobpt()' to get instructions from the
> > target, but 'sh_in_function_epilogue_p()' and
> > 'xstormy16_in_function_epilogue_p()' both use
> > 'read_memory_unsigned_integer()' for that purpose.
> > 
> > Can 'read_memory_unsigned_integer()' replace 'deprecated_read_memory_nobpt()'?
> 
> Not sure, but read_memory_unsigned_integer() might not be safe,
> because of the possibility of inserted breakpoints.  The safe
> alternative is safe_frame_unwind_memory().  But of course that means
> that in_function_epilogue_p should really be changed such that it
> accepts a `struct frame *' as an argument.

Which would be a good change if we really need this method anyway.
I'm dubious how much good it does...

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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