patches/gdb/6.3/600-debian_10.selected-frame.patch
changeset 96 aa1a9fbd6eb8
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/gdb/6.3/600-debian_10.selected-frame.patch	Thu May 17 16:22:51 2007 +0000
     1.3 @@ -0,0 +1,552 @@
     1.4 +2004-10-11
     1.5 +
     1.6 +This patch is not submitted.  Many of these functions should be passing
     1.7 +a frame around rather than calling get_selected_frame, but at least it
     1.8 +is an improvement over deprecated_selected_frame.
     1.9 +
    1.10 +Index: gdb-6.3/gdb/breakpoint.c
    1.11 +===================================================================
    1.12 +--- gdb-6.3.orig/gdb/breakpoint.c	2004-10-08 13:30:46.000000000 -0400
    1.13 ++++ gdb-6.3/gdb/breakpoint.c	2004-11-09 22:55:11.231620957 -0500
    1.14 +@@ -922,7 +922,7 @@ insert_bp_location (struct bp_location *
    1.15 +       /* FIXME drow/2003-09-09: It would be nice if evaluate_expression
    1.16 + 	 took a frame parameter, so that we didn't have to change the
    1.17 + 	 selected frame.  */
    1.18 +-      saved_frame_id = get_frame_id (deprecated_selected_frame);
    1.19 ++      saved_frame_id = get_frame_id (get_selected_frame ());
    1.20 + 
    1.21 +       /* Determine if the watchpoint is within scope.  */
    1.22 +       if (bpt->owner->exp_valid_block == NULL)
    1.23 +@@ -5464,14 +5464,9 @@ break_at_finish_at_depth_command_1 (char
    1.24 + 
    1.25 +       if (default_breakpoint_valid)
    1.26 + 	{
    1.27 +-	  if (deprecated_selected_frame)
    1.28 +-	    {
    1.29 +-	      selected_pc = get_frame_pc (deprecated_selected_frame);
    1.30 +-	      if (arg)
    1.31 +-		if_arg = 1;
    1.32 +-	    }
    1.33 +-	  else
    1.34 +-	    error ("No selected frame.");
    1.35 ++	  selected_pc = get_frame_pc (get_selected_frame ());
    1.36 ++	  if (arg)
    1.37 ++	    if_arg = 1;
    1.38 + 	}
    1.39 +       else
    1.40 + 	error ("No default breakpoint address now.");
    1.41 +@@ -5542,15 +5537,10 @@ break_at_finish_command_1 (char *arg, in
    1.42 +     {
    1.43 +       if (default_breakpoint_valid)
    1.44 + 	{
    1.45 +-	  if (deprecated_selected_frame)
    1.46 +-	    {
    1.47 +-	      addr_string = xstrprintf ("*0x%s",
    1.48 +-					paddr_nz (get_frame_pc (deprecated_selected_frame)));
    1.49 +-	      if (arg)
    1.50 +-		if_arg = 1;
    1.51 +-	    }
    1.52 +-	  else
    1.53 +-	    error ("No selected frame.");
    1.54 ++	  addr_string = xstrprintf ("*0x%s",
    1.55 ++				    paddr_nz (get_frame_pc (get_selected_frame ())));
    1.56 ++	  if (arg)
    1.57 ++	    if_arg = 1;
    1.58 + 	}
    1.59 +       else
    1.60 + 	error ("No default breakpoint address now.");
    1.61 +@@ -6082,7 +6072,7 @@ until_break_command (char *arg, int from
    1.62 + {
    1.63 +   struct symtabs_and_lines sals;
    1.64 +   struct symtab_and_line sal;
    1.65 +-  struct frame_info *prev_frame = get_prev_frame (deprecated_selected_frame);
    1.66 ++  struct frame_info *prev_frame = get_prev_frame (get_selected_frame ());
    1.67 +   struct breakpoint *breakpoint;
    1.68 +   struct cleanup *old_chain;
    1.69 +   struct continuation_arg *arg1;
    1.70 +@@ -6119,7 +6109,7 @@ until_break_command (char *arg, int from
    1.71 +     /* Otherwise, specify the current frame, because we want to stop only
    1.72 +        at the very same frame.  */
    1.73 +     breakpoint = set_momentary_breakpoint (sal,
    1.74 +-					   get_frame_id (deprecated_selected_frame),
    1.75 ++					   get_frame_id (get_selected_frame ()),
    1.76 + 					   bp_until);
    1.77 + 
    1.78 +   if (!target_can_async_p ())
    1.79 +Index: gdb-6.3/gdb/cli/cli-cmds.c
    1.80 +===================================================================
    1.81 +--- gdb-6.3.orig/gdb/cli/cli-cmds.c	2004-09-11 06:24:53.000000000 -0400
    1.82 ++++ gdb-6.3/gdb/cli/cli-cmds.c	2004-11-09 22:51:07.323246218 -0500
    1.83 +@@ -845,10 +845,7 @@ disassemble_command (char *arg, int from
    1.84 +   name = NULL;
    1.85 +   if (!arg)
    1.86 +     {
    1.87 +-      if (!deprecated_selected_frame)
    1.88 +-	error ("No frame selected.\n");
    1.89 +-
    1.90 +-      pc = get_frame_pc (deprecated_selected_frame);
    1.91 ++      pc = get_frame_pc (get_selected_frame ());
    1.92 +       if (find_pc_partial_function (pc, &name, &low, &high) == 0)
    1.93 + 	error ("No function contains program counter for selected frame.\n");
    1.94 + #if defined(TUI)
    1.95 +Index: gdb-6.3/gdb/f-valprint.c
    1.96 +===================================================================
    1.97 +--- gdb-6.3.orig/gdb/f-valprint.c	2003-10-14 02:51:14.000000000 -0400
    1.98 ++++ gdb-6.3/gdb/f-valprint.c	2004-11-09 22:51:07.326245632 -0500
    1.99 +@@ -76,7 +76,7 @@ f77_get_dynamic_lowerbound (struct type 
   1.100 +   switch (TYPE_ARRAY_LOWER_BOUND_TYPE (type))
   1.101 +     {
   1.102 +     case BOUND_BY_VALUE_ON_STACK:
   1.103 +-      current_frame_addr = get_frame_base (deprecated_selected_frame);
   1.104 ++      current_frame_addr = get_frame_base (get_selected_frame ());
   1.105 +       if (current_frame_addr > 0)
   1.106 + 	{
   1.107 + 	  *lower_bound =
   1.108 +@@ -100,7 +100,7 @@ f77_get_dynamic_lowerbound (struct type 
   1.109 +       break;
   1.110 + 
   1.111 +     case BOUND_BY_REF_ON_STACK:
   1.112 +-      current_frame_addr = get_frame_base (deprecated_selected_frame);
   1.113 ++      current_frame_addr = get_frame_base (get_selected_frame ());
   1.114 +       if (current_frame_addr > 0)
   1.115 + 	{
   1.116 + 	  ptr_to_lower_bound =
   1.117 +@@ -134,7 +134,7 @@ f77_get_dynamic_upperbound (struct type 
   1.118 +   switch (TYPE_ARRAY_UPPER_BOUND_TYPE (type))
   1.119 +     {
   1.120 +     case BOUND_BY_VALUE_ON_STACK:
   1.121 +-      current_frame_addr = get_frame_base (deprecated_selected_frame);
   1.122 ++      current_frame_addr = get_frame_base (get_selected_frame ());
   1.123 +       if (current_frame_addr > 0)
   1.124 + 	{
   1.125 + 	  *upper_bound =
   1.126 +@@ -163,7 +163,7 @@ f77_get_dynamic_upperbound (struct type 
   1.127 +       break;
   1.128 + 
   1.129 +     case BOUND_BY_REF_ON_STACK:
   1.130 +-      current_frame_addr = get_frame_base (deprecated_selected_frame);
   1.131 ++      current_frame_addr = get_frame_base (get_selected_frame ());
   1.132 +       if (current_frame_addr > 0)
   1.133 + 	{
   1.134 + 	  ptr_to_upper_bound =
   1.135 +@@ -630,10 +630,7 @@ info_common_command (char *comname, int 
   1.136 +      first make sure that it is visible and if so, let 
   1.137 +      us display its contents */
   1.138 + 
   1.139 +-  fi = deprecated_selected_frame;
   1.140 +-
   1.141 +-  if (fi == NULL)
   1.142 +-    error ("No frame selected");
   1.143 ++  fi = get_selected_frame ();
   1.144 + 
   1.145 +   /* The following is generally ripped off from stack.c's routine 
   1.146 +      print_frame_info() */
   1.147 +@@ -722,10 +719,7 @@ there_is_a_visible_common_named (char *c
   1.148 +   if (comname == NULL)
   1.149 +     error ("Cannot deal with NULL common name!");
   1.150 + 
   1.151 +-  fi = deprecated_selected_frame;
   1.152 +-
   1.153 +-  if (fi == NULL)
   1.154 +-    error ("No frame selected");
   1.155 ++  fi = get_selected_frame ();
   1.156 + 
   1.157 +   /* The following is generally ripped off from stack.c's routine 
   1.158 +      print_frame_info() */
   1.159 +Index: gdb-6.3/gdb/infcmd.c
   1.160 +===================================================================
   1.161 +--- gdb-6.3.orig/gdb/infcmd.c	2004-09-13 14:26:28.000000000 -0400
   1.162 ++++ gdb-6.3/gdb/infcmd.c	2004-11-09 22:57:37.274099559 -0500
   1.163 +@@ -1214,10 +1214,8 @@ finish_command (char *arg, int from_tty)
   1.164 +     error ("The \"finish\" command does not take any arguments.");
   1.165 +   if (!target_has_execution)
   1.166 +     error ("The program is not running.");
   1.167 +-  if (deprecated_selected_frame == NULL)
   1.168 +-    error ("No selected frame.");
   1.169 + 
   1.170 +-  frame = get_prev_frame (deprecated_selected_frame);
   1.171 ++  frame = get_prev_frame (get_selected_frame ());
   1.172 +   if (frame == 0)
   1.173 +     error ("\"finish\" not meaningful in the outermost frame.");
   1.174 + 
   1.175 +@@ -1235,7 +1233,7 @@ finish_command (char *arg, int from_tty)
   1.176 + 
   1.177 +   /* Find the function we will return from.  */
   1.178 + 
   1.179 +-  function = find_pc_function (get_frame_pc (deprecated_selected_frame));
   1.180 ++  function = find_pc_function (get_frame_pc (get_selected_frame ()));
   1.181 + 
   1.182 +   /* Print info on the selected frame, including level number but not
   1.183 +      source.  */
   1.184 +@@ -1600,13 +1598,11 @@ registers_info (char *addr_exp, int fpre
   1.185 + 
   1.186 +   if (!target_has_registers)
   1.187 +     error ("The program has no registers now.");
   1.188 +-  if (deprecated_selected_frame == NULL)
   1.189 +-    error ("No selected frame.");
   1.190 + 
   1.191 +   if (!addr_exp)
   1.192 +     {
   1.193 +       gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
   1.194 +-				    deprecated_selected_frame, -1, fpregs);
   1.195 ++				    get_selected_frame (), -1, fpregs);
   1.196 +       return;
   1.197 +     }
   1.198 + 
   1.199 +@@ -1644,7 +1640,7 @@ registers_info (char *addr_exp, int fpre
   1.200 + 	if (regnum >= 0)
   1.201 + 	  {
   1.202 + 	    gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
   1.203 +-					  deprecated_selected_frame, regnum, fpregs);
   1.204 ++					  get_selected_frame (), regnum, fpregs);
   1.205 + 	    continue;
   1.206 + 	  }
   1.207 +       }
   1.208 +@@ -1658,7 +1654,7 @@ registers_info (char *addr_exp, int fpre
   1.209 + 	    && regnum < NUM_REGS + NUM_PSEUDO_REGS)
   1.210 + 	  {
   1.211 + 	    gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
   1.212 +-					  deprecated_selected_frame, regnum, fpregs);
   1.213 ++					  get_selected_frame (), regnum, fpregs);
   1.214 + 	    continue;
   1.215 + 	  }
   1.216 +       }
   1.217 +@@ -1684,7 +1680,7 @@ registers_info (char *addr_exp, int fpre
   1.218 + 		if (gdbarch_register_reggroup_p (current_gdbarch, regnum,
   1.219 + 						 group))
   1.220 + 		  gdbarch_print_registers_info (current_gdbarch,
   1.221 +-						gdb_stdout, deprecated_selected_frame,
   1.222 ++						gdb_stdout, get_selected_frame (),
   1.223 + 						regnum, fpregs);
   1.224 + 	      }
   1.225 + 	    continue;
   1.226 +@@ -1714,8 +1710,6 @@ print_vector_info (struct gdbarch *gdbar
   1.227 + {
   1.228 +   if (!target_has_registers)
   1.229 +     error ("The program has no registers now.");
   1.230 +-  if (deprecated_selected_frame == NULL)
   1.231 +-    error ("No selected frame.");
   1.232 + 
   1.233 +   if (gdbarch_print_vector_info_p (gdbarch))
   1.234 +     gdbarch_print_vector_info (gdbarch, file, frame, args);
   1.235 +@@ -1740,7 +1734,7 @@ print_vector_info (struct gdbarch *gdbar
   1.236 + static void
   1.237 + vector_info (char *args, int from_tty)
   1.238 + {
   1.239 +-  print_vector_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);
   1.240 ++  print_vector_info (current_gdbarch, gdb_stdout, get_selected_frame (), args);
   1.241 + }
   1.242 + 
   1.243 + 
   1.244 +@@ -1910,8 +1904,6 @@ print_float_info (struct gdbarch *gdbarc
   1.245 + {
   1.246 +   if (!target_has_registers)
   1.247 +     error ("The program has no registers now.");
   1.248 +-  if (deprecated_selected_frame == NULL)
   1.249 +-    error ("No selected frame.");
   1.250 + 
   1.251 +   if (gdbarch_print_float_info_p (gdbarch))
   1.252 +     gdbarch_print_float_info (gdbarch, file, frame, args);
   1.253 +@@ -1937,7 +1929,7 @@ No floating-point info available for thi
   1.254 + static void
   1.255 + float_info (char *args, int from_tty)
   1.256 + {
   1.257 +-  print_float_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);
   1.258 ++  print_float_info (current_gdbarch, gdb_stdout, get_selected_frame (), args);
   1.259 + }
   1.260 + 
   1.261 + static void
   1.262 +Index: gdb-6.3/gdb/inflow.c
   1.263 +===================================================================
   1.264 +--- gdb-6.3.orig/gdb/inflow.c	2004-08-11 05:00:57.000000000 -0400
   1.265 ++++ gdb-6.3/gdb/inflow.c	2004-11-09 22:58:37.488338883 -0500
   1.266 +@@ -591,10 +591,7 @@ kill_command (char *arg, int from_tty)
   1.267 +   if (target_has_stack)
   1.268 +     {
   1.269 +       printf_filtered ("In %s,\n", target_longname);
   1.270 +-      if (deprecated_selected_frame == NULL)
   1.271 +-	fputs_filtered ("No selected stack frame.\n", gdb_stdout);
   1.272 +-      else
   1.273 +-	print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
   1.274 ++      print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
   1.275 +     }
   1.276 +   bfd_cache_close_all ();
   1.277 + }
   1.278 +Index: gdb-6.3/gdb/infrun.c
   1.279 +===================================================================
   1.280 +--- gdb-6.3.orig/gdb/infrun.c	2004-09-27 13:58:08.000000000 -0400
   1.281 ++++ gdb-6.3/gdb/infrun.c	2004-11-09 22:51:07.351240752 -0500
   1.282 +@@ -3485,7 +3485,7 @@ save_inferior_status (int restore_stack_
   1.283 + 
   1.284 +   inf_status->registers = regcache_dup (current_regcache);
   1.285 + 
   1.286 +-  inf_status->selected_frame_id = get_frame_id (deprecated_selected_frame);
   1.287 ++  inf_status->selected_frame_id = get_frame_id (get_selected_frame ());
   1.288 +   return inf_status;
   1.289 + }
   1.290 + 
   1.291 +Index: gdb-6.3/gdb/mi/mi-main.c
   1.292 +===================================================================
   1.293 +--- gdb-6.3.orig/gdb/mi/mi-main.c	2004-09-12 11:00:42.000000000 -0400
   1.294 ++++ gdb-6.3/gdb/mi/mi-main.c	2004-11-09 22:53:29.998389013 -0500
   1.295 +@@ -388,7 +388,7 @@ register_changed_p (int regnum)
   1.296 + {
   1.297 +   char raw_buffer[MAX_REGISTER_SIZE];
   1.298 + 
   1.299 +-  if (! frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
   1.300 ++  if (! frame_register_read (get_selected_frame (), regnum, raw_buffer))
   1.301 +     return -1;
   1.302 + 
   1.303 +   if (memcmp (&old_regs[DEPRECATED_REGISTER_BYTE (regnum)], raw_buffer,
   1.304 +@@ -509,7 +509,7 @@ get_register (int regnum, int format)
   1.305 +   if (format == 'N')
   1.306 +     format = 0;
   1.307 + 
   1.308 +-  frame_register (deprecated_selected_frame, regnum, &optim, &lval, &addr,
   1.309 ++  frame_register (get_selected_frame (), regnum, &optim, &lval, &addr,
   1.310 + 		  &realnum, buffer);
   1.311 + 
   1.312 +   if (optim)
   1.313 +Index: gdb-6.3/gdb/mn10300-tdep.c
   1.314 +===================================================================
   1.315 +--- gdb-6.3.orig/gdb/mn10300-tdep.c	2004-08-02 22:02:22.000000000 -0400
   1.316 ++++ gdb-6.3/gdb/mn10300-tdep.c	2004-11-09 22:51:07.356239776 -0500
   1.317 +@@ -1154,7 +1154,7 @@ mn10300_print_register (const char *name
   1.318 +     printf_filtered ("%s: ", name);
   1.319 + 
   1.320 +   /* Get the data */
   1.321 +-  if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
   1.322 ++  if (!frame_register_read (get_selected_frame (), regnum, raw_buffer))
   1.323 +     {
   1.324 +       printf_filtered ("[invalid]");
   1.325 +       return;
   1.326 +Index: gdb-6.3/gdb/stack.c
   1.327 +===================================================================
   1.328 +--- gdb-6.3.orig/gdb/stack.c	2004-08-02 20:57:26.000000000 -0400
   1.329 ++++ gdb-6.3/gdb/stack.c	2004-11-09 22:51:07.361238800 -0500
   1.330 +@@ -758,9 +758,7 @@ parse_frame_specification (char *frame_e
   1.331 +   switch (numargs)
   1.332 +     {
   1.333 +     case 0:
   1.334 +-      if (deprecated_selected_frame == NULL)
   1.335 +-	error ("No selected frame.");
   1.336 +-      return deprecated_selected_frame;
   1.337 ++      return get_selected_frame ();
   1.338 +       /* NOTREACHED */
   1.339 +     case 1:
   1.340 +       {
   1.341 +@@ -902,10 +900,10 @@ frame_info (char *addr_exp, int from_tty
   1.342 +     }
   1.343 +   calling_frame_info = get_prev_frame (fi);
   1.344 + 
   1.345 +-  if (!addr_exp && frame_relative_level (deprecated_selected_frame) >= 0)
   1.346 ++  if (!addr_exp && frame_relative_level (get_selected_frame ()) >= 0)
   1.347 +     {
   1.348 +       printf_filtered ("Stack level %d, frame at ",
   1.349 +-		       frame_relative_level (deprecated_selected_frame));
   1.350 ++		       frame_relative_level (get_selected_frame ()));
   1.351 +       print_address_numeric (get_frame_base (fi), 1, gdb_stdout);
   1.352 +       printf_filtered (":\n");
   1.353 +     }
   1.354 +@@ -1445,9 +1443,7 @@ print_frame_label_vars (struct frame_inf
   1.355 + void
   1.356 + locals_info (char *args, int from_tty)
   1.357 + {
   1.358 +-  if (!deprecated_selected_frame)
   1.359 +-    error ("No frame selected.");
   1.360 +-  print_frame_local_vars (deprecated_selected_frame, 0, gdb_stdout);
   1.361 ++  print_frame_local_vars (get_selected_frame (), 0, gdb_stdout);
   1.362 + }
   1.363 + 
   1.364 + static void
   1.365 +@@ -1470,7 +1466,7 @@ catch_info (char *ignore, int from_tty)
   1.366 +       if (!deprecated_selected_frame)
   1.367 + 	error ("No frame selected.");
   1.368 + 
   1.369 +-      print_frame_label_vars (deprecated_selected_frame, 0, gdb_stdout);
   1.370 ++      print_frame_label_vars (get_selected_frame (), 0, gdb_stdout);
   1.371 +     }
   1.372 + }
   1.373 + 
   1.374 +@@ -1537,9 +1533,7 @@ print_frame_arg_vars (struct frame_info 
   1.375 + void
   1.376 + args_info (char *ignore, int from_tty)
   1.377 + {
   1.378 +-  if (!deprecated_selected_frame)
   1.379 +-    error ("No frame selected.");
   1.380 +-  print_frame_arg_vars (deprecated_selected_frame, gdb_stdout);
   1.381 ++  print_frame_arg_vars (get_selected_frame (), gdb_stdout);
   1.382 + }
   1.383 + 
   1.384 + 
   1.385 +@@ -1724,7 +1718,7 @@ down_silently_base (char *count_exp)
   1.386 +   if (target_has_stack == 0 || deprecated_selected_frame == 0)
   1.387 +     error ("No stack.");
   1.388 + 
   1.389 +-  frame = find_relative_frame (deprecated_selected_frame, &count1);
   1.390 ++  frame = find_relative_frame (get_selected_frame (), &count1);
   1.391 +   if (count1 != 0 && count_exp == 0)
   1.392 +     {
   1.393 + 
   1.394 +@@ -1944,7 +1938,7 @@ func_command (char *arg, int from_tty)
   1.395 + 
   1.396 +   if (!found)
   1.397 +     printf_filtered ("'%s' not within current stack frame.\n", arg);
   1.398 +-  else if (fp != deprecated_selected_frame)
   1.399 ++  else if (fp != get_selected_frame ())
   1.400 +     select_and_print_frame (fp);
   1.401 + }
   1.402 + 
   1.403 +@@ -1965,7 +1959,7 @@ get_frame_language (void)
   1.404 +          instruction of another function.  So we rely on
   1.405 +          get_frame_address_in_block(), it provides us with a PC which is
   1.406 +          guaranteed to be inside the frame's code block.  */
   1.407 +-      s = find_pc_symtab (get_frame_address_in_block (deprecated_selected_frame));
   1.408 ++      s = find_pc_symtab (get_frame_address_in_block (get_selected_frame ()));
   1.409 +       if (s)
   1.410 + 	flang = s->language;
   1.411 +       else
   1.412 +Index: gdb-6.3/gdb/tui/tui-disasm.c
   1.413 +===================================================================
   1.414 +--- gdb-6.3.orig/gdb/tui/tui-disasm.c	2004-02-24 20:10:01.000000000 -0500
   1.415 ++++ gdb-6.3/gdb/tui/tui-disasm.c	2004-11-09 22:51:07.370237044 -0500
   1.416 +@@ -382,7 +382,7 @@ tui_vertical_disassem_scroll (enum tui_s
   1.417 + 
   1.418 +       content = (tui_win_content) TUI_DISASM_WIN->generic.content;
   1.419 +       if (cursal.symtab == (struct symtab *) NULL)
   1.420 +-	s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
   1.421 ++	s = find_pc_symtab (get_frame_pc (get_selected_frame ()));
   1.422 +       else
   1.423 + 	s = cursal.symtab;
   1.424 + 
   1.425 +Index: gdb-6.3/gdb/tui/tui-source.c
   1.426 +===================================================================
   1.427 +--- gdb-6.3.orig/gdb/tui/tui-source.c	2004-02-16 16:05:09.000000000 -0500
   1.428 ++++ gdb-6.3/gdb/tui/tui-source.c	2004-11-09 22:51:07.370237044 -0500
   1.429 +@@ -326,7 +326,7 @@ tui_vertical_source_scroll (enum tui_scr
   1.430 +       struct symtab_and_line cursal = get_current_source_symtab_and_line ();
   1.431 + 
   1.432 +       if (cursal.symtab == (struct symtab *) NULL)
   1.433 +-	s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
   1.434 ++	s = find_pc_symtab (get_frame_pc (get_selected_frame ()));
   1.435 +       else
   1.436 + 	s = cursal.symtab;
   1.437 + 
   1.438 +Index: gdb-6.3/gdb/tui/tui-winsource.c
   1.439 +===================================================================
   1.440 +--- gdb-6.3.orig/gdb/tui/tui-winsource.c	2004-02-16 16:05:09.000000000 -0500
   1.441 ++++ gdb-6.3/gdb/tui/tui-winsource.c	2004-11-09 22:51:07.371236848 -0500
   1.442 +@@ -311,7 +311,7 @@ tui_horizontal_source_scroll (struct tui
   1.443 +       struct symtab_and_line cursal = get_current_source_symtab_and_line ();
   1.444 + 
   1.445 +       if (cursal.symtab == (struct symtab *) NULL)
   1.446 +-	s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
   1.447 ++	s = find_pc_symtab (get_frame_pc (get_selected_frame ()));
   1.448 +       else
   1.449 + 	s = cursal.symtab;
   1.450 + 
   1.451 +Index: gdb-6.3/gdb/valops.c
   1.452 +===================================================================
   1.453 +--- gdb-6.3.orig/gdb/valops.c	2004-09-13 23:01:48.000000000 -0400
   1.454 ++++ gdb-6.3/gdb/valops.c	2004-11-09 22:51:07.374236263 -0500
   1.455 +@@ -2663,15 +2663,10 @@ value_of_local (const char *name, int co
   1.456 +   struct block *b;
   1.457 +   struct value * ret;
   1.458 + 
   1.459 +-  if (deprecated_selected_frame == 0)
   1.460 +-    {
   1.461 +-      if (complain)
   1.462 +-	error ("no frame selected");
   1.463 +-      else
   1.464 +-	return 0;
   1.465 +-    }
   1.466 ++  if (!complain && deprecated_selected_frame == 0)
   1.467 ++    return 0;
   1.468 + 
   1.469 +-  func = get_frame_function (deprecated_selected_frame);
   1.470 ++  func = get_frame_function (get_selected_frame ());
   1.471 +   if (!func)
   1.472 +     {
   1.473 +       if (complain)
   1.474 +@@ -2700,7 +2695,7 @@ value_of_local (const char *name, int co
   1.475 + 	return NULL;
   1.476 +     }
   1.477 + 
   1.478 +-  ret = read_var_value (sym, deprecated_selected_frame);
   1.479 ++  ret = read_var_value (sym, get_selected_frame ());
   1.480 +   if (ret == 0 && complain)
   1.481 +     error ("`%s' argument unreadable", name);
   1.482 +   return ret;
   1.483 +Index: gdb-6.3/gdb/varobj.c
   1.484 +===================================================================
   1.485 +--- gdb-6.3.orig/gdb/varobj.c	2004-07-26 10:53:06.000000000 -0400
   1.486 ++++ gdb-6.3/gdb/varobj.c	2004-11-09 22:51:07.377235677 -0500
   1.487 +@@ -488,7 +488,7 @@ varobj_create (char *objname,
   1.488 +       if (fi != NULL)
   1.489 + 	{
   1.490 + 	  var->root->frame = get_frame_id (fi);
   1.491 +-	  old_fi = deprecated_selected_frame;
   1.492 ++	  old_fi = get_selected_frame ();
   1.493 + 	  select_frame (fi);
   1.494 + 	}
   1.495 + 
   1.496 +Index: gdb-6.3/gdb/testsuite/gdb.base/default.exp
   1.497 +===================================================================
   1.498 +--- gdb-6.3.orig/gdb/testsuite/gdb.base/default.exp	2003-03-20 09:45:50.000000000 -0500
   1.499 ++++ gdb-6.3/gdb/testsuite/gdb.base/default.exp	2004-11-09 22:51:07.379235287 -0500
   1.500 +@@ -167,7 +167,7 @@ gdb_test "disable breakpoints" "" "disab
   1.501 + #test disable display
   1.502 + gdb_test "disable display" "" "disable display"
   1.503 + #test disassemble
   1.504 +-gdb_test "disassemble" "No frame selected." "disassemble"
   1.505 ++gdb_test "disassemble" "No (frame selected|registers)." "disassemble"
   1.506 + #test display
   1.507 + gdb_test "display" "" "display"
   1.508 + #test do
   1.509 +@@ -229,9 +229,9 @@ gdb_expect {
   1.510 + }
   1.511 + 
   1.512 + #test frame "f" abbreviation
   1.513 +-gdb_test "f" "No stack." "frame \"f\" abbreviation"
   1.514 ++gdb_test "f" "No (stack|registers)." "frame \"f\" abbreviation"
   1.515 + #test frame
   1.516 +-gdb_test "frame" "No stack." "frame"
   1.517 ++gdb_test "frame" "No (stack|registers)." "frame"
   1.518 + #test fg
   1.519 + gdb_test "fg" "The program is not being run." "fg"
   1.520 + # FIXME: fg kills the udi connection
   1.521 +@@ -294,9 +294,9 @@ gdb_test "ignore" "Argument required .a 
   1.522 + #test info address
   1.523 + gdb_test "info address" "Argument required." "info address"
   1.524 + #test info all-registers
   1.525 +-gdb_test "info all-registers" "The program has no registers now." "info all-registers"
   1.526 ++gdb_test "info all-registers" "(The program has no registers now|No registers)." "info all-registers"
   1.527 + #test info args
   1.528 +-gdb_test "info args" "No frame selected." "info args"
   1.529 ++gdb_test "info args" "No (frame selected|registers)." "info args"
   1.530 + #test info bogus-gdb-command
   1.531 + gdb_test "info bogus-gdb-command" "Undefined info command: \"bogus-gdb-command\".  Try \"help info\".*" "info bogus-gdb-command"
   1.532 + #test info breakpoints
   1.533 +@@ -320,11 +320,11 @@ gdb_test "info frame" "No stack.|No sele
   1.534 + #test info files
   1.535 + gdb_test "info files" "" "info files"
   1.536 + #test info float
   1.537 +-gdb_test "info float" "The program has no registers now." "info float"
   1.538 ++gdb_test "info float" "(The program has no registers now|No registers)." "info float"
   1.539 + #test info functions
   1.540 + gdb_test "info functions" "All defined functions:" "info functions"
   1.541 + #test info locals
   1.542 +-gdb_test "info locals" "No frame selected." "info locals"
   1.543 ++gdb_test "info locals" "(No frame selected|No registers)." "info locals"
   1.544 + #test info program
   1.545 + gdb_test "info program" "The program being debugged is not being run." "info program"
   1.546 + #test info registers
   1.547 +@@ -352,7 +352,7 @@ gdb_test "info types" "All defined types
   1.548 + #test info variables
   1.549 + gdb_test "info variables" "All defined variables:" "info variables"
   1.550 + #test info vector
   1.551 +-gdb_test "info vector" "The program has no registers now." "info vector"
   1.552 ++gdb_test "info vector" "(The program has no registers now|No registers)." "info vector"
   1.553 + #test info warranty
   1.554 + gdb_test "info warranty" "NO WARRANTY(\[^\r\n\]*\[\r\n\])+  *11.  *BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY(\[^\r\n\]*\[\r\n\])+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN(\[^\r\n\]*\[\r\n\])+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES(\[^\r\n\]*\[\r\n\])+PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED(\[^\r\n\]*\[\r\n\])+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF(\[^\r\n\]*\[\r\n\])+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS(\[^\r\n\]*\[\r\n\])+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE(\[^\r\n\]*\[\r\n\])+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,(\[^\r\n\]*\[\r\n\])+REPAIR OR CORRECTION.(\[^\r\n\]*\[\r\n\])+  *12.  *IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING(\[^\r\n\]*\[\r\n\])+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR(\[^\r\n\]*\[\r\n\])+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,(\[^\r\n\]*\[\r\n\])+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING(\[^\r\n\]*\[\r\n\])+OUT OF THE USE OR INABILITY TO USE THE PROGRAM .INCLUDING BUT NOT LIMITED(\[^\r\n\]*\[\r\n\])+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY(\[^\r\n\]*\[\r\n\])+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER(\[^\r\n\]*\[\r\n\])+PROGRAMS., EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE(\[^\r\n\]*\[\r\n\])+POSSIBILITY OF SUCH DAMAGES.*" "info warranty"
   1.555 + #test info watchpoints