Commit Graph

173 Commits

Author SHA1 Message Date
Andrew Cagney 255e7dbf2e * utils.c (error_begin): Make static.
* defs.h (error_begin): Delete declaration.

* linespec.c (cplusplus_error): Replace cplusplus_hint.
(decode_line_1): Use cplusplus_error instead of error_begin,
cplusplus_hint and return_to_top_level.
* coffread.c (coff_symfile_read): Use error instead of error_begin
and return_to_top_level.
* infrun.c (default_skip_permanent_breakpoint): Ditto.
2002-02-02 03:42:59 +00:00
Andrew Cagney f5a96129d2 * defs.h (vwarning): Declare.
(warning_begin): Delete declaration.
* utils.c (vwarning): New function.
(warning): Call vwarning.
(warning_begin): Delete function.

* rs6000-nat.c (vmap_ldinfo): Use the function warning to print
the warning message.
* d10v-tdep.c (d10v_address_to_pointer) [0]: Delete call to
warning_begin.
2002-01-31 04:10:51 +00:00
Andrew Cagney 826000345c Eliminate MALLOC_INCOMPATIBLE. 2002-01-20 04:23:29 +00:00
Andrew Cagney 2d1b2124ee Use MAXPATHLEN when no PATH_MAX. 2002-01-20 00:44:47 +00:00
Andrew Cagney 375fc98382 Change behavour of internal-error to quit and dump core by default. 2002-01-17 23:33:39 +00:00
Andrew Cagney a752853e6e Remove obsolete MacOS support. 2002-01-05 05:54:31 +00:00
Tom Tromey 58d370e0e6 * configure, config.in: Rebuilt.
* configure.in: Check for realpath.
	* defs.h (gdb_realpath): Declare.
	* symtab.h (partial_symtab): Added fullname field.
	* source.c (openp): Use gdb_realpath.
	(forget_cached_source_info): Clear full name of each partial
	symtab.
	* utils.c (gdb_realpath): New function.
	* symtab.c (lookup_symtab): Removed.
	(lookup_symtab_1): Renamed to lookup_symtab.
	(lookup_symtab): Look for real path.
	(lookup_partial_symtab): Likewise.
2001-12-21 22:32:37 +00:00
Andrew Cagney ed1801dfff Eliminate global #include of "mmalloc.h". 2001-12-06 20:59:11 +00:00
Andrew Cagney 45a1e86678 Correctly handle phex(*,0) and phex_nz(*,0). 2001-11-15 18:35:05 +00:00
Andrew Cagney faf833caca * utils.c (phex_nz): For default case, set str to phex_nz return
value.
2001-11-15 18:24:17 +00:00
Andrew Cagney 5c7dd74823 * utils.c (internal_verror): Restore calls to abort().
Fix PR gdb/219.
2001-11-02 21:46:52 +00:00
Andrew Cagney 03dd37c302 Functions to convert to/from CORE_ADDR and a string. Use in Insight. 2001-10-17 20:35:31 +00:00
Andrew Cagney d16aafd8c8 * defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_LONG_DOUBLE_FORMAT, DOUBLEST)
(floatformat_to_doublest, floatformat_from_doublest)
(floatformat_is_negative, floatformat_is_nan)
(floatformat_mantissa, store_floating)
(extract_floating): Move declaration from here.
* doublest.h: To here.  New file.
* utils.c (get_field, floatformat_to_doublest, put_field)
(ldfrexp, floatformat_from_doublest, floatformat_is_negative)
(floatformat_is_nan, floatformat_mantissa)
(FLOATFORMAT_CHAR_BIT): Move from here.
* doublest.c: To here.  New file.
* findvar.c (store_floating, extract_floating): Move from here.
* doublest.c: To here.
* Makefile.in (SFILES): Add doublest.c.
(COMMON_OBS): Add doublest.o.
(doublest.o): Specify dependencies.
(doublest_h): Define.

* config/m88k/tm-m88k.h: Include "doublest.h".
* config/i960/tm-i960.h: Ditto.
* config/i386/tm-symmetry.h: Ditto.
* rs6000-tdep.c, valarith.c: Ditto.
* valprint.c, stabsread.c, sh-tdep.c: Ditto.
* ia64-tdep.c, i387-tdep.c, i386-tdep.c: Ditto.
* values.c, arm-tdep.c, arm-linux-tdep.c: Ditto.
* alpha-tdep.c, ax.h, expression.h: Ditto.
* sh-tdep.c, parse.c, top.c, value.h: Ditto.

* Makefile.in (arm-tdep.o): Add $(doublest_h).
(i386-tdep.o, i387-tdep.o, ia64-tdep.o): Ditto.
(rs6000-tdep.o, stabsread.o, valarith.o): Ditto.
(values.o, valprint.o, arm-linux-tdep.o): Ditto.
(alpha-tdep.o, ax_h, parse.o, top.o, value_h): Ditto.
(parser_defs_h): Ditto.
(expression_h): Add $(doublest_h) and $(symtab_h).
2001-08-01 18:39:27 +00:00
Stephane Carrez 5ecb18062a * utils.c (init_page_info): Use tui_get_command_dimension.
* printcmd.c (disassemble_command): Simplify tui specific code,
	use tui_is_window_visible, tui_show_assembly.
2001-07-21 22:31:14 +00:00
Andrew Cagney 2cd58942b9 * serial.h (SERIAL_ASYNC): Delete.
(DEPRECATED_SERIAL_FD): Delete.
(SERIAL_DEBUG): Delete.
(SERIAL_DEBUG_P): Delete.
(SERIAL_DRAIN_OUTPUT): Delete.
(SERIAL_FLUSH_OUTPUT): Delete.
(SERIAL_FLUSH_INPUT): Delete.
(SERIAL_SEND_BREAK): Delete.
(SERIAL_RAW): Delete.
(SERIAL_GET_TTY_STATE): Delete.
(SERIAL_SET_TTY_STATE): Delete.
(SERIAL_PRINT_TTY_STATE): Delete.
(SERIAL_NOFLUSH_SET_TTY_STATE): Delete.
(SERIAL_SETBAUDRATE): Delete.
(SERIAL_SETSTOPBITS): Delete.
(SERIAL_CAN_ASYNC_P): Delete.
(SERIAL_IS_ASYNC_P): Delete.
(SERIAL_UN_FDOPEN): Delete.
(SERIAL_READCHAR): Delete.
(SERIAL_CLOSE): Delete.
(SERIAL_FDOPEN): Delete.
(SERIAL_OPEN): Delete.
2001-07-15 20:34:14 +00:00
Stephane Carrez 37767e423b * utils.c (query): Remove tui hacks; tui must use the query_hook.
* top.c (command_loop): Remove tui insert_mode hacks; don't call
	tuiCleanUp because this must be made with atexit by tui.
	* symfile.c (symbol_file_command): Remove call to TUIDO
	* stack.c (show_and_print_stack_frame_stub): Remove tui check;
	not necessary when using the selected frame hooks.
	(print_stack_frame_stub): Likewise.
	(print_frame_info_base): Likewise.
	(print_frame_info): Likewise.
	(up_silently_command): Likewise.
	(down_silently_command): Likewise.
	(show_stack_frame): Likewise for TUIDO.
	(select_frame): Likewise.
	(select_and_print_frame): Likewise.
	(stack_publish_stopped_with_no_frame): Remove.
	(select_and_maybe_print_frame): Remove.
	* main.c (captured_main): Remove tui_fileopen and tuiInit; tui
	must use the initialize ui hook.
	* infrun.c (normal_stop): Remove call to TUIDO; tui must use the
	selected frame hooks.
	* event-top.c (command_handler): Remove tui insert_mode hack.
	* defs.h: Remove TUIDO; Only include tui.h.
	* breakpoint.c (mention): Remove calls to TUIDO.
	(delete_breakpoint): Remove tui hacks; tui must install
	the breakpoint hooks.
2001-07-14 18:59:07 +00:00
Andrew Cagney 819cc32466 s/typedef serial_t/struct serial */ 2001-07-11 17:52:32 +00:00
Andrew Cagney 090a2205b5 * gdbtypes.h (builtin_type_void_data_ptr): Rename
builtin_type_ptr.
* gdbtypes.c (builtin_type_void_data_ptr): Update.
(build_gdbtypes): Update.
(_initialize_gdbtypes): Update.
* values.c (value_as_pointer): Update.
* utils.c (host_pointer_to_address): Update.
(address_to_host_pointer): Update.
2001-07-08 20:42:15 +00:00
Christopher Faylor 0b6a968ee6 * gnu-regex.c: Eliminate obsolete check for _MSC_VER.
* utils.c (notice_quit): Remove dummy function only used for _MSC_VER.
* values.c (unpack_double): Remove obsolete check for _MSC_VER.
* defs.h: Ditto.
* m32r-rom.c: Ditto.
* p-exp.y: Ditto.
* ser-e7kpc.c: Ditto.  Define WIN32_LEAN_AND_MEAN under _WIN32, for faster
compilation.
(get_ds_base): Remove _MSC_VER version of this function.
* nindy-share/ttyflush.c: Ditto.  X
* rdi-share/host.h: Ditto.  X
* ser-go32.c (dos_readchar): Remove call to obsolete function.
* remote-sim.c (gdb_os_poll_quit): Ditto.
* remote-e7000.c (expect): Remove obsolete #if 0'ed code.
* main.c (captured_main): Eliminate special Cygwin checks.
* ser-tcp.c: Remove unneeded __CYGWIN__ guard against system include.
2001-06-10 16:25:51 +00:00
Andrew Cagney d036b4d9cf Obsolete MPW as host. 2001-04-19 23:56:14 +00:00
Andrew Cagney c0e61796d0 * defs.h (xfree, mcalloc, mmalloc, mrealloc, mfree, xmmalloc,
xmrealloc): Move existing declarations to the one place and
re-order to be consistent.
(xmcalloc, xmfree): Declare.
(xmmalloc, xmrealoc): Assume ISO-C - use size_t and void* in
declaration.

* utils.c (size_t): Delete #ifdef defining size_t.
(mmalloc, mrealloc, mcalloc, mfree): Re-order.
(mmalloc, mrealloc, mcalloc): Document as only calls in GDB
corresponding malloc, realloc, calloc.
(mfree): Call free directly.
(xmmalloc, xmrealloc): Clean up. Assume ISO-C.
(xmcalloc, xmfree): New functions. Copy old xcalloc and xfree
function bodies to here.
(xcalloc, xfree): Call xmcalloc and xmfree respectfully.
2001-03-23 23:39:57 +00:00
Andrew Cagney 3c37485b16 malloc() -> xmalloc.
Move malloc() decl to utils.c
2001-03-20 01:37:10 +00:00
Andrew Cagney 0e52036f1f Move realoc() decl to utils.c. s/realloc()/xrealloc()/. 2001-03-20 00:54:43 +00:00
Andrew Cagney 81b8eb809e Move free() decl to utils.c. 2001-03-20 00:28:23 +00:00
Kevin Buettner d7fa9de08d Committed. 2001-03-10 01:22:11 +00:00
Mark Kettenis 39424bef91 * defs.h: Provide prototypes for floatformat_is_negative,
floatformat_is_nan and floatformat_mantissa.
* utils.c: Include "gdb_assert.h".
(floatformat_is_negative): New function.
(floatformat_is_nan): New function.
(floatformat_mantissa): New function.
* valprint.c: Include "floatformat.h".
(print_floating): Get rid of the Linux-specific
TARGET_ANALYZE_FLOATING macro and rewrite NaN detection with the
help these new functions.  Print NaN's in a format conforming to
ISO C99.
2001-03-07 16:09:03 +00:00
J.T. Conklin 5565b5569b 2001-03-06 J.T. Conklin <jtc@redback.com>
* symtab.h (decode_line_1): Removed declaration.

        * symfile.c (#include <assert.h>): Removed.

        * arch-utils.c (#include <ctype.h>): Removed.
        * c-typeprint.c: Likewise.
        * dbxread.c: Likewise.
        * gdbtypes.c: Likewise.
        * target.c: Likewise.
        * os9kread.c: Likewise.

        * c-valprint.c (#include "demangle.h"): Removed.
        * ch-typeprint.c: Likewise.
        * eval.c: Likewise.
        * f-typeprint.c: Likewise.
        * f-valprint.c: Likewise.
        * m2-typeprint.c: Likewise.
        * typeprint.c: Likewise.
        * p-typeprint.c: Likewise.
        * valarith.c: Likewise.
        * valprint.c: Likewise.

        * m2-typeprint.c (#include "gdb_string.h"): Removed.
        * nlmread.c: Likewise.

        * mdebugread.c (#include "gdb-stabs.h"): Removed.
        * minsyms.c: Likewise.
        * mipsread.c: Likewise.
        * nlmread.c: Likewise.

        * m2-typeprint.c (#include "obstack.h"): Removed.
        * m2-valprint.c: Likewise.

        * event-loop.c (#include <setjmp.h>): Removed.
2001-03-07 02:57:08 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Kevin Buettner e1e9e218c1 Replace calls to abort() with calls to internal_error(). 2001-02-25 04:45:12 +00:00
Andrew Cagney 8e65ff28b0 Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
2001-02-08 06:03:54 +00:00
Andrew Cagney f042532cc4 * sol-thread.c (restore_inferior_pid): Save the PID in a freshly
allocated buffer.
(save_inferior_pid): Restore the PID from that tempoary
buffer. Delete the buffer.
* utils.c (make_cleanup_close, do_close_cleanup): Ditto for FD.
2001-02-07 03:44:24 +00:00
J.T. Conklin 042be3a9b3 * signals.h: Removed.
* event-top.c (#include <signal.h>): Changed from signals.h.
* inflow.c: Likewise.
* mac-xdep.c: Likewise.
* ser-pipe.c: Likewise.
* ser-tcp.c: Likewise.
* standalone.c: Likewise.
* top.c: Likewise.
* utils.c: Likewise.
* Makefile.in: Removed signals.h from dependencies.
2001-02-06 04:17:03 +00:00
Andrew Cagney d1f4cff847 Move putchar_filtered() to utils.c. 2001-01-31 03:46:23 +00:00
Andrew Cagney 4fcf66da88 Replace strsave() with xstrdup(). 2001-01-31 01:24:03 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Michael Snyder 62fd9fad96 2000-12-04 Michael Snyder <msnyder@cleaver.cygnus.com>
* utils.c (internal_verror): Fix typo in error msg.
2000-12-05 03:15:31 +00:00
Andrew Cagney 76995688e8 Replace asprintf() / vasprintf() with xasprintf() xvasprintf(). 2000-11-20 02:06:19 +00:00
David Taylor 79496e2fad * utils.c (strlen_paddr, paddr, paddr_nz): Use TARGET_ADDR_BIT,
not TARGET_PTR_BIT, since we are dealing with addresses, not
	pointers.
2000-11-15 14:33:50 +00:00
Kevin Buettner 74f832daf0 Protoization. 2000-11-04 00:46:46 +00:00
David Anderson e26cc3490a Corrected spelling errors in comments 2000-10-23 22:49:29 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Michael Snyder cbfbd72afe 2000-06-15 Michael Snyder <msnyder@cygnus.com>
* utils.c: Fix comment typo.
2000-06-15 20:40:29 +00:00
Andrew Cagney ac2e2ef7e2 Add host_pointer_to_address() and address_to_host_pointer(). Add
signed_pointer_to_address() etc.  Rename generic_pointer_to_address()
to unsigned_pointer_to_address() etc.
2000-06-04 13:46:37 +00:00
Andrew Cagney 8e6a3c35b9 Eliminate safe_strsignal(). 2000-06-04 01:58:49 +00:00
Kevin Buettner 507f3c78fb Eliminate PARAMS from function pointer declarations. 2000-06-04 00:41:10 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Andrew Cagney f5ff8c83c8 Add make_cleanup_close() function. 2000-05-23 14:48:13 +00:00
Andrew Cagney 5683e87aa5 Replace preg() with phex(). Cleanup monitor.c. 2000-05-22 02:07:19 +00:00
Andrew Cagney e2f9c47491 Make free_current_contents more robust. Use in MI. 2000-05-16 04:57:49 +00:00
Andrew Cagney 5c65bbb629 Cleanup bfd_close() cleanups. 2000-05-16 02:43:39 +00:00