This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] rs6000-tdep.c: Improve prologue handling with code motion.


On Nov 5,  2:12pm, Peter.Schauer wrote:

> 	* rs6000-tdep.c (skip_prologue):  Handle optimizer code motions into
> 	the prologue by continuing the prologue search, if we have no valid
> 	frame yet or if the return address is not yet saved in the frame.

[...]

> ! 	  if (num_skip_non_prologue_insns == 0 && lim_pc == 0)
> ! 	    {
> ! 	      /* Stop scan if we are looking for the end of the prologue
> ! 		 and we have line numbers for the function
> ! 		 The current result is good enough, and the compiler will
> ! 		 hopefully help us to get better results via the line number
> ! 		 info.  */
> ! 	      struct symtab_and_line sal;
> ! 	      sal = find_pc_line (pc, 0);
> ! 	      if (sal.line != 0)
> ! 		break;
> ! 	    }

Does your patch still work without the above section?

It concerns me because I had to remove some similar looking code for
the ARM recently which was preventing the prologue scanner from
scanning far enough.  (Think about what happens when the optimizer
moves a few of the instructions from the body of the function into the
prologue -- with debugging info present.  The instruction(s) in
question are tagged with some line numbers and the prologue scanner
will stop too soon.)

If you really think that we need this bit of code, I'll need to
examine it a lot more closely and run some of my own tests to
make sure it doesn't cause a problem.  (The rest of the patch
looks fine to me.)

Kevin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]