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 | 3e3b026fee8cd62ac6c2cfc7f86cec972d8f5676 (patch) | |
tree | bc601c999d48b731197ac2a508aafb6c06ad054c /gdb/gcore.c | |
parent | f8dcfc0affda04681b337c807c15d3c59badc33c (diff) | |
download | gdb-3e3b026fee8cd62ac6c2cfc7f86cec972d8f5676.zip gdb-3e3b026fee8cd62ac6c2cfc7f86cec972d8f5676.tar.gz gdb-3e3b026fee8cd62ac6c2cfc7f86cec972d8f5676.tar.bz2 |
* 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/gcore.c')
-rw-r--r-- | gdb/gcore.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/gcore.c b/gdb/gcore.c index 2784a5e..bcdb8f9 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -215,6 +215,8 @@ derive_stack_segment (bfd_vma *bottom, bfd_vma *top) static int derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top) { + struct objfile *sbrk_objf; + struct gdbarch *gdbarch; bfd_vma top_of_data_memory = 0; bfd_vma top_of_heap = 0; bfd_size_type sec_size; @@ -256,20 +258,21 @@ derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top) /* Now get the top-of-heap by calling sbrk in the inferior. */ if (lookup_minimal_symbol ("sbrk", NULL, NULL) != NULL) { - sbrk = find_function_in_inferior ("sbrk"); + sbrk = find_function_in_inferior ("sbrk", &sbrk_objf); if (sbrk == NULL) return 0; } else if (lookup_minimal_symbol ("_sbrk", NULL, NULL) != NULL) { - sbrk = find_function_in_inferior ("_sbrk"); + sbrk = find_function_in_inferior ("_sbrk", &sbrk_objf); if (sbrk == NULL) return 0; } else return 0; - zero = value_from_longest (builtin_type_int, 0); + gdbarch = get_objfile_arch (sbrk_objf); + zero = value_from_longest (builtin_type (gdbarch)->builtin_int, 0); gdb_assert (zero); sbrk = call_function_by_hand (sbrk, 1, &zero); if (sbrk == NULL) |