diff options
author | John Gilmore <gnu@cygnus> | 1991-08-19 20:55:06 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-08-19 20:55:06 +0000 |
commit | 5c9878f19c644e782250d19f895b68d681055d86 (patch) | |
tree | dbaa980e8465d3d61f8adfbec117ff452a733e65 | |
parent | 361bf6eee5a8ca92d4a1b1693fd1bff0fe286799 (diff) | |
download | gdb-5c9878f19c644e782250d19f895b68d681055d86.zip gdb-5c9878f19c644e782250d19f895b68d681055d86.tar.gz gdb-5c9878f19c644e782250d19f895b68d681055d86.tar.bz2 |
* breakpoint.c (bpstat_do_actions): Use a cleanup to restore
executing_breakpoint_commands if we are interrupted by error.
* coffread.c (init_lineno): Avoid problem with zero-sized linetab
versus malloc/free. From: john@labtam.labtam.oz.au (John Carey).
* core.c (solib_add_stub, core_open): Call SOLIB_ADD inside a
catch_errors() so we can setup the frame regardless of whether
the shared libs work.
* ieee-float.c (double_to_ieee_extended): Get exponent from
right place in little-endian systems. From John Carey.
-rw-r--r-- | gdb/core.c | 15 | ||||
-rw-r--r-- | gdb/ieee-float.c | 8 |
2 files changed, 18 insertions, 5 deletions
@@ -74,6 +74,18 @@ core_close (quitting) } } +#ifdef SOLIB_ADD +/* Stub function for catch_errors around shared library hacking. */ + +int +solib_add_stub (from_tty) + int from_tty; +{ + SOLIB_ADD (NULL, from_tty, &core_ops); + return 0; +} +#endif /* SOLIB_ADD */ + /* This routine opens and sets up the core file bfd */ void @@ -146,9 +158,10 @@ core_open (filename, from_tty) if (ontop) { /* Fetch all registers from core file */ target_fetch_registers (-1); + /* Add symbols and section mappings for any shared libraries */ #ifdef SOLIB_ADD - SOLIB_ADD (NULL, from_tty, &core_ops); + (void) catch_errors (solib_add_stub, from_tty, (char *)0); #endif /* Now, set up the frame cache, and print the top of stack */ set_current_frame ( create_new_frame (read_register (FP_REGNUM), diff --git a/gdb/ieee-float.c b/gdb/ieee-float.c index 3de1973..69a60f2 100644 --- a/gdb/ieee-float.c +++ b/gdb/ieee-float.c @@ -76,7 +76,7 @@ double_to_ieee_extended (ext_format, from, to) double dfrom = *from; unsigned long twolongs[2]; unsigned long mant0, mant1, exponent; - unsigned char twobytes[2]; + unsigned char tobytes[8]; bzero (to, TOTALSIZE); if (dfrom == 0) @@ -95,13 +95,13 @@ double_to_ieee_extended (ext_format, from, to) /* The following code assumes that the host has IEEE doubles. FIXME-someday. It also assumes longs are 32 bits! FIXME-someday. */ bcopy (from, twolongs, 8); - bcopy (from, twobytes, 2); + bcopy (from, tobytes, 8); #if HOST_BYTE_ORDER == BIG_ENDIAN - exponent = ((twobytes[1] & 0xF0) >> 4) | (twobytes[0] & 0x7F) << 4; + exponent = ((tobytes[1] & 0xF0) >> 4) | (tobytes[0] & 0x7F) << 4; mant0 = (twolongs[0] << 11) | twolongs[1] >> 21; mant1 = (twolongs[1] << 11); #else - exponent = ((twobytes[0] & 0xF0) >> 4) | (twobytes[1] & 0x7F) << 4; + exponent = ((tobytes[6] & 0xF0) >> 4) | (tobytes[7] & 0x7F) << 4; mant0 = (twolongs[1] << 11) | twolongs[0] >> 21; mant1 = (twolongs[0] << 11); #endif |