The following patch solves a problem on the ia64. The problem exists because of a generic problem to reset the prev_pc value after an inferior function call or after a return command. Because the value is not properly set, the line number used to initialize the ecs is incorrect. On the ia64 this causes a problem because there are extraneous linetable entries generated by the compiler that are within the line (i.e. they don't change the line number). When we apply "next" logic which uses the ecs line number, we end up stopping at the first line table entry past our start position. This often ends up being just a few insns farther in the same line. A specific example of this problem is the next to 1237 test inside call-ar-st.exp. An inferior call is made on line 1236 and upon return we issue a next. I discussed this topic on the gdb forum and a number of attempts were made to ensure the prev_pc value was up to date in init_execution_control_state() in infrun.c. Those attempts failed because the inferior was not guaranteed to be stopped and so we weren't guaranteed that a ptrace to fetch the pc would work. This patch attempts to refresh the prev_pc value just before resuming in proceed(). It works for the ia64 problems cited above and also I have tested it on the x86. Is this patch ok? -- Jeff J. 2003-05-05 Jeff Johnston * infrun.c (prev_pc): Move declaration ahead of proceed(). (proceed): Refresh prev_pc value before resuming.