2003-01-21 Andrew Cagney <ac131313@redhat.com>

* exec.c (text_start): Delete global variable.
	(exec_file_attach): Make text_start local to the function.
	* inferior.h (BEFORE_TEXT_END, AFTER_TEXT_END): Delete macros.
	* valops.c (hand_function_call): Delete code that handles
	BEFORE_TEXT_END and AFTER_TEXT_END.
	* gdbarch.sh (CALL_DUMMY_LENGTH): Test call_dummy_length instead
	of CALL_DUMMY_LOCATION.
	* gdbarch.c: Regenerate.
	* inferior.h (deprecated_pc_in_call_dummy_before_text_end)
	(deprecated_pc_in_call_dummy_after_text_end): Delete declaration.
	* blockframe.c (deprecated_pc_in_call_dummy_before_text_end)
	(deprecated_pc_in_call_dummy_after_text_end): Delete functions.
	(text_end): Delete extern declaration.
This commit is contained in:
Andrew Cagney
2003-01-21 19:43:48 +00:00
parent eb4f72c5f9
commit 73c1f219a3
8 changed files with 20 additions and 74 deletions

View File

@@ -1398,37 +1398,6 @@ hand_function_call (struct value *function, int nargs, struct value **args)
generic_save_call_dummy_addr (start_sp, start_sp + sizeof_dummy1);
}
if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END)
{
/* Convex Unix prohibits executing in the stack segment. */
/* Hope there is empty room at the top of the text segment. */
extern CORE_ADDR text_end;
static int checked = 0;
if (!checked)
for (start_sp = text_end - sizeof_dummy1; start_sp < text_end; ++start_sp)
if (read_memory_integer (start_sp, 1) != 0)
error ("text segment full -- no place to put call");
checked = 1;
sp = old_sp;
real_pc = text_end - sizeof_dummy1;
write_memory (real_pc, (char *) dummy1, sizeof_dummy1);
if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
generic_save_call_dummy_addr (real_pc, real_pc + sizeof_dummy1);
}
if (CALL_DUMMY_LOCATION == AFTER_TEXT_END)
{
extern CORE_ADDR text_end;
int errcode;
sp = old_sp;
real_pc = text_end;
errcode = target_write_memory (real_pc, (char *) dummy1, sizeof_dummy1);
if (errcode != 0)
error ("Cannot write text segment -- call_function failed");
if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
generic_save_call_dummy_addr (real_pc, real_pc + sizeof_dummy1);
}
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
{
real_pc = funaddr;