Fix shared library load in gdb.base/global-var-nested-by-dso.exp.
[deliverable/binutils-gdb.git] / gdb / stack.c
index eea575a851bfae715197288d2084fdcf7d377df2..7d37dd179fad4ba3f57616d49099c69da2f0ec86 100644 (file)
@@ -52,8 +52,6 @@
 #include "symfile.h"
 #include "extension.h"
 
-void (*deprecated_selected_frame_level_changed_hook) (int);
-
 /* The possible choices of "set print frame-arguments", and the value
    of this setting.  */
 
@@ -320,7 +318,7 @@ read_frame_local (struct symbol *sym, struct frame_info *frame,
 
   TRY
     {
-      argp->val = read_var_value (sym, frame);
+      argp->val = read_var_value (sym, NULL, frame);
     }
   CATCH (except, RETURN_MASK_ERROR)
     {
@@ -346,7 +344,7 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame,
     {
       TRY
        {
-         val = read_var_value (sym, frame);
+         val = read_var_value (sym, NULL, frame);
        }
       CATCH (except, RETURN_MASK_ERROR)
        {
@@ -473,7 +471,7 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame,
 
          TRY
            {
-             val = read_var_value (sym, frame);
+             val = read_var_value (sym, NULL, frame);
            }
          CATCH (except, RETURN_MASK_ERROR)
            {
@@ -623,7 +621,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
              struct symbol *nsym;
 
              nsym = lookup_symbol (SYMBOL_LINKAGE_NAME (sym),
-                                   b, VAR_DOMAIN, NULL);
+                                   b, VAR_DOMAIN, NULL).symbol;
              gdb_assert (nsym != NULL);
              if (SYMBOL_CLASS (nsym) == LOC_REGISTER
                  && !SYMBOL_IS_ARGUMENT (nsym))
@@ -2158,7 +2156,7 @@ iterate_over_block_arg_vars (const struct block *b,
             are not combined in symbol-reading.  */
 
          sym2 = lookup_symbol (SYMBOL_LINKAGE_NAME (sym),
-                               b, VAR_DOMAIN, NULL);
+                               b, VAR_DOMAIN, NULL).symbol;
          (*cb) (SYMBOL_PRINT_NAME (sym), sym2, cb_data);
        }
     }
@@ -2417,7 +2415,7 @@ return_command (char *retval_exp, int from_tty)
          return_type = value_type (return_value);
        }
       do_cleanups (old_chain);
-      CHECK_TYPEDEF (return_type);
+      return_type = check_typedef (return_type);
       return_value = value_cast (return_type, return_value);
 
       /* Make sure the value is fully evaluated.  It may live in the
@@ -2426,7 +2424,7 @@ return_command (char *retval_exp, int from_tty)
        value_fetch_lazy (return_value);
 
       if (thisfun != NULL)
-       function = read_var_value (thisfun, thisframe);
+       function = read_var_value (thisfun, NULL, thisframe);
 
       rv_conv = RETURN_VALUE_REGISTER_CONVENTION;
       if (TYPE_CODE (return_type) == TYPE_CODE_VOID)
@@ -2525,8 +2523,7 @@ func_command (char *arg, int from_tty)
   frame = parse_frame_specification ("0");
   sals = decode_line_with_current_source (arg, DECODE_LINE_FUNFIRSTLINE);
   cleanups = make_cleanup (xfree, sals.sals);
-  func_bounds = (struct function_bounds *) xmalloc (
-                             sizeof (struct function_bounds) * sals.nelts);
+  func_bounds = XNEWVEC (struct function_bounds, sals.nelts);
   make_cleanup (xfree, func_bounds);
   for (i = 0; (i < sals.nelts && !found); i++)
     {
@@ -2561,51 +2558,6 @@ func_command (char *arg, int from_tty)
   else if (frame != get_selected_frame (NULL))
     select_and_print_frame (frame);
 }
-
-/* Gets the language of the current frame.  */
-
-enum language
-get_frame_language (void)
-{
-  struct frame_info *frame = deprecated_safe_get_selected_frame ();
-
-  if (frame)
-    {
-      CORE_ADDR pc = 0;
-      int pc_p = 0;
-
-      /* We determine the current frame language by looking up its
-         associated symtab.  To retrieve this symtab, we use the frame
-         PC.  However we cannot use the frame PC as is, because it
-         usually points to the instruction following the "call", which
-         is sometimes the first instruction of another function.  So
-         we rely on get_frame_address_in_block(), it provides us with
-         a PC that is guaranteed to be inside the frame's code
-         block.  */
-
-      TRY
-       {
-         pc = get_frame_address_in_block (frame);
-         pc_p = 1;
-       }
-      CATCH (ex, RETURN_MASK_ERROR)
-       {
-         if (ex.error != NOT_AVAILABLE_ERROR)
-           throw_exception (ex);
-       }
-      END_CATCH
-
-      if (pc_p)
-       {
-         struct compunit_symtab *cust = find_pc_compunit_symtab (pc);
-
-         if (cust != NULL)
-           return compunit_language (cust);
-       }
-    }
-
-  return language_unknown;
-}
 \f
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
This page took 0.02602 seconds and 4 git commands to generate.