aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1993-10-07 16:42:08 +0000
committerStu Grossman <grossman@cygnus>1993-10-07 16:42:08 +0000
commit981a33093328ee54fb095007f733bea3a1dbe5bf (patch)
treea112c9116c617c2ef5df57b4985fb22d9dd27f6e /gdb/infrun.c
parent50a540397837c7239b39a9100a5ed6a5813593e3 (diff)
downloadfsf-binutils-gdb-981a33093328ee54fb095007f733bea3a1dbe5bf.zip
fsf-binutils-gdb-981a33093328ee54fb095007f733bea3a1dbe5bf.tar.gz
fsf-binutils-gdb-981a33093328ee54fb095007f733bea3a1dbe5bf.tar.bz2
* blockframe.c (find_pc_partial_function): Fix handling for PCs
beyond the end of the last function in an objfile. * coff-solib.c (coff_solib_add): Use BFD to get fields from .lib section. * infrun.c (wait_for_inferior): Modify test for subroutine entry to include pc out of bounds of the previous function. * remote.c (remote_wait): Use strtoul for parsing 'N' message. Add code to relocate symfile_objfile->sections.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 3744733..d539ddd 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -475,6 +475,7 @@ wait_for_inferior ()
int random_signal;
CORE_ADDR stop_sp = 0;
CORE_ADDR stop_func_start;
+ CORE_ADDR stop_func_end;
char *stop_func_name;
CORE_ADDR prologue_pc = 0, tmp;
struct symtab_and_line sal;
@@ -649,11 +650,12 @@ wait_for_inferior ()
stop_frame_address = FRAME_FP (get_current_frame ());
stop_sp = read_sp ();
stop_func_start = 0;
+ stop_func_end = 0;
stop_func_name = 0;
/* Don't care about return value; stop_func_start and stop_func_name
will both be 0 if it doesn't work. */
find_pc_partial_function (stop_pc, &stop_func_name, &stop_func_start,
- (CORE_ADDR *)NULL);
+ &stop_func_end);
stop_func_start += FUNCTION_START_OFFSET;
another_trap = 0;
bpstat_clear (&stop_bpstat);
@@ -1015,7 +1017,9 @@ wait_for_inferior ()
/* ==> See comments at top of file on this algorithm. <==*/
- if ((stop_pc == stop_func_start
+ if ((stop_pc < stop_func_start
+ || stop_pc >= stop_func_end
+ || stop_pc == stop_func_start
|| IN_SOLIB_TRAMPOLINE (stop_pc, stop_func_name))
&& (stop_func_start != prev_func_start
|| prologue_pc != stop_func_start