Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Adam Fedor <fedor@doc.com>
To: GDB Patches <gdb-patches@sources.redhat.com>
Subject: [RFC]: Minor clean up of variable names in infrun.c
Date: Fri, 31 Jan 2003 03:55:00 -0000	[thread overview]
Message-ID: <3E39F3C4.4090802@doc.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

I renamed this variable to be a little more meaningful and did a little 
clean up. This is a pre-requisite for  my previous (updated) 
infrun.c/Objective-C patch.


[-- Attachment #2: objc20b.patch --]
[-- Type: text/plain, Size: 2519 bytes --]

2003-01-30  Adam Fedor  <fedor@gnu.org>

	* infrun.c (handle_inferior_event): Rename 'tmp' to real_stop_pc.
	Remove duplicate/shadowing variable of same name.

Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.95
diff -u -p -r1.95 infrun.c
--- infrun.c	19 Jan 2003 17:39:16 -0000	1.95
+++ infrun.c	31 Jan 2003 03:40:37 -0000
@@ -1172,7 +1173,7 @@ context_switch (struct execution_control
 void
 handle_inferior_event (struct execution_control_state *ecs)
 {
-  CORE_ADDR tmp;
+  CORE_ADDR real_stop_pc;
   int stepped_after_stopped_by_watchpoint;
   int sw_single_step_trap_p = 0;
 
@@ -2407,19 +2408,19 @@ process_event_stop_test:
          function.  That's what tells us (a) whether we want to step
          into it at all, and (b) what prologue we want to run to
          the end of, if we do step into it.  */
-      tmp = SKIP_TRAMPOLINE_CODE (stop_pc);
-      if (tmp != 0)
-	ecs->stop_func_start = tmp;
+      real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
+      if (real_stop_pc != 0)
+	ecs->stop_func_start = real_stop_pc;
       else
 	{
-	  tmp = DYNAMIC_TRAMPOLINE_NEXTPC (stop_pc);
-	  if (tmp)
+	  real_stop_pc = DYNAMIC_TRAMPOLINE_NEXTPC (stop_pc);
+	  if (real_stop_pc)
 	    {
 	      struct symtab_and_line xxx;
 	      /* Why isn't this s_a_l called "sr_sal", like all of the
 	         other s_a_l's where this code is duplicated?  */
 	      init_sal (&xxx);	/* initialize to zeroes */
-	      xxx.pc = tmp;
+	      xxx.pc = real_stop_pc;
 	      xxx.section = find_pc_overlay (xxx.pc);
 	      check_for_old_step_resume_breakpoint ();
 	      step_resume_breakpoint =
@@ -2482,19 +2509,17 @@ process_event_stop_test:
      we want to proceed through the trampoline when stepping.  */
   if (IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name))
     {
-      CORE_ADDR tmp;
-
       /* Determine where this trampoline returns.  */
-      tmp = SKIP_TRAMPOLINE_CODE (stop_pc);
+      real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
 
       /* Only proceed through if we know where it's going.  */
-      if (tmp)
+      if (real_stop_pc)
 	{
 	  /* And put the step-breakpoint there and go until there. */
 	  struct symtab_and_line sr_sal;
 
 	  init_sal (&sr_sal);	/* initialize to zeroes */
-	  sr_sal.pc = tmp;
+	  sr_sal.pc = real_stop_pc;
 	  sr_sal.section = find_pc_overlay (sr_sal.pc);
 	  /* Do not specify what the fp should be when we stop
 	     since on some machines the prologue

             reply	other threads:[~2003-01-31  3:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-31  3:55 Adam Fedor [this message]
2003-01-31  4:24 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E39F3C4.4090802@doc.com \
    --to=fedor@doc.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox