public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Remove unused parameter in maybe_software_singlestep
@ 2021-06-30 21:30 Lancelot SIX
  2021-07-01 13:12 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Lancelot SIX @ 2021-06-30 21:30 UTC (permalink / raw)
  To: gdb-patches; +Cc: Lancelot SIX

While working around, I noticed that the last parameter of
maybe_software_singlestep is never used.  This path removes
it.

Built on x86_64-linux-gnu and riscv64-linux-gnu.

gdb/ChangeLog:

	* infrun.c (maybe_software_singlestep): Remove unused PC
	parameter.
	(resume_1): Update calls to maybe_software_singlestep.
---
 gdb/infrun.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 9469b74af39..eda713d9fb3 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -89,7 +89,7 @@ static void insert_step_resume_breakpoint_at_caller (struct frame_info *);
 
 static void insert_longjmp_resume_breakpoint (struct gdbarch *, CORE_ADDR);
 
-static bool maybe_software_singlestep (struct gdbarch *gdbarch, CORE_ADDR pc);
+static bool maybe_software_singlestep (struct gdbarch *gdbarch);
 
 static void resume (gdb_signal sig);
 
@@ -2051,11 +2051,10 @@ bool sched_multi = false;
 /* Try to setup for software single stepping over the specified location.
    Return true if target_resume() should use hardware single step.
 
-   GDBARCH the current gdbarch.
-   PC the location to step over.  */
+   GDBARCH the current gdbarch.  */
 
 static bool
-maybe_software_singlestep (struct gdbarch *gdbarch, CORE_ADDR pc)
+maybe_software_singlestep (struct gdbarch *gdbarch)
 {
   bool hw_step = true;
 
@@ -2390,7 +2389,7 @@ resume_1 (enum gdb_signal sig)
 	  set_step_over_info (regcache->aspace (),
 			      regcache_read_pc (regcache), 0, tp->global_num);
 
-	  step = maybe_software_singlestep (gdbarch, pc);
+	  step = maybe_software_singlestep (gdbarch);
 
 	  insert_breakpoints ();
 	}
@@ -2409,7 +2408,7 @@ resume_1 (enum gdb_signal sig)
 
   /* Do we need to do it the hard way, w/temp breakpoints?  */
   else if (step)
-    step = maybe_software_singlestep (gdbarch, pc);
+    step = maybe_software_singlestep (gdbarch);
 
   /* Currently, our software single-step implementation leads to different
      results than hardware single-stepping in one situation: when stepping
-- 
2.31.1


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

* Re: [PATCH] Remove unused parameter in maybe_software_singlestep
  2021-06-30 21:30 [PATCH] Remove unused parameter in maybe_software_singlestep Lancelot SIX
@ 2021-07-01 13:12 ` Tom Tromey
  2021-07-08 23:23   ` Lancelot SIX
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2021-07-01 13:12 UTC (permalink / raw)
  To: Lancelot SIX via Gdb-patches; +Cc: Lancelot SIX

>>>>> "Lancelot" == Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org> writes:

Lancelot> While working around, I noticed that the last parameter of
Lancelot> maybe_software_singlestep is never used.  This path removes

Typo in the text here, "path" -> "patch".

Lancelot> gdb/ChangeLog:

Lancelot> 	* infrun.c (maybe_software_singlestep): Remove unused PC
Lancelot> 	parameter.
Lancelot> 	(resume_1): Update calls to maybe_software_singlestep.

Looks good.  Thank you.

Tom

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

* Re: [PATCH] Remove unused parameter in maybe_software_singlestep
  2021-07-01 13:12 ` Tom Tromey
@ 2021-07-08 23:23   ` Lancelot SIX
  0 siblings, 0 replies; 3+ messages in thread
From: Lancelot SIX @ 2021-07-08 23:23 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Lancelot SIX via Gdb-patches

Hi,

I have pushed this to master, with a minor modification to the comment
for maybe_software_singlestep.  It stilles contained reference to the
removed parameter, I changed it from

	/* Try to setup for software single stepping over the specified location.
	   Return true if target_resume() should use hardware single step.

to

	/* Try to setup for software single stepping.  Return true if target_resume()
	   should use hardware single step.

Lancelot.


On Thu, Jul 01, 2021 at 07:12:05AM -0600, Tom Tromey wrote:
> >>>>> "Lancelot" == Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Lancelot> While working around, I noticed that the last parameter of
> Lancelot> maybe_software_singlestep is never used.  This path removes
> 
> Typo in the text here, "path" -> "patch".
> 
> Lancelot> gdb/ChangeLog:
> 
> Lancelot> 	* infrun.c (maybe_software_singlestep): Remove unused PC
> Lancelot> 	parameter.
> Lancelot> 	(resume_1): Update calls to maybe_software_singlestep.
> 
> Looks good.  Thank you.
> 
> Tom

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

end of thread, other threads:[~2021-07-08 23:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 21:30 [PATCH] Remove unused parameter in maybe_software_singlestep Lancelot SIX
2021-07-01 13:12 ` Tom Tromey
2021-07-08 23:23   ` Lancelot SIX

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).