diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:27:34 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:27:34 +0000 |
commit | 42f2791e19516e66843bdee1454560c9d2d312bf (patch) | |
tree | 15bc553e0e799fb18d3d2134bc7a18cc656eb152 /gdb/linux-fork.c | |
parent | 4bbdaac78a5b608b1ec6265d384f0d7fb9867e72 (diff) | |
download | gdb-42f2791e19516e66843bdee1454560c9d2d312bf.tar.gz |
* valops.c: Include "objfiles.h" and "symtab.h".
(find_function_in_inferior): New argument OBJF_P. Use it to return
objfile where function is defined. Use per-objfile arch types
instead of builtin_type_ to define default return type.
* linux-fork.c (checkpoint_command): Update calls. Use per-objfile
architecture to define inferior call argument types.
* gcore.c (derive_heap_segment): Likewise.
* objc-lang.c (value_nsstring): Likewise.
* scm-lang.c (scm_lookup_name): Likewise.
* scm-valprint.c (scm_inferior_print): Likewise.
* valops.c (value_allocate_space_in_inferior): Likewise.
* eval.c (evaluate_subexp_standard): Update calls.
* objc-lang.c (lookup_objc_class, print_object_command): Likewise.
* linux-fork.c: Include "objfiles.h".
* scm-lang.c: Include "objfiles.h".
* scm-valprint.c: Include "objfiles.h".
Diffstat (limited to 'gdb/linux-fork.c')
-rw-r--r-- | gdb/linux-fork.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c index fcc8a29e7ad..443b63de9fb 100644 --- a/gdb/linux-fork.c +++ b/gdb/linux-fork.c @@ -22,6 +22,7 @@ #include "regcache.h" #include "gdbcmd.h" #include "infcall.h" +#include "objfiles.h" #include "gdb_assert.h" #include "gdb_string.h" #include "linux-fork.h" @@ -528,6 +529,8 @@ save_detach_fork (int *saved_val) static void checkpoint_command (char *args, int from_tty) { + struct objfile *fork_objf; + struct gdbarch *gdbarch; struct target_waitstatus last_target_waitstatus; ptid_t last_target_ptid; struct value *fork_fn = NULL, *ret; @@ -545,14 +548,15 @@ checkpoint_command (char *args, int from_tty) /* Make the inferior fork, record its (and gdb's) state. */ if (lookup_minimal_symbol ("fork", NULL, NULL) != NULL) - fork_fn = find_function_in_inferior ("fork"); + fork_fn = find_function_in_inferior ("fork", &fork_objf); if (!fork_fn) if (lookup_minimal_symbol ("_fork", NULL, NULL) != NULL) - fork_fn = find_function_in_inferior ("fork"); + fork_fn = find_function_in_inferior ("fork", &fork_objf); if (!fork_fn) error (_("checkpoint: can't find fork function in inferior.")); - ret = value_from_longest (builtin_type_int, 0); + gdbarch = get_objfile_arch (fork_objf); + ret = value_from_longest (builtin_type (gdbarch)->builtin_int, 0); old_chain = save_detach_fork (&temp_detach_fork); detach_fork = 0; ret = call_function_by_hand (fork_fn, 0, &ret); |