* 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.
negative.
(RETURN_MASK): Negate reason.
(catch_exception_ftype): Declare.
(catch_exceptions): Declare.
* top.c (catcher): New function, based on catch_errors. Add in
parameter func_uiout and out parameters func_val, func_caught and
func_cleanup. Change type of func to catch_exceptions_ftype.
Save/restore uiout.
(struct catch_errors_args): Define.
(do_catch_errors): New function.
(catch_errors): Rewrite, use do_catch_errors and catcher.
(catch_exceptions): New function, use catcher.
call to chdir on this symbol rather than on __DJGPP__.
(CANT_FORK) [__MSDOS__]: Move from here...
* defs.h (CANT_FORK) [__MSDOS__]: ...to here.
(GLOBAL_CURDIR) [__MSDOS__]: Define.
* 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.
definitions. Generate an error when both pure multi-arch and
"tm.h".
* gdbarch.h, gdbarch.c: Regenerate.
* defs.h (GDB_MULTI_ARCH_TM): Rewrite definition.
instead of system-specific define's like _WIN32 and __MSDOS__.
Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_P and
ROOTED_P.
(top-level): #include "filenames.h".
* solib.c (solib_open): Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH
instead of SLASH_CHAR, ROOTED_P and SLASH_P.
(top-level): #include "filenames.h".
* defs.h (SLASH_P, SLASH_CHAR, ROOTED_P): Remove definitions.
(SLASH_STRING): Define only for _WIN32.
* completer.c: Use HAVE_DOS_BASED_FILE_SYSTEM instead of
__MSDOS_.
* cli/cli-cmds.c (cd_command): Use IS_DIR_SEPARATOR and
IS_ABSOLUTE_PATH instead of SLASH_P and ROOTED_P. Replace
system-specific ifdefs with HAVE_DOS_BASED_FILE_SYSTEM.
(top-level): #include "filenames.h".
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.
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.
void*.
From Philippe De Muyter <phdm@macqel.be>:
* printcmd.c (print_address_symbolic): Call `make_cleanup' with
`(free_current_contents, &x)', not `(free, x)'.
* utils.c (free_current_contents): Do not `free (NULL)'.
* printcmd.c (print_address_symbolic): Cleanup after a failed
call to build_address_symbolic.
functions which architectures can redefine, defaulting to
generic_pointer_to_address and generic_address_to_pointer.
* findvar.c (extract_typed_address, store_typed_address,
generic_pointer_to_address, generic_address_to_pointer): New
functions.
(POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Provide default
definitions.
(extract_address, store_address): Doc fixes.
* values.c (value_as_pointer): Doc fix.
(value_from_pointer): New function.
* defs.h (extract_typed_address, store_typed_address): New
declarations.
* inferior.h (generic_address_to_pointer,
generic_pointer_to_address): New declarations.
* value.h (value_from_pointer): New declaration.
* ax-gdb.c (const_var_ref): Use value_from_pointer, not
value_from_longest.
* blockframe.c (generic_push_dummy_frame): Use read_pc and
read_sp, not read_register.
* c-valprint.c (c_val_print): Use extract_typed_address instead of
extract_address to extract vtable entries and references.
* cp-valprint.c (cp_print_value_fields): Use value_from_pointer
instead of value_from_longest to extract the vtable's address.
* eval.c (evaluate_subexp_standard): Use value_from_pointer
instead of value_from_longest to compute `this', and for doing
pointer-to-member dereferencing.
* findvar.c (read_register): Use extract_unsigned_integer, not
extract_address.
(read_var_value): Use store_typed_address instead of store_address
for building label values.
(locate_var_value): Use value_from_pointer instead of
value_from_longest.
* hppa-tdep.c (find_stub_with_shl_get): Use value_from_pointer,
instead of value_from_longest, to build arguments to __d_shl_get.
* printcmd.c (set_next_address): Use value_from_pointer, not
value_from_longest.
(x_command): Use value_from_pointer, not value_from_longest.
* tracepoint.c (set_traceframe_context): Use value_from_pointer,
not value_from_longest.
* valarith.c (value_add, value_sub): Use value_from_pointer, not
value_from_longest.
* valops.c (find_function_in_inferior, value_coerce_array,
value_coerce_function, value_addr, hand_function_call): Same.
* value.h (COERCE_REF): Use unpack_pointer, not unpack_long.
* values.c (unpack_long): Use extract_typed_address to produce
addresses from pointers and references, not extract_address.
(value_from_longest): Use store_typed_address instead of
store_address to produce pointer and reference values.
* defs.h (struct continuation_arg): make 'data' a union, to avoid
casting problems when int and pointer are not the same size.
* event-top.c (command_handler): use data as a union.
(command_line_handler_continuation): ditto.
* infcmd.c (step_1_continuation): use data as a union. Re-indent.
(step_once): ditto. (finish_command_continuation): ditto.
(finish_command): ditto.
* breakpoint.c (until_break_command): use data as a union.
(until_break_command_continuation): ditto.
* utils.c (add_intermediate_continuation): fix typo in comment.
* defs.h (struct continuation_arg): Change type of field 'data'
from PTR to void *.
* event-loop.h: Eliminate uses of PTR, use 'void *' instead.
* event-top.c: Ditto.
(error_return, quit_return): Merge into catch_return pointer.
(return_to_top_level): Update comment. Longjmp to *catch_errors,
and communicate reason to catch_errors via setjmp return value.
(catch_errors): Always catch both quit and error, and if a catch
wasn't requested by caller, throw it to the next catch_error.
Replace dual longjmp buffer memcpy with single pointer change.
Add FIXME for possibly adding new interface to tell caller what
event was caught. Add extensive comments.
* defs.h (enum return_reason): Reserve 0 for use as initial
setjmp() return value.
(RETURN_MASK): New public macro to generate RETURN_MASK_* from
enum return_reason.
(RETURN_MASK_QUIT, RETURN_MASK_ERROR): Define using RETURN_MASK.