Fix some infrastructure to be able to cope with host and target
machines with different sized basic types (ints, ptrs, etc). (Idea from pierre@la.tce.com (Pierre Willard).) * value.c (value_from_longest): Rename from value_from_long. Handle pointer types as well as integers, so that targets with different pointer sizes from the host can be accomodated. * breakpoint.c, convex-tdep.c, eval.c, expprint.c, printcmd.c, valarith.c, valops.c, valprint.c, value.h, values.c: Rename uses of value_from_long to value_from_longest. * eval.c, findvar.c, printcmd.c, valarith.c, valops.c: Pass the correct pointer type to value_from_long{est}. * remote-vx.c: Remove obsolete code for calling functions via vxworks kludge interface (it referenced value_from_long). * valops.c (value_string): Find malloc with lookup_misc_func, not raw search. * breakpoint.c, remote-vx.c: Reword strings printed by catch_errors callers.
This commit is contained in:
parent
2d8fa9ab98
commit
06b6c733ae
5 changed files with 50 additions and 364 deletions
11
gdb/solib.c
11
gdb/solib.c
|
@ -269,7 +269,7 @@ solib_add (arg_string, from_tty, target)
|
|||
so->symbols_loaded = 1;
|
||||
so->from_tty = from_tty;
|
||||
catch_errors (symbol_add_stub, (char *)so,
|
||||
"Error while reading shared library symbols; continuing.");
|
||||
"Error while reading shared library symbols:\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ solib_create_inferior_hook()
|
|||
int in_debugger;
|
||||
CORE_ADDR in_debugger_addr;
|
||||
CORE_ADDR breakpoint_addr;
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
/* FIXME: We should look around in the executable code to find _DYNAMIC,
|
||||
if it isn't in the symbol table. It's not that hard to find...
|
||||
|
@ -386,11 +386,16 @@ solib_create_inferior_hook()
|
|||
i = lookup_misc_func ("_DYNAMIC");
|
||||
if (i < 0) /* Can't find shared lib ptr. */
|
||||
return;
|
||||
if (misc_function_vector[i].address == 0) /* statically linked program */
|
||||
return;
|
||||
|
||||
/* Get link_dynamic structure */
|
||||
read_memory(misc_function_vector[i].address,
|
||||
j = target_read_memory(misc_function_vector[i].address,
|
||||
&inferior_dynamic_cpy,
|
||||
sizeof(struct link_dynamic));
|
||||
if (j) /* unreadable */
|
||||
return;
|
||||
|
||||
/* Calc address of debugger interface structure */
|
||||
inferior_debug_addr = (CORE_ADDR)inferior_dynamic_cpy.ldd;
|
||||
/* Calc address of `in_debugger' member of debugger interface structure */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue