Shorten long lines in linux-aarch64-low.c
[deliverable/binutils-gdb.git] / gdb / stack.c
index 31a723d71c053801d129fad5b3ce4c76290eb834..e6156a7648f759f942d3f40c7ba145320259f985 100644 (file)
@@ -318,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)
     {
@@ -344,11 +344,11 @@ 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)
        {
-         val_error = alloca (strlen (except.message) + 1);
+         val_error = (char *) alloca (strlen (except.message) + 1);
          strcpy (val_error, except.message);
        }
       END_CATCH
@@ -471,11 +471,11 @@ 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)
            {
-             val_error = alloca (strlen (except.message) + 1);
+             val_error = (char *) alloca (strlen (except.message) + 1);
              strcpy (val_error, except.message);
            }
          END_CATCH
@@ -1915,7 +1915,7 @@ backtrace_command (char *arg, int from_tty)
        {
          if (arglen > 0)
            {
-             arg = xmalloc (arglen + 1);
+             arg = (char *) xmalloc (arglen + 1);
              make_cleanup (xfree, arg);
              arg[0] = 0;
              for (i = 0; i < argc; i++)
@@ -2059,7 +2059,8 @@ do_print_variable_and_value (const char *print_name,
                             struct symbol *sym,
                             void *cb_data)
 {
-  struct print_variable_and_value_data *p = cb_data;
+  struct print_variable_and_value_data *p
+    = (struct print_variable_and_value_data *) cb_data;
   struct frame_info *frame;
 
   frame = frame_find_by_id (p->frame_id);
@@ -2424,7 +2425,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)
@@ -2523,8 +2524,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++)
     {
@@ -2559,48 +2559,6 @@ func_command (char *arg, int from_tty)
   else if (frame != get_selected_frame (NULL))
     select_and_print_frame (frame);
 }
-
-/* Gets the language of FRAME.  */
-
-enum language
-get_frame_language (struct frame_info *frame)
-{
-  CORE_ADDR pc = 0;
-  int pc_p = 0;
-
-  gdb_assert (frame!= NULL);
-
-    /* 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.024801 seconds and 4 git commands to generate.