This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] s/value_ptr/struct value */ for breakpoint.[hc]
- To: gdb-patches at sources dot redhat dot com
- Subject: [patch] s/value_ptr/struct value */ for breakpoint.[hc]
- From: ac131313 at localhost dot cygnus dot com (Andrew Cagney)
- Date: Sat, 20 Oct 2001 19:52:56 -0400 (EDT)
Following up the last one. This does breakpoint.[hc]
Andrew
2001-10-20 Andrew Cagney <ac131313@redhat.com>
* wrapper.h (struct value): Add opaque declaration. Replace
value_ptr with ``struct value *''.
* wrapper.c: Replace value_ptr with ``struct value *''.
+ * breakpoint.h, breakpoint.c: Ditto.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.54
diff -p -r1.54 breakpoint.c
*** breakpoint.c 2001/10/12 23:51:28 1.54
--- breakpoint.c 2001/10/20 23:50:53
*************** get_number_trailer (char **pp, int trail
*** 377,383 ****
to pass to lookup_internalvar(). */
char *varname;
char *start = ++p;
! value_ptr val;
while (isalnum (*p) || *p == '_')
p++;
--- 377,383 ----
to pass to lookup_internalvar(). */
char *varname;
char *start = ++p;
! struct value *val;
while (isalnum (*p) || *p == '_')
p++;
*************** insert_breakpoints (void)
*** 866,873 ****
{
struct frame_info *saved_frame;
int saved_level, within_current_scope;
! value_ptr mark = value_mark ();
! value_ptr v;
/* Save the current frame and level so we can restore it after
evaluating the watchpoint expression on its own frame. */
--- 866,873 ----
{
struct frame_info *saved_frame;
int saved_level, within_current_scope;
! struct value *mark = value_mark ();
! struct value *v;
/* Save the current frame and level so we can restore it after
evaluating the watchpoint expression on its own frame. */
*************** remove_breakpoint (struct breakpoint *b,
*** 1306,1312 ****
&& b->enable_state == bp_enabled
&& !b->duplicate)
{
! value_ptr v, n;
b->inserted = (is == mark_inserted);
/* Walk down the saved value chain. */
--- 1306,1313 ----
&& b->enable_state == bp_enabled
&& !b->duplicate)
{
! struct value *v;
! struct value *n;
b->inserted = (is == mark_inserted);
/* Walk down the saved value chain. */
*************** bpstat_print (bpstat bs)
*** 2250,2256 ****
static int
breakpoint_cond_eval (PTR exp)
{
! value_ptr mark = value_mark ();
int i = !value_true (evaluate_expression ((struct expression *) exp));
value_free_to_mark (mark);
return i;
--- 2251,2257 ----
static int
breakpoint_cond_eval (PTR exp)
{
! struct value *mark = value_mark ();
int i = !value_true (evaluate_expression ((struct expression *) exp));
value_free_to_mark (mark);
return i;
*************** watchpoint_check (PTR p)
*** 2321,2328 ****
call free_all_values. We can't call free_all_values because
we might be in the middle of evaluating a function call. */
! value_ptr mark = value_mark ();
! value_ptr new_val = evaluate_expression (bs->breakpoint_at->exp);
if (!value_equal (b->val, new_val))
{
release_value (new_val);
--- 2322,2329 ----
call free_all_values. We can't call free_all_values because
we might be in the middle of evaluating a function call. */
! struct value *mark = value_mark ();
! struct value *new_val = evaluate_expression (bs->breakpoint_at->exp);
if (!value_equal (b->val, new_val))
{
release_value (new_val);
*************** bpstat_stop_status (CORE_ADDR *pc, int n
*** 2543,2549 ****
b->type == bp_access_watchpoint)
{
CORE_ADDR addr;
! value_ptr v;
int found = 0;
addr = target_stopped_data_address ();
--- 2544,2550 ----
b->type == bp_access_watchpoint)
{
CORE_ADDR addr;
! struct value *v;
int found = 0;
addr = target_stopped_data_address ();
Index: breakpoint.h
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.h,v
retrieving revision 1.9
diff -p -r1.9 breakpoint.h
*** breakpoint.h 2001/08/02 11:58:29 1.9
--- breakpoint.h 2001/10/20 23:50:53
***************
*** 27,32 ****
--- 27,34 ----
#include "gdb-events.h"
+ struct value;
+
/* This is the maximum number of bytes a breakpoint instruction can take.
Feel free to increase it. It's just used in a few places to size
arrays that should be independent of the target architecture. */
*************** struct breakpoint
*** 249,258 ****
valid anywhere (e.g. consists just of global symbols). */
struct block *exp_valid_block;
/* Value of the watchpoint the last time we checked it. */
! value_ptr val;
/* Holds the value chain for a hardware watchpoint expression. */
! value_ptr val_chain;
/* Holds the address of the related watchpoint_scope breakpoint
when using watchpoints on local variables (might the concept
--- 251,260 ----
valid anywhere (e.g. consists just of global symbols). */
struct block *exp_valid_block;
/* Value of the watchpoint the last time we checked it. */
! struct value *val;
/* Holds the value chain for a hardware watchpoint expression. */
! struct value *val_chain;
/* Holds the address of the related watchpoint_scope breakpoint
when using watchpoints on local variables (might the concept
*************** struct bpstats
*** 479,485 ****
/* Commands left to be done. */
struct command_line *commands;
/* Old value associated with a watchpoint. */
! value_ptr old_val;
/* Nonzero if this breakpoint tells us to print the frame. */
char print;
--- 481,487 ----
/* Commands left to be done. */
struct command_line *commands;
/* Old value associated with a watchpoint. */
! struct value *old_val;
/* Nonzero if this breakpoint tells us to print the frame. */
char print;