public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb: remove some unnecessary frame_info_ptr resets
@ 2024-01-31 15:54 Simon Marchi
  2024-01-31 20:42 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2024-01-31 15:54 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

This code was probably needed before we had reinflatable
frame_info_ptrs, it's not necessary anymore.

Change-Id: I5474c6081ee1e39624c9266b05dbe01351a130b5
---
 gdb/arm-linux-tdep.c | 3 ---
 gdb/elfread.c        | 2 --
 gdb/infcall.c        | 3 ---
 gdb/infcmd.c         | 3 ---
 gdb/infrun.c         | 3 ---
 gdb/stack.c          | 3 ---
 6 files changed, 17 deletions(-)

diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 97debab81d6f..b559de0fb2d6 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -1047,9 +1047,6 @@ arm_linux_copy_svc (struct gdbarch *gdbarch, struct regcache *regs,
 	    = set_momentary_breakpoint (gdbarch, sal, get_frame_id (frame),
 					bp_step_resume).release ();
 
-	  /* set_momentary_breakpoint invalidates FRAME.  */
-	  frame = NULL;
-
 	  /* We need to make sure we actually insert the momentary
 	     breakpoint set above.  */
 	  insert_breakpoints ();
diff --git a/gdb/elfread.c b/gdb/elfread.c
index eca27008678e..e8a0c4d7a2cf 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -989,8 +989,6 @@ elf_gnu_ifunc_resolver_stop (code_breakpoint *b)
 				    prev_frame_id,
 				    bp_gnu_ifunc_resolver_return).release ();
 
-      /* set_momentary_breakpoint invalidates PREV_FRAME.  */
-      prev_frame = NULL;
 
       /* Add new b_return to the ring list b->related_breakpoint.  */
       gdb_assert (b_return->related_breakpoint == b_return);
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 4079f9e7cab0..145ce25b0d1b 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -1300,9 +1300,6 @@ call_function_by_hand_dummy (struct value *function,
       = set_momentary_breakpoint (gdbarch, sal,
 				  dummy_id, bp_call_dummy).release ();
 
-    /* set_momentary_breakpoint invalidates FRAME.  */
-    frame = NULL;
-
     bpt->disposition = disp_del;
     gdb_assert (bpt->related_breakpoint == bpt);
 
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 5e5f75021f20..54063b37beb8 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1757,9 +1757,6 @@ finish_forward (struct finish_command_fsm *sm, frame_info_ptr frame)
 					     get_stack_frame_id (frame),
 					     bp_finish);
 
-  /* set_momentary_breakpoint invalidates FRAME.  */
-  frame = nullptr;
-
   set_longjmp_breakpoint (tp, frame_id);
 
   /* We want to print return value, please...  */
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 8ccaf3326dc6..87965fb12742 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -8848,9 +8848,6 @@ insert_exception_resume_breakpoint (struct thread_info *tp,
 					       handler,
 					       bp_exception_resume).release ();
 
-	  /* set_momentary_breakpoint_at_pc invalidates FRAME.  */
-	  frame = nullptr;
-
 	  tp->control.exception_resume_breakpoint = bp;
 	}
     }
diff --git a/gdb/stack.c b/gdb/stack.c
index bf3158393efa..e44424282855 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -2307,9 +2307,6 @@ print_variable_and_value_data::operator() (const char *print_name,
 
   print_variable_and_value (print_name, sym, frame, stream, num_tabs);
 
-  /* print_variable_and_value invalidates FRAME.  */
-  frame = NULL;
-
   values_printed = 1;
 }
 

base-commit: 249e54204b13f9acdd5fbca355fed305e8595f31
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb: remove some unnecessary frame_info_ptr resets
  2024-01-31 15:54 [PATCH] gdb: remove some unnecessary frame_info_ptr resets Simon Marchi
@ 2024-01-31 20:42 ` Tom Tromey
  2024-01-31 21:20   ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2024-01-31 20:42 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:

Simon> This code was probably needed before we had reinflatable
Simon> frame_info_ptrs, it's not necessary anymore.

Thank you.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb: remove some unnecessary frame_info_ptr resets
  2024-01-31 20:42 ` Tom Tromey
@ 2024-01-31 21:20   ` Simon Marchi
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2024-01-31 21:20 UTC (permalink / raw)
  To: Tom Tromey, Simon Marchi; +Cc: gdb-patches

On 1/31/24 15:42, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
> 
> Simon> This code was probably needed before we had reinflatable
> Simon> frame_info_ptrs, it's not necessary anymore.
> 
> Thank you.
> Approved-By: Tom Tromey <tom@tromey.com>
> 
> Tom

Thanks, pushed.

Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-31 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-31 15:54 [PATCH] gdb: remove some unnecessary frame_info_ptr resets Simon Marchi
2024-01-31 20:42 ` Tom Tromey
2024-01-31 21:20   ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).