aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1993-10-05 19:44:57 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1993-10-05 19:44:57 +0000
commitcef4c2e7a5f2d3426a8255f74b6c7f4e795fd9a4 (patch)
tree89bc0058548c4a5ef634989a13e0a9ce0f51e3a0 /gdb/valops.c
parenta72e9833652c3a2e3c616b75522f7dfb462533e6 (diff)
downloadgdb-cef4c2e7a5f2d3426a8255f74b6c7f4e795fd9a4.zip
gdb-cef4c2e7a5f2d3426a8255f74b6c7f4e795fd9a4.tar.gz
gdb-cef4c2e7a5f2d3426a8255f74b6c7f4e795fd9a4.tar.bz2
Changes to support alpha OSF/1 in native mode.
* alpha-nat.c, alpha-tdep.c, config/alpha/alpha-osf1.mt, config/alpha/nm-alpha.h, config/alpha/tm-alpha.h, osfsolib.c: New files. * Makefile.in: Add new files and dependencies. * configure.in: Add alpha target. * config/alpha/alpha-osf1.mh (NATDEPFILES): Add osfsolib.o * config/alpha/alpha-osf1.mh (MH_CFLAGS): Remove, we can handle shared libraries now. * config/alpha/xm-alpha.h: Cleanup, get MAKEVA_* defines right. * defs.h (CORE_ADDR): Make its type overridable via CORE_ADDR_TYPE, provide `unsigned int' default. * breakpoint.c (breakpoint_auto_delete): Delete only if we really stopped for the breakpoint. * stabsread.c, stabsread.h (define_symbol): Change valu parameter to a CORE_ADDR. * stabsread.c (read_range_type): Handle the case where the lower bound overflows and the upper doesn't and the range is legal. * infrun.c (resume): Do not step a breakpoint instruction if CANNOT_STEP_BREAKPOINT is defined. * inferior.h (CALL_DUMMY_LOCATION): New variant AT_ENTRY_POINT. Now that we have the bp_call_dummy breakpoint the call dummy code is no longer needed. PUSH_DUMMY_FRAME, PUSH_ARGUMENTS and FIX_CALL_DUMMY can be used to set up everything for the dummy. The breakpoint for the dummy is set at the entry point and thats it. * blockframe.c (inside_entry_file, inside_entry_func): Do not stop backtraces if pc is in the call dummy at the entry point. * infcmd.c (run_stack_dummy): Handle AT_ENTRY_POINT case. Use the expected breakpoint pc when setting up the frame for set_momentary_breakpoint. * symfile.c (entry_point_address): New function for AT_ENTRY_POINT support. * valops.c (call_function_by_hand): Handle AT_ENTRY_POINT case.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index c8bd496..82d0f58 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -896,8 +896,8 @@ call_function_by_hand (function, nargs, args)
#if CALL_DUMMY_LOCATION == ON_STACK
write_memory (start_sp, (char *)dummy1, sizeof dummy);
+#endif /* On stack. */
-#else /* Not on stack. */
#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. */
@@ -913,7 +913,9 @@ call_function_by_hand (function, nargs, args)
real_pc = text_end - sizeof dummy;
write_memory (real_pc, (char *)dummy1, sizeof dummy);
}
-#else /* After text_end. */
+#endif /* Before text_end. */
+
+#if CALL_DUMMY_LOCATION == AFTER_TEXT_END
{
extern CORE_ADDR text_end;
int errcode;
@@ -924,7 +926,10 @@ call_function_by_hand (function, nargs, args)
error ("Cannot write text segment -- call_function failed");
}
#endif /* After text_end. */
-#endif /* Not on stack. */
+
+#if CALL_DUMMY_LOCATION == AT_ENTRY_POINT
+ real_pc = funaddr;
+#endif /* At entry point. */
#ifdef lint
sp = old_sp; /* It really is used, for some ifdef's... */
@@ -1056,7 +1061,7 @@ call_function_by_hand (function, nargs, args)
char format[80];
sprintf (format, "at %s", local_hex_format ());
name = alloca (80);
- sprintf (name, format, funaddr);
+ sprintf (name, format, (unsigned long) funaddr);
}
/* Execute the stack dummy routine, calling FUNCTION.
@@ -1349,7 +1354,7 @@ search_struct_field (name, arg1, offset, type, looking_for_baseclass)
/* Helper function used by value_struct_elt to recurse through baseclasses.
Look for a field NAME in ARG1. Adjust the address of ARG1 by OFFSET bytes,
and search in it assuming it has (class) type TYPE.
- If found, return value, else if name matched and args not return -1,
+ If found, return value, else if name matched and args not return (value)-1,
else return NULL. */
static value
@@ -1409,7 +1414,7 @@ search_struct_method (name, arg1p, args, offset, static_memfuncp, type)
}
v = search_struct_method (name, arg1p, args, base_offset + offset,
static_memfuncp, TYPE_BASECLASS (type, i));
- if (v == -1)
+ if (v == (value) -1)
{
name_matched = 1;
}
@@ -1420,7 +1425,7 @@ search_struct_method (name, arg1p, args, offset, static_memfuncp, type)
return v;
}
}
- if (name_matched) return -1;
+ if (name_matched) return (value) -1;
else return NULL;
}
@@ -1519,7 +1524,7 @@ value_struct_elt (argp, args, name, static_memfuncp, err)
else
v = search_struct_method (name, argp, args, 0, static_memfuncp, t);
- if (v == -1)
+ if (v == (value) -1)
{
error("Argument list of %s mismatch with component in the structure.", name);
}