This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] A selected_frame -> get_selected_frame()
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 29 Nov 2002 15:08:45 -0500
- Subject: [commit] A selected_frame -> get_selected_frame()
Hello,
This patch cleans up some long standing frame manipulation mess:
flush_cached_frames ();
registers_changed ();
stop_pc = read_pc ();
- set_current_frame (create_new_frame (read_fp (), stop_pc));
- select_frame (get_current_frame ());
- print_stack_frame (deprecated_selected_frame, -1, 1);
+ print_stack_frame (get_selected_frame (), -1, 1);
(still need to do something about the stop_pc, but that can come later).
committed,
Andrew
2002-11-29 Andrew Cagney <cagney@redhat.com>
* remote-mips.c (mips_initialize): Force a selected frame rebuild
by calling get_selected_frame.
* ocd.c (ocd_start_remote): Use get_selected frame instead of
set_current_frame, create_new_frame, select_frame and
get_current_frame.
* remote-e7000.c (e7000_start_remote): Ditto.
* remote-mips.c (common_open): Ditto
* remote-rdp.c (remote_rdp_open): Ditto.
Index: ocd.c
===================================================================
RCS file: /cvs/src/src/gdb/ocd.c,v
retrieving revision 1.22
diff -u -r1.22 ocd.c
--- ocd.c 29 Nov 2002 19:15:15 -0000 1.22
+++ ocd.c 29 Nov 2002 19:39:11 -0000
@@ -254,9 +254,7 @@
flush_cached_frames ();
registers_changed ();
stop_pc = read_pc ();
- set_current_frame (create_new_frame (read_fp (), stop_pc));
- select_frame (get_current_frame ());
- print_stack_frame (deprecated_selected_frame, -1, 1);
+ print_stack_frame (get_selected_frame (), -1, 1);
buf[0] = OCD_LOG_FILE;
buf[1] = 3; /* close existing WIGGLERS.LOG */
Index: remote-e7000.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-e7000.c,v
retrieving revision 1.30
diff -u -r1.30 remote-e7000.c
--- remote-e7000.c 29 Nov 2002 19:15:15 -0000 1.30
+++ remote-e7000.c 29 Nov 2002 19:39:12 -0000
@@ -629,9 +629,7 @@
flush_cached_frames ();
registers_changed ();
stop_pc = read_pc ();
- set_current_frame (create_new_frame (read_fp (), stop_pc));
- select_frame (get_current_frame ());
- print_stack_frame (deprecated_selected_frame, -1, 1);
+ print_stack_frame (get_selected_frame (), -1, 1);
return 1;
}
Index: remote-mips.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-mips.c,v
retrieving revision 1.29
diff -u -r1.29 remote-mips.c
--- remote-mips.c 29 Nov 2002 19:15:15 -0000 1.29
+++ remote-mips.c 29 Nov 2002 19:39:13 -0000
@@ -1494,8 +1494,10 @@
the request itself succeeds or fails. */
mips_request ('r', 0, 0, &err, mips_receive_wait, NULL);
- set_current_frame (create_new_frame (read_fp (), read_pc ()));
- select_frame (get_current_frame ());
+ /* FIXME: cagney/2002-11-29: Force the update of selected frame.
+ This shouldn't be necessary, only many many places still refer to
+ selected_frame directly (instead of using get_selected_frame(). */
+ get_selected_frame (); /* Hack!!! */
}
/* Open a connection to the remote board. */
@@ -1612,17 +1614,15 @@
if (ptype)
mips_set_processor_type_command (xstrdup (ptype), 0);
-/* This is really the job of start_remote however, that makes an assumption
- that the target is about to print out a status message of some sort. That
- doesn't happen here (in fact, it may not be possible to get the monitor to
- send the appropriate packet). */
+ /* This is really the job of start_remote however, that makes an
+ assumption that the target is about to print out a status message
+ of some sort. That doesn't happen here (in fact, it may not be
+ possible to get the monitor to send the appropriate packet). */
flush_cached_frames ();
registers_changed ();
stop_pc = read_pc ();
- set_current_frame (create_new_frame (read_fp (), stop_pc));
- select_frame (get_current_frame ());
- print_stack_frame (deprecated_selected_frame, -1, 1);
+ print_stack_frame (get_selected_frame (), -1, 1);
xfree (serial_port_name);
}
Index: remote-rdp.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-rdp.c,v
retrieving revision 1.31
diff -u -r1.31 remote-rdp.c
--- remote-rdp.c 29 Nov 2002 19:15:15 -0000 1.31
+++ remote-rdp.c 29 Nov 2002 19:39:14 -0000
@@ -1163,9 +1163,7 @@
flush_cached_frames ();
registers_changed ();
stop_pc = read_pc ();
- set_current_frame (create_new_frame (read_fp (), stop_pc));
- select_frame (get_current_frame ());
- print_stack_frame (deprecated_selected_frame, -1, 1);
+ print_stack_frame (get_selected_frame (), -1, 1);
}