📄 600-debian_10.selected-frame.patch
字号:
2004-10-11This patch is not submitted. Many of these functions should be passinga frame around rather than calling get_selected_frame, but at least itis an improvement over deprecated_selected_frame.Index: gdb-6.3/gdb/breakpoint.c===================================================================--- gdb-6.3.orig/gdb/breakpoint.c 2004-10-08 13:30:46.000000000 -0400+++ gdb-6.3/gdb/breakpoint.c 2004-11-09 22:55:11.231620957 -0500@@ -922,7 +922,7 @@ insert_bp_location (struct bp_location * /* FIXME drow/2003-09-09: It would be nice if evaluate_expression took a frame parameter, so that we didn't have to change the selected frame. */- saved_frame_id = get_frame_id (deprecated_selected_frame);+ saved_frame_id = get_frame_id (get_selected_frame ()); /* Determine if the watchpoint is within scope. */ if (bpt->owner->exp_valid_block == NULL)@@ -5464,14 +5464,9 @@ break_at_finish_at_depth_command_1 (char if (default_breakpoint_valid) {- if (deprecated_selected_frame)- {- selected_pc = get_frame_pc (deprecated_selected_frame);- if (arg)- if_arg = 1;- }- else- error ("No selected frame.");+ selected_pc = get_frame_pc (get_selected_frame ());+ if (arg)+ if_arg = 1; } else error ("No default breakpoint address now.");@@ -5542,15 +5537,10 @@ break_at_finish_command_1 (char *arg, in { if (default_breakpoint_valid) {- if (deprecated_selected_frame)- {- addr_string = xstrprintf ("*0x%s",- paddr_nz (get_frame_pc (deprecated_selected_frame)));- if (arg)- if_arg = 1;- }- else- error ("No selected frame.");+ addr_string = xstrprintf ("*0x%s",+ paddr_nz (get_frame_pc (get_selected_frame ())));+ if (arg)+ if_arg = 1; } else error ("No default breakpoint address now.");@@ -6082,7 +6072,7 @@ until_break_command (char *arg, int from { struct symtabs_and_lines sals; struct symtab_and_line sal;- struct frame_info *prev_frame = get_prev_frame (deprecated_selected_frame);+ struct frame_info *prev_frame = get_prev_frame (get_selected_frame ()); struct breakpoint *breakpoint; struct cleanup *old_chain; struct continuation_arg *arg1;@@ -6119,7 +6109,7 @@ until_break_command (char *arg, int from /* Otherwise, specify the current frame, because we want to stop only at the very same frame. */ breakpoint = set_momentary_breakpoint (sal,- get_frame_id (deprecated_selected_frame),+ get_frame_id (get_selected_frame ()), bp_until); if (!target_can_async_p ())Index: gdb-6.3/gdb/cli/cli-cmds.c===================================================================--- gdb-6.3.orig/gdb/cli/cli-cmds.c 2004-09-11 06:24:53.000000000 -0400+++ gdb-6.3/gdb/cli/cli-cmds.c 2004-11-09 22:51:07.323246218 -0500@@ -845,10 +845,7 @@ disassemble_command (char *arg, int from name = NULL; if (!arg) {- if (!deprecated_selected_frame)- error ("No frame selected.\n");-- pc = get_frame_pc (deprecated_selected_frame);+ pc = get_frame_pc (get_selected_frame ()); if (find_pc_partial_function (pc, &name, &low, &high) == 0) error ("No function contains program counter for selected frame.\n"); #if defined(TUI)Index: gdb-6.3/gdb/f-valprint.c===================================================================--- gdb-6.3.orig/gdb/f-valprint.c 2003-10-14 02:51:14.000000000 -0400+++ gdb-6.3/gdb/f-valprint.c 2004-11-09 22:51:07.326245632 -0500@@ -76,7 +76,7 @@ f77_get_dynamic_lowerbound (struct type switch (TYPE_ARRAY_LOWER_BOUND_TYPE (type)) { case BOUND_BY_VALUE_ON_STACK:- current_frame_addr = get_frame_base (deprecated_selected_frame);+ current_frame_addr = get_frame_base (get_selected_frame ()); if (current_frame_addr > 0) { *lower_bound =@@ -100,7 +100,7 @@ f77_get_dynamic_lowerbound (struct type break; case BOUND_BY_REF_ON_STACK:- current_frame_addr = get_frame_base (deprecated_selected_frame);+ current_frame_addr = get_frame_base (get_selected_frame ()); if (current_frame_addr > 0) { ptr_to_lower_bound =@@ -134,7 +134,7 @@ f77_get_dynamic_upperbound (struct type switch (TYPE_ARRAY_UPPER_BOUND_TYPE (type)) { case BOUND_BY_VALUE_ON_STACK:- current_frame_addr = get_frame_base (deprecated_selected_frame);+ current_frame_addr = get_frame_base (get_selected_frame ()); if (current_frame_addr > 0) { *upper_bound =@@ -163,7 +163,7 @@ f77_get_dynamic_upperbound (struct type break; case BOUND_BY_REF_ON_STACK:- current_frame_addr = get_frame_base (deprecated_selected_frame);+ current_frame_addr = get_frame_base (get_selected_frame ()); if (current_frame_addr > 0) { ptr_to_upper_bound =@@ -630,10 +630,7 @@ info_common_command (char *comname, int first make sure that it is visible and if so, let us display its contents */ - fi = deprecated_selected_frame;-- if (fi == NULL)- error ("No frame selected");+ fi = get_selected_frame (); /* The following is generally ripped off from stack.c's routine print_frame_info() */@@ -722,10 +719,7 @@ there_is_a_visible_common_named (char *c if (comname == NULL) error ("Cannot deal with NULL common name!"); - fi = deprecated_selected_frame;-- if (fi == NULL)- error ("No frame selected");+ fi = get_selected_frame (); /* The following is generally ripped off from stack.c's routine print_frame_info() */Index: gdb-6.3/gdb/infcmd.c===================================================================--- gdb-6.3.orig/gdb/infcmd.c 2004-09-13 14:26:28.000000000 -0400+++ gdb-6.3/gdb/infcmd.c 2004-11-09 22:57:37.274099559 -0500@@ -1214,10 +1214,8 @@ finish_command (char *arg, int from_tty) error ("The \"finish\" command does not take any arguments."); if (!target_has_execution) error ("The program is not running.");- if (deprecated_selected_frame == NULL)- error ("No selected frame."); - frame = get_prev_frame (deprecated_selected_frame);+ frame = get_prev_frame (get_selected_frame ()); if (frame == 0) error ("\"finish\" not meaningful in the outermost frame."); @@ -1235,7 +1233,7 @@ finish_command (char *arg, int from_tty) /* Find the function we will return from. */ - function = find_pc_function (get_frame_pc (deprecated_selected_frame));+ function = find_pc_function (get_frame_pc (get_selected_frame ())); /* Print info on the selected frame, including level number but not source. */@@ -1600,13 +1598,11 @@ registers_info (char *addr_exp, int fpre if (!target_has_registers) error ("The program has no registers now.");- if (deprecated_selected_frame == NULL)- error ("No selected frame."); if (!addr_exp) { gdbarch_print_registers_info (current_gdbarch, gdb_stdout,- deprecated_selected_frame, -1, fpregs);+ get_selected_frame (), -1, fpregs); return; } @@ -1644,7 +1640,7 @@ registers_info (char *addr_exp, int fpre if (regnum >= 0) { gdbarch_print_registers_info (current_gdbarch, gdb_stdout,- deprecated_selected_frame, regnum, fpregs);+ get_selected_frame (), regnum, fpregs); continue; } }@@ -1658,7 +1654,7 @@ registers_info (char *addr_exp, int fpre && regnum < NUM_REGS + NUM_PSEUDO_REGS) { gdbarch_print_registers_info (current_gdbarch, gdb_stdout,- deprecated_selected_frame, regnum, fpregs);+ get_selected_frame (), regnum, fpregs); continue; } }@@ -1684,7 +1680,7 @@ registers_info (char *addr_exp, int fpre if (gdbarch_register_reggroup_p (current_gdbarch, regnum, group)) gdbarch_print_registers_info (current_gdbarch,- gdb_stdout, deprecated_selected_frame,+ gdb_stdout, get_selected_frame (), regnum, fpregs); } continue;@@ -1714,8 +1710,6 @@ print_vector_info (struct gdbarch *gdbar { if (!target_has_registers) error ("The program has no registers now.");- if (deprecated_selected_frame == NULL)- error ("No selected frame."); if (gdbarch_print_vector_info_p (gdbarch)) gdbarch_print_vector_info (gdbarch, file, frame, args);@@ -1740,7 +1734,7 @@ print_vector_info (struct gdbarch *gdbar static void vector_info (char *args, int from_tty) {- print_vector_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);+ print_vector_info (current_gdbarch, gdb_stdout, get_selected_frame (), args); } @@ -1910,8 +1904,6 @@ print_float_info (struct gdbarch *gdbarc { if (!target_has_registers) error ("The program has no registers now.");- if (deprecated_selected_frame == NULL)- error ("No selected frame."); if (gdbarch_print_float_info_p (gdbarch)) gdbarch_print_float_info (gdbarch, file, frame, args);@@ -1937,7 +1929,7 @@ No floating-point info available for thi static void float_info (char *args, int from_tty) {- print_float_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);+ print_float_info (current_gdbarch, gdb_stdout, get_selected_frame (), args); } static voidIndex: gdb-6.3/gdb/inflow.c===================================================================--- gdb-6.3.orig/gdb/inflow.c 2004-08-11 05:00:57.000000000 -0400+++ gdb-6.3/gdb/inflow.c 2004-11-09 22:58:37.488338883 -0500@@ -591,10 +591,7 @@ kill_command (char *arg, int from_tty) if (target_has_stack) { printf_filtered ("In %s,\n", target_longname);- if (deprecated_selected_frame == NULL)- fputs_filtered ("No selected stack frame.\n", gdb_stdout);- else- print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);+ print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC); } bfd_cache_close_all (); }Index: gdb-6.3/gdb/infrun.c===================================================================--- gdb-6.3.orig/gdb/infrun.c 2004-09-27 13:58:08.000000000 -0400
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -