From b2c7d45a4c44572a7584b46c96b6bb21057bfeea Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Mon, 12 Nov 2012 21:28:51 +0000 Subject: [PATCH] Document replacement for frame_register_read (deprecated). gdb/ChangeLog: * frame.h (frame_register_read): Remove FIXME comment. * frame.c (frame_register_read): Add suggestion explaining which function to use in place of this one. --- gdb/ChangeLog | 6 ++++++ gdb/frame.c | 3 ++- gdb/frame.h | 12 ------------ 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bd1216ee539..510c0e1e85c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2012-11-12 Joel Brobecker + + * frame.h (frame_register_read): Remove FIXME comment. + * frame.c (frame_register_read): Add suggestion explaining + which function to use in place of this one. + 2012-11-12 Tom Tromey * python/python.c (start_type_printers): Initialize 'result_obj'. diff --git a/gdb/frame.c b/gdb/frame.c index 71f0ba44bbb..52498bad6cf 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1088,7 +1088,8 @@ put_frame_register (struct frame_info *frame, int regnum, } } -/* frame_register_read () +/* This function is deprecated. Use get_frame_register_value instead, + which provides more accurate information. Find and return the value of REGNUM for the specified stack frame. The number of bytes copied is REGISTER_SIZE (REGNUM). diff --git a/gdb/frame.h b/gdb/frame.h index fa80663bd7f..c0559d90dcb 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -673,18 +673,6 @@ extern struct frame_info *block_innermost_frame (const struct block *); extern int deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc); -/* FIXME: cagney/2003-02-02: Should be deprecated or replaced with a - function called get_frame_register_p(). This slightly weird (and - older) variant of get_frame_register() returns zero (indicating the - register value is unavailable/invalid) if either: the register - isn't cached; or the register has been optimized out; or the - register contents are unavailable (because they haven't been - collected in a traceframe). Problem is, neither check is exactly - correct. A register can't be optimized out (it may not have been - saved as part of a function call); The fact that a register isn't - in the register cache doesn't mean that the register isn't - available (it could have been fetched from memory). */ - extern int frame_register_read (struct frame_info *frame, int regnum, gdb_byte *buf); -- 2.30.2