diff options
author | John Gilmore <gnu@cygnus> | 1991-09-06 07:09:40 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-09-06 07:09:40 +0000 |
commit | 06b6c733aedcaeaa7b54a7152e9d5e5dfdc6266f (patch) | |
tree | b4e42abc46d349c21cc54cd4132dccd5667e7715 /gdb/solib.c | |
parent | 2d8fa9ab983d9d2ff132a16c57f71ddb6e6c0952 (diff) | |
download | gdb-06b6c733aedcaeaa7b54a7152e9d5e5dfdc6266f.zip gdb-06b6c733aedcaeaa7b54a7152e9d5e5dfdc6266f.tar.gz gdb-06b6c733aedcaeaa7b54a7152e9d5e5dfdc6266f.tar.bz2 |
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.
Diffstat (limited to 'gdb/solib.c')
-rw-r--r-- | gdb/solib.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/solib.c b/gdb/solib.c index f6a9628..6995e50 100644 --- a/gdb/solib.c +++ b/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 */ |