Make "bt N" print correct number of frames when using a frame filter
[deliverable/binutils-gdb.git] / gdb / stack.c
index 9993ae654ad592197b96af82a859734b7f4ec868..4481cc4c6a254f340a0e74042e550748279f4282 100644 (file)
@@ -1744,7 +1744,9 @@ backtrace_command_1 (const char *count_exp, int show_locals, int no_filters,
       else
        {
          py_start = 0;
-         py_end = count;
+         /* The argument to apply_ext_lang_frame_filter is the number
+            of the final frame to print, and frames start at 0.  */
+         py_end = count - 1;
        }
     }
   else
@@ -1778,6 +1780,8 @@ backtrace_command_1 (const char *count_exp, int show_locals, int no_filters,
 
       if (show_locals)
        flags |= PRINT_LOCALS;
+      if (from_tty)
+       flags |= PRINT_MORE_FRAMES;
 
       if (!strcmp (print_frame_arguments, "scalars"))
        arg_type = CLI_SCALAR_VALUES;
This page took 0.024198 seconds and 4 git commands to generate.