aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-07-03 20:36:54 +0000
committerAndrew Cagney <cagney@redhat.com>2002-07-03 20:36:54 +0000
commit36160dc4b2bf0b2f8341f8f017ea606adfcac332 (patch)
tree54f3da9959241f17896fa3667cc20097a5915d5f /gdb/infcmd.c
parent4dd79c29b4a65ae1ff861c3e9d42f190f6846770 (diff)
downloadgdb-36160dc4b2bf0b2f8341f8f017ea606adfcac332.zip
gdb-36160dc4b2bf0b2f8341f8f017ea606adfcac332.tar.gz
gdb-36160dc4b2bf0b2f8341f8f017ea606adfcac332.tar.bz2
* infcmd.c (print_return_value): Remove compatibility code calling
deprecated_grub_regcache_for_registers. * values.c: Include "regcache.h". (value_being_returned): Update. Use deprecated_grub_regcache_for_registers to extract the register buffer address. * value.h (value_being_returned): Change ``retbuf'' parameter to a ``struct regcache''. * Makefile.in (values.o): Add dependency on $(regcache_h). * inferior.h (run_stack_dummy): Change type of second parameter to a ``struct regcache''. * valops.c (hand_function_call): Change type of retbuf to ``struct regcache''. Allocate using regcache_xmalloc, clean using make_cleanup_regcache_xfree. * infcmd.c (run_stack_dummy): Update. Use regcache_cpu_no_passthrough instead of memcpy to copy the buffer. * regcache.c (do_regcache_xfree): New function. (make_cleanup_regcache_xfree): New function. * regcache.h (make_cleanup_regcache_xfree): Declare.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index d3949d3..83267ad 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -40,8 +40,7 @@
#include "ui-out.h"
#include "event-top.h"
#include "parser-defs.h"
-
-#include "regcache.h" /* for deprecated_grub_regcache_for_registers(). */
+#include "regcache.h"
/* Functions exported for general use: */
@@ -971,7 +970,7 @@ breakpoint_auto_delete_contents (PTR arg)
will eventually be popped when we do hit the dummy end breakpoint). */
int
-run_stack_dummy (CORE_ADDR addr, char *buffer)
+run_stack_dummy (CORE_ADDR addr, struct regcache *buffer)
{
struct cleanup *old_cleanups = make_cleanup (null_cleanup, 0);
int saved_async = 0;
@@ -1044,9 +1043,7 @@ run_stack_dummy (CORE_ADDR addr, char *buffer)
return 2;
/* On normal return, the stack dummy has been popped already. */
-
- memcpy (buffer, deprecated_grub_regcache_for_registers (stop_registers),
- REGISTER_BYTES);
+ regcache_cpy_no_passthrough (buffer, stop_registers);
return 0;
}
@@ -1146,15 +1143,7 @@ print_return_value (int structure_return, struct type *value_type)
if (!structure_return)
{
-#if 0
value = value_being_returned (value_type, stop_registers, structure_return);
-#else
- /* FIXME: cagney/2002-06-22: Function value_being_returned()
- should take a regcache as a parameter. */
- value = value_being_returned
- (value_type, deprecated_grub_regcache_for_registers (stop_registers),
- structure_return);
-#endif
stb = ui_out_stream_new (uiout);
ui_out_text (uiout, "Value returned is ");
ui_out_field_fmt (uiout, "gdb-result-var", "$%d", record_latest_value (value));
@@ -1175,15 +1164,7 @@ print_return_value (int structure_return, struct type *value_type)
ui_out_text (uiout, ".");
ui_out_text (uiout, " Cannot determine contents\n");
#else
-#if 0
value = value_being_returned (value_type, stop_registers, structure_return);
-#else
- /* FIXME: cagney/2002-06-22: Function value_being_returned()
- should take a regcache as a parameter. */
- value = value_being_returned
- (value_type, deprecated_grub_regcache_for_registers (stop_registers),
- structure_return);
-#endif
stb = ui_out_stream_new (uiout);
ui_out_text (uiout, "Value returned is ");
ui_out_field_fmt (uiout, "gdb-result-var", "$%d", record_latest_value (value));