summaryrefslogtreecommitdiff
path: root/gdb/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* * configure.in: Detect declaration for canonicalize_file_name.Richard Henderson2002-03-151-9/+18
| | | | | | * utils.c (canonicalize_file_name): Declare, if needed. (gdb_realpath): Prefer realpath if available and usable. * config.in, configure: Rebuild.
* Add FIXME explaining include problem.Andrew Cagney2002-03-011-2/+8
|
* 2002-02-27 Rodney Brown <rbrown64@csc.com.au>Rodney Brown2002-02-271-0/+2
| | | | * utils.c (gdb_realpath): Add pathconf fallback for sco3.2v5.
* * utils.c (perror_with_name): Make string parameter constant.Andrew Cagney2002-02-261-3/+3
| | | | | | | | (print_sys_errmsg): Ditto. (query): Ditto. * defs.h (perror_with_name): Update. (print_sys_errmsg): Update. (query): Update.
* * configure.in: (AC_CHECK_FUNCS) Added test forAndrew Cagney2002-02-231-1/+3
| | | | | | | canonicalize_file_name Regenerated. * config.in, configure: Regenerated. * utils.c: (gdb_realpath) If HAVE_CANONICALIZE_FILE_NAME is defined use canonicalize_file_name.
* * defs.h (core_addr_to_string_nz): New function.Keith Seitz2002-02-131-0/+9
| | | | | * utils.c (core_addr_to_string): Use phex instead of phex_nz. (core_addr_to_string_nz): New function.
* * defs.h (throw_exception): Rename return_to_top_level. UpdateAndrew Cagney2002-02-101-3/+3
| | | | | | | | | | | | | | | | comments. * utils.c (error_stream, internal_verror, quit): Ditto. * top.c (throw_exception, catcher): Ditto. * sparclet-rom.c (sparclet_load): Ditto. * remote.c (interrupt_query, minitelnet): Ditto. * remote-sds.c (interrupt_query): Ditto. * remote-mips.c (mips_error, mips_kill): Ditto. * ocd.c (interrupt_query): Ditto. * monitor.c (monitor_interrupt_query): Ditto. * m3-nat.c (suspend_all_threads, thread_resume_command): Ditto. * target.h: Update comment. * m3-nat.c, ocd.c, sparclet-rom.c: Update copyright.
* 2002-02-08 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2002-02-081-5/+9
| | | | | | | | | | | | | | | | | | * utils.c: Include <curses.h> before "bfd.h". * tui/tui-hooks.c: Likewise. * tui/tui.c: Likewise. * tui/tuiCommand.c: Likewise. * tui/tuiData.c: Likewise. * tui/tuiDataWin.c: Likewise. * tui/tuiDisassem.c: Likewise. * tui/tuiGeneralWin.c: Likewise. * tui/tuiIO.c: Likewise. * tui/tuiLayout.c: Likewise. * tui/tuiRegs.c: Likewise. * tui/tuiSource.c: Likewise. * tui/tuiSourceWin.c: Likewise. * tui/tuiStack.c: Likewise. * tui/tuiWin.c: Likewise.
* * cli/cli-decode.c (do_cfunc, set_cmd_cfunc): New functions.Andrew Cagney2002-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (do_sfunc, set_cmd_sfunc): New functions. * command.h (struct cmd_list_element): Add field func. * cli/cli-decode.h (struct cmd_list_element): Ditto. * command.h (set_cmd_sfunc, set_cmd_cfunc): Declare. * cli/cli-decode.h: Ditto. * cli/cli-decode.c (help_cmd): Test for func not cfunc/sfunc. (help_all, help_cmd_list): Ditto. (find_cmd, complete_on_cmdlist): Ditto. * top.c (execute_command): Ditto. * cli/cli-setshow.c (do_setshow_command): Call func instead of function.sfunc. * infcmd.c (notice_args_read): Fix function signature. * cli/cli-cmds.c (init_cli_cmds): Use set_cmd_sfunc. * cli/cli-decode.c (add_set_cmd): Ditto. * utils.c (initialize_utils): Ditto. * maint.c (_initialize_maint_cmds): Ditto. * infrun.c (_initialize_infrun): Ditto. * demangle.c (_initialize_demangler): Ditto. * remote.c (add_packet_config_cmd): Ditto. * mips-tdep.c (_initialize_mips_tdep): Ditto. * cris-tdep.c (_initialize_cris_tdep): Ditto. * proc-api.c (_initialize_proc_api): Ditto. * kod.c (_initialize_kod): Ditto. * valprint.c (_initialize_valprint): Ditto. * top.c (init_main): Ditto. * infcmd.c (_initialize_infcmd): Ditto. * corefile.c (_initialize_core): Ditto. * arm-tdep.c (_initialize_arm_tdep): Ditto. * arch-utils.c (initialize_current_architecture): Ditto. (_initialize_gdbarch_utils): Ditto. * alpha-tdep.c (_initialize_alpha_tdep): Ditto. * cli/cli-decode.c (add_cmd): Use set_cmd_cfunc. * wince.c (_initialize_inftarg): Ditto. * symfile.c (_initialize_symfile): Ditto. * mips-tdep.c (_initialize_mips_tdep): Ditto. * language.c (_initialize_language): Ditto. * arc-tdep.c (_initialize_arc_tdep): Ditto.
* * utils.c (do_write): New function.Andrew Cagney2002-02-021-50/+28
| | | | | | | (error_stream): Rewrite combining the code from error_begin and verror. (verror): Rewrite using error_stream. (error_begin): Delete function.
* * utils.c (error_begin): Make static.Andrew Cagney2002-02-021-1/+1
| | | | | | | | | | | * 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.
* * defs.h (vwarning): Declare.Andrew Cagney2002-01-311-23/+21
| | | | | | | | | | | | (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.
* Eliminate MALLOC_INCOMPATIBLE.Andrew Cagney2002-01-201-2/+0
|
* Use MAXPATHLEN when no PATH_MAX.Andrew Cagney2002-01-201-0/+8
|
* Change behavour of internal-error to quit and dump core by default.Andrew Cagney2002-01-171-14/+15
|
* Remove obsolete MacOS support.Andrew Cagney2002-01-051-14/+2
|
* * configure, config.in: Rebuilt.Tom Tromey2001-12-211-0/+12
| | | | | | | | | | | | | | * 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.
* Eliminate global #include of "mmalloc.h".Andrew Cagney2001-12-061-8/+12
|
* Correctly handle phex(*,0) and phex_nz(*,0).Andrew Cagney2001-11-151-2/+5
|
* * utils.c (phex_nz): For default case, set str to phex_nz returnAndrew Cagney2001-11-151-2/+5
| | | | value.
* * utils.c (internal_verror): Restore calls to abort().Andrew Cagney2001-11-021-3/+3
| | | | Fix PR gdb/219.
* Functions to convert to/from CORE_ADDR and a string. Use in Insight.Andrew Cagney2001-10-171-0/+44
|
* * defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)Andrew Cagney2001-08-011-505/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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).
* * utils.c (init_page_info): Use tui_get_command_dimension.Stephane Carrez2001-07-211-6/+1
| | | | | * printcmd.c (disassemble_command): Simplify tui specific code, use tui_is_window_visible, tui_show_assembly.
* * serial.h (SERIAL_ASYNC): Delete.Andrew Cagney2001-07-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | (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.
* * utils.c (query): Remove tui hacks; tui must use the query_hook.Stephane Carrez2001-07-141-19/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* s/typedef serial_t/struct serial */Andrew Cagney2001-07-111-1/+1
|
* * gdbtypes.h (builtin_type_void_data_ptr): RenameAndrew Cagney2001-07-081-4/+4
| | | | | | | | | | 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.
* * gnu-regex.c: Eliminate obsolete check for _MSC_VER.Christopher Faylor2001-06-101-29/+0
| | | | | | | | | | | | | | | | | | * 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.
* Obsolete MPW as host.Andrew Cagney2001-04-191-12/+12
|
* * defs.h (xfree, mcalloc, mmalloc, mrealloc, mfree, xmmalloc,Andrew Cagney2001-03-231-52/+64
| | | | | | | | | | | | | | | | | | 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.
* malloc() -> xmalloc.Andrew Cagney2001-03-201-0/+3
| | | | Move malloc() decl to utils.c
* Move realoc() decl to utils.c. s/realloc()/xrealloc()/.Andrew Cagney2001-03-201-0/+3
|
* Move free() decl to utils.c.Andrew Cagney2001-03-201-1/+7
|
* Committed.Kevin Buettner2001-03-101-10/+26
|
* * defs.h: Provide prototypes for floatformat_is_negative,Mark Kettenis2001-03-071-0/+101
| | | | | | | | | | | | | 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-06 J.T. Conklin <jtc@redback.com>J.T. Conklin2001-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Update/correct copyright notices.Kevin Buettner2001-03-061-1/+2
|
* Replace calls to abort() with calls to internal_error().Kevin Buettner2001-02-251-6/+6
|
* Add __FILE__ and __LINE__ parameter to internal_error() /Andrew Cagney2001-02-081-13/+21
| | | | internal_verror().
* * sol-thread.c (restore_inferior_pid): Save the PID in a freshlyAndrew Cagney2001-02-071-3/+6
| | | | | | | 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.
* * signals.h: Removed.J.T. Conklin2001-02-061-1/+1
| | | | | | | | | | | | * 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.
* Move putchar_filtered() to utils.c.Andrew Cagney2001-01-311-0/+9
|
* Replace strsave() with xstrdup().Andrew Cagney2001-01-311-10/+1
|
* Replace free() with xfree().Kevin Buettner2000-12-151-15/+25
|
* 2000-12-04 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder2000-12-051-1/+1
| | | | * utils.c (internal_verror): Fix typo in error msg.
* Replace asprintf() / vasprintf() with xasprintf() xvasprintf().Andrew Cagney2000-11-201-12/+31
|
* * utils.c (strlen_paddr, paddr, paddr_nz): Use TARGET_ADDR_BIT,David Taylor2000-11-151-3/+3
| | | | | not TARGET_PTR_BIT, since we are dealing with addresses, not pointers.
* Protoization.Kevin Buettner2000-11-041-15/+9
|
* Corrected spelling errors in commentsDavid Anderson2000-10-231-1/+1
|