diff options
-rw-r--r-- | gdb/ChangeLog | 2605 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 1194 | ||||
-rw-r--r-- | gdb/config/mips/tm-mips.h | 7 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 12 | ||||
-rw-r--r-- | gdb/elfread.c | 4 |
5 files changed, 3687 insertions, 135 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ba0b361..b0fe0be 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,2608 @@ +Tue Sep 1 12:04:57 EDT 1998 Zdenek Radouch (radouch@cygnus.com) + + Changes to support/fix ARM/ELF port. Use MAKE_MSYMBOL_SPECIAL for + both ELF and COFF; + * elfread.c (elf_symtab_read): use ELF specific macro + * coffread.c (coff_symtab_read): use COFF_MAKE_MSYMBOL_SPECIAL() + * arm-tdep.c: separate COFF and ELF thumb processing + disable --mapcs-float processing + * dwarf2read.c: Disabled building of minimal symbols + * config/arm/tm-arm.h: new macros for distinguishing arm/thumb + * config/mips/tm-mips.h: use ELF specific macro + +Tue Aug 25 13:21:58 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * ax-gdb.c (gen_var_ref): Allow for typedef types. + (gen_cast, gen_bitfield_ref, gen_expr, gen_deref): ditto. + +Mon Aug 24 18:29:03 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * tracepoint.c (collect_symbol): Handle register doubles that + are stored in two registers. + +Mon Aug 24 14:39:08 1998 Mark Alexander <marka@cygnus.com> + + * sh-stub.c (undoSStep): Improve comment. + * sparc-tdep.c (sparc_extract_struct_value_address): Simplify to use + same method on both 32-bit and 64-bit machines. + * sparcl-tdep.c (sparclite_check_watch_resources): Simulator doesn't + support hardware breakpoints. + * config/sparc/tm-sparc.h (CALL_DUMMY): Improve comments. + +1998-08-20 Jason Molenda (jsm@bugshack.cygnus.com) + + * rdi-share/Makefile.am (INCLUDES): Fix typeo. + * rdi-share/Makefile.in: Regenerated. + +1998-08-19 Jason Molenda (jsm@bugshack.cygnus.com) + + * rdi-share/Makefile.am: Use just `INCLUDES' not `libname_INCLUDES'. + * rdi-share/Makefile.in: Regenerated. + +1998-08-19 Keith Seitz <keiths@cygnus.com> + + * v850ice.c (v850ice_stop): New function to stop the ICE. + (v850ice_load) Pass filename to ICE DLL. + (ice_stepi, ice_nexti, ice_cont): Do not directly call the gdb + commands -- let the GUI do it so that it can retain control + of the display. + +Wed Aug 19 15:53:52 1998 Anthony Green <green@hoser.cygnus.com> + + * i386v4-nat.c: Include sys/reg.h if present. + +Wed Aug 19 03:07:53 1998 Richard Henderson <rth@cygnus.com> + + * config/alpha/alpha-linux (XDEPFILES): Build ser-tcp. + +1998-08-18 Fernando Nasser <fnasser@totem.to.cygnus.com> + + * symtab.c (decode_line_1): For minimal symbol, SKIP_PROLOG to + make sure we stop after the frame pointer is locaded and backtrace + prints an accurate stack. Complements changes made on Mon Jul 27 + 10:45:56 1998 + (decode_line_2): Replaced the whitespace after ">" in a prompt + which has been taken away by changes made on Sun Jul 19 02:11:45 + 1998 + +1998-08-18 Keith Seitz <keiths@cygnus.com> + + * stack.c: Define new hook, selected_frame_level_changed_hook, which + will be called whenever the selected stack level changes. + (select_frame): Call the selected_frame_level_changed_hook. + +Tue Aug 18 18:03:42 1998 Stan Shebs <shebs@andros.cygnus.com> + + * remote-rdi.c (arm_rdi_open): Pass serial device name to + Adp_OpenDevice, and include it in error reports. + +1998-08-18 Jason Molenda (jsm@bugshack.cygnus.com) + + * configure.in: Add more header files to AC_CHECK_HEADERS. + * configure: Regenerated. + + * command.c: Include wait.h or sys/wait.h if present. + * inftarg.c: Ditto. + * core-aout.c: Include ptrace.h or sys/ptrace.h if present, based + on autoconf test. + * infptrace.c: Ditto. + + * expprint.c: Include ctype.h for isprint prototype. + * i386aix-nat.c: Include sys/reg.h if autoconf says it is present. + * i386v-nat.c: Include ptrace.h, sys/ptrace.h, and sys/reg.h if + present, based on autoconf test. + + * utils.c: Include curses.h and term.h if present. + (puts_debug): Change 'carriage_return' local variable to return_p + to avoid name clash. + + * config/m68k/nm-apollo68b.h: Don't define PTRACE_IN_WRONG_PLACE, + determine it with autoconf. + * config/i386/nm-linux.h: Don't define NO_SYS_REG_H, determine it + with autoconf. + * config/i386/nm-i386sco.h: Don't define NO_PTRACE_H, determine it + with autoconf. + * config/i386/nm-i386v.h: Ditto. + * config/i386/nm-symmetry.h: Ditto. + * config/m88k/xm-cxux.h: Ditto. + * config/m88k/xm-dgux.h: Ditto. + + * config/m68k/delta68.mh (NAT_FILE): nm-delta68.h no longer necessary. + * config/m68k/nm-delta68.h: Removed. + +Fri Aug 14 11:14:03 1998 Jeffrey A Law (law@cygnus.com) + + * mn10300-tdep.c (set_movm_offsets): Change second argument to + be the actual args to movm itself. All callers changed. Only set + fi->fsr.regs[x] if reg X is saved by the movm instruction. + +Fri Aug 14 04:18:23 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de> + + * sol-thread.c (lwp_to_thread): Fix error message for failing + td_ta_map_lwp2thr call. + (ps_lgetLDT): Mask off upper bits in GS register when comparing + with selector. + +Wed Aug 12 16:30:01 1998 Frank Ch. Eigler <fche@cygnus.com> + + * remote-sim.c (simulator_command): Reset register cache after + simulator command. + +Wed Aug 12 09:00:26 1998 Stu Grossman <grossman@babylon-5.cygnus.com> + + * expprint.c (dump_prefix/postfix_expression): Don't try to print type + expressions. + +Tue Aug 11 11:33:25 1998 Stu Grossman <grossman@babylon-5.cygnus.com> + + * c-typeprint.c (c_print_type): Don't crash if varstring is null. + * expprint.c expression.h (dump_expression): Rename to + dump_prefix_expression. + * Print out the expression in normal form. Call print_longest + instead of trying to do it ourselves. + * (dump_postfix_expression): New function, prints out the expression + with indentation and better formatting and interpretation. + * parse.c (parse_exp_1): Put calls to dump expressions under ifdef + MAINTENANCE_CMDS and expressiondebug variable. + +Thu Aug 6 13:20:02 1998 Ron Unrau <runrau@cygnus.com> + + * infrun.c (wait_for_inferior): use stop_func_name instead of + stop_func_start to decide that no debug info exists. + +start-sanitize-sky +Thu Aug 6 13:15:05 1998 Ron Unrau <runrau@cygnus.com> + + * txvu-tdep.c: add VU0/1 control registers + * config/mips/tm-txvu.h: ditto + +Tue Aug 4 11:02:50 1998 Ron Unrau <runrau@cygnus.com> + + * txvu-tdep.c (txvu_insert_breakpoint): make sure CPU context is + set to correct VU memory space. + (txvu_remove_breakpoint): use this instead of txvu_breakpoint_from_pc + * config/tm-txvu.h: use new track-table address + Do note define BREAKPOINT_FROM_PC anymore + +Fri Jul 31 16:06:05 1998 Ron Unrau <runrau@cygnus.com> + + * config/tm-txvu.h: use NUM_CORE_REGS instead of NUM_R5900_REGS + * mips-tdep.c: use NUM_CORE_REGS + * txvu-tdep.c: use NUM_CORE_REGS, add function prototypes + (txvu_insert_breakpoints): use VIF interrupt bit + +end-sanitize-sky +Thu Jul 30 13:53:50 1998 Mark Alexander <marka@cygnus.com> + + * mips-tdep.c (mask_address_p): New variable. + (mips_addr_bits_remove): Test mask_address_p to decide whether + to mask off the upper 32 bits of addresses. + (_initialize_mips_tdep): Add command to set mask_address_p. + (mips_call_dummy_address): New function. + * config/mips/tm-mips.h (CALL_DUMMY_ADDRESS): Redefine to + call mips_call_dummy_address. + +1998-07-29 Fernando Nasser <fnasser@totem.to.cygnus.com> + + * symfile.c (add_symbol_file_command): Test for the from_tty + parameter and avoid query when not interactive. + +start-sanitize-am33 +Wed Jul 29 10:39:29 1998 Jeffrey A Law (law@cygnus.com) + + * mn10300-tdep.c (set_movm_offsets): Do nothing for the am33 + registers if we are not in am33 mode. + (mn10300_frame_chain, mn10300_frame_saved_pc): Similarly. + (set_machine_hook): Keep track of whether or not we're in am33 mode. + +end-sanitize-am33 +Mon Jul 27 16:11:42 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * tracepoint.c (remote_set_transparent_ranges): new function. + Send the start and end addresses of all loadable read-only + sections down to the trace target, so that it can treat them + as "transparent" (ie. don't care if they were collected or not). + +Mon Jul 27 15:38:07 1998 Mark Alexander <marka@cygnus.com> + + * mn10300-tdep.c (mn10300_analyze_prologue): Undo previous fix + for setting frame address in optimized code; made unnecessary + by compiler fixes. + +Mon Jul 27 10:45:56 1998 Martin M. Hunt <hunt@cygnus.com> + + * symtab.c (decode_line_1): For minimal symbol, call + find_pc_sect_line() to make sure the line number gets set + properly. + (print_symbol_info): Redeclare function void. + +1998-07-27 Jason Molenda (jsm@bugshack.cygnus.com) + + * config/d10v/tm-d10v.h (REGISTER_NAMES): sp -> r15. The + stack pointer et al are synthesized from the SP_REGNUM (etc) + defines and should not be mentioned in REGISTER_NAMES. + +start-sanitize-am33 +Mon Jul 27 08:54:41 1998 Jeffrey A Law (law@cygnus.com) + + * mn10300-tdep.c (mn10300_frame_chain): Account for space saved + by am33 register saves. + (mn10300_frame_saved_pc): Similarly. + +end-sanitize-am33 +Fri Jul 24 14:41:19 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * tracepoint.c (encode_actions): Treat register names and simple + variable names as special cases and don't convert them to byte- + codes: these things can be collected far more efficiently + without invoking the bytecode interpreter. + +Fri Jul 24 13:32:46 1998 Mark Alexander <marka@cygnus.com> + + * config/i386/tm-i386.h (STORE_STRUCT_RETURN): Make it + work on hosts of any endianness. + * config/i386/tm-i386v.h: Ditto. + +Fri Jul 24 07:41:12 1998 Mark Alexander <marka@cygnus.com> + + * mn10300-tdep.c (set_movm_offsets): New helper function + for mn10300_analyze_prologue. + (mn10300_analyze_prologue): Simplify by factoring out common code. + Fix bugs in setting frame address for optimized code. + Use read_memory_nobpt instead of target_read_memory. + +Thu Jul 23 17:01:17 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * tracepoint.c (collect_symbol): handle LOC_ARG case. + +Thu Jul 23 15:07:40 1998 Dawn Perchik <dawn@cygnus.com> + + * sparc-tdep.c (sparc_init_extra_frame_info): Recognize when we're + in a function prologue before the SAVE instruction. + (sparc_frame_saved_pc): Ditto. + * config/sparc/tm-sparc.h (EXTRA_FRAME_INFO): Add in_prologue flag. + +Thu Jul 23 14:58:09 1998 Dawn Perchik <dawn@cygnus.com> + + * i386-tdep.c (i386_get_frame_setup): Recognize function + prologues in code compiled with -fcheck-stack. + +Thu Jul 23 14:49:27 1998 Dawn Perchik <dawn@cygnus.com> + + * remote-mips.c (remote_mips_insert_hw_breakpoint, + remote_mips_remove_hw_breakpoint): New functions for hardware + breakpoints on LSI targets. + * config/mips/tm-embed.h (target_remove_hw_breakpoint, + target_insert_hw_breakpoint): Define to call + remote_mips_insert_hw_breakpoint and remote_mips_remove_hw_breakpoint, + respectively. + +start-sanitize-sky +Thu Jul 23 13:00:28 1998 Ian Carmichael <iancarm@cygnus.com> + + * txvu-tdep.c: (VU0_MEM0_WINDOW_START, VU1_MEM0_WINDOW_START) + Changed to use addresses in kseg1 range. + +end-sanitize-sky +1998-07-21 Fernando Nasser <fnasser@totem.to.cygnus.com> + + * source.c (print_source_lines): Print "No such file or directory" + just once. + (directory_command): same as above; resets if user issues dir. + +Sun Jul 19 02:11:45 1998 Martin M. Hunt <hunt@cygnus.com> + + * symtab.c (decode_line_2): Instead of printing a prompt + and calling command_line_input() without a prompt, just + call it with the proper args. This makes the GUI work too. + +Fri Jul 17 9:26:50 1998 Ron Unrau <runrau@cygnus.com> + + * blockframe.c (find_pc_sect_partial_function): allow for the possi- + bility of multiple symbols at the same address when finding high. + * breakpoint.c (resolve_sal_pc): if the function based section lookup + fails, try getting the section from the minimal symbol table. + * parse.c (write_exp_msymbol): use symbol_overlayed_address to get + the LMA of a minimal symbol if unmapped. + * symtab.c (find_line_symtab): change interface to return symtab + containing the best linetable found. + (decode_line_1): use find_line_symtab to set val.symtab. This should + improve support for source files with multiple symtabs. +start-sanitize-sky + * tm-txvu.h: include tm-mips64.h instead of starting from scratch. +end-sanitize-sky + +Wed Jul 15 11:51:33 1998 Keith Seitz <keiths@cygnus.com> + + * main.c (main): Fix violations of GNU coding standard. + + * breakpoint.c: Export delete_command. + + * infcmd.c: Export continue_command, stepi_command, and nexti_command. + + * Makefile.in: Add target for v850ice.o. + + * configure.tgt: Add cygwin32 dependencies for v850 ice. + +Wed Jul 15 10:58:29 1998 Nick Clifton <nickc@cygnus.com> + + * tracepoint.c (set_raw_tracepoint): Cope with symbols that do not + have an associated directory. + +Mon Jul 13 15:21:04 1998 Mark Alexander <marka@cygnus.com> + + * utils.c (puts_debug): Display non-printable characters in hex + instead of octal. + +Thu Jul 9 16:16:47 1998 Jeffrey A Law (law@cygnus.com) + + * mn10300-tdep.c (mn10300_generic_register_names): New variable. + (set_machine_hook): New function. Copy the appropriate register + names into reg_names. + (_initialize_mn10300_tdep): Set up to call set_machine_hook. + * tm-mn10300 (NUM_REGS): Bump to 32. + (REGISTER_NAMES): Updated accordingly. + +start-sanitize-am33 + * mn10300-tdep.c (am33_register_names): New variable. + (mn10300_analyze_prologue): Handle regs saved by am33 prologues. + * tm-mn10300.h (E0_REGNUM): Define. +end-sanitize-am33 + +Tue Jul 7 7:40:13 1998 Ron Unrau <runrau@cygnus.com> + + * symtab.c (find_pc_sect_psymbol): allow case where textlow is 0 + +Thu Jul 2 15:57:58 1998 Frank Ch. Eigler <fche@cygnus.com> + + * breakpoint.c (resolve_sal_pc): Accept absence of innermost + Lexical block for breakpoint resolution. + +Thu Jul 2 10:22:00 1998 Dawn Perchik <dawn@cygnus.com> + + * mdebugread.c (parse_partial_symbols): Go ahead and read the .mdebug + section, but just don't add a 2nd minimal symbol if this is an .mdebug + section in an ELF file. + +1998-07-01 Jim Blandy <jimb@zwingli.cygnus.com> + + * Makefile.in (ax-general.o): Depend on $(defs_h) too. + (ax_h): Bother to define this. + +Mon Jun 29 19:01:18 1998 Jim Wilson <wilson@cygnus.com> + + * gnu-regex.c (re_comp): Add cast to char * before gettext calls. + +Sun Jun 28 11:35:48 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de> + + Improve support for SunPro F77. + * dbxread.c (end_psymtab, process_one_symbol): Handle minimal + symbols with trailing underscore names. + * minsyms.c (find_stab_function_addr): Ditto. + * dbxread.c (process_one_symbol): Ignore N_ALIAS for now. + * partial-stab.h (case N_ALIAS): Ditto. + * stabsread.c (read_sun_builtin_type): Handle boolean types. + +Fri Jun 26 14:03:01 1998 Keith Seitz <keiths@cygnus.com> + + * symtab.h (enum namespace): Add new namespaces FUNCTIONS_NAMESPACE, + TYPES_NAMESPACE, METHODS_NAMESPACE, and VARIABLES_NAMESPACE used by + new search_symbols. + Add prototype for search_symbols and free_search_symbols. + + * symtab.c (list_symbols): Rewrite to use new search_symbols. + (file_matches): New helper function for search_symbols. + (free_search_symbols): New function which frees data returned from + search_symbols. + (print_symbol_info): New helper function which prints info about a + matched symbol to stdout. Extracted from old list_symbols. + (print_msymbol_info): New helper function which prints info about + a matched msymbol to stdout. Extracted from old list_symbols. + (symtab_symbol_info): Extracted from old list_symbols. + (variables_info): Use symtab_symbol_info. + (functions_info): Use symtab_symbol_info. + (types_info): Use symtab_symbol_info. + (rbreak_command): Rewrite to use new search_symbols. + +Thu Jun 25 22:38:32 1998 Frank Ch. Eigler <fche@cygnus.com> + + * mips-tdep.c (mips_push_arguments): Use 128-bit stack frame + alignment for inferior calls. + +Wed Jun 24 23:17:12 1998 Mark Alexander <marka@cygnus.com> + + * mn10200-tdep.c (mn10200_analyze_prologue): Fix calculation + of jsr target address. + +Tue Jun 23 19:37:46 1998 Mark Alexander <marka@cygnus.com> + + * config/mn10200/tm-mn10200.h (SAVED_PC_AFTER_CALL): Don't + zero upper byte of address. + +Tue Jun 23 17:32:26 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * rs6000-tdep.c (pop_dummy_frame): use memcpy. + (push_arguments): use memset. + (various other places): fix up indentation and long lines. + +Tue Jun 23 11:58:35 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * configure.in: s/lXext/-lXext/ for Jillian's change. + +Tue Jun 23 11:14:04 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * source.c (find_source_lines): fix indentation. + + * config/mips/tm-irix5.h: Modify to work better on irix 6, by + making FP registers 8 bytes instead of 4. + REGISTER_BYTES: redefine. REGISTER_BYTE(): redefine. + REGISTER_VIRTUAL_TYPE: redefine. MIPS_LAST_ARG_REGNUM: redefine. + * irix5-nat.c (fetch_core_registers): read 8 bytes per FP register. + * mips-tdep.c (FP_REGISTER_DOUBLE): new macro to distinguish + targets with 8-byte FP registers (don't use TARGET_MIPS64). + (STACK_ARGSIZE): new macro, how much space is taken up on the + stack for each function argument (don't use TARGET_MIPS64). + (mips_push_arguments): modify logic to work better on Irix 6 + (n32 ABI). + +Tue Jun 23 12:29:53 1998 Jillian Ye <jillian@cygnus.com> + + * configure.in: Add -lXext to mips_extra_libs + * configure: Regenerated. + +Sun Jun 21 09:31:12 1998 Ron Unrau (runrau@cygnus.com) + + * symtab.c (find_line_pc): assumed that a PC of 0 is illegal. + Changed to pass PC as arg and return 1 if valid (0 otherwise). + symtab.h: change prototype to match + symtab.c (find_line_pc_range): use new interface + breakpoint.c (resolve_sal_pc): ditto + gdbtk.c (gdb_set_bp): ditto + +Wed Jun 17 15:50:00 1998 Ron Unrau (runrau@cygnus.com) + + * parse.c (target_map_name_to_register): Check target specific + aliases *first* so that it can over-ride architectural names + +Wed Jun 17 17:13:38 1998 Said Ziouani (saidz@park-street.cygnus.com) + + * remote-sds.c (sds_start_remote): Fix printf call. + +Tue Jun 16 16:32:08 1998 Mark Alexander <marka@cygnus.com> + + * mn10200-tdep.c (mn10200_analyze_prologue): Fix null pointer + crash when in "start". + +Tue Jun 16 14:38:40 1998 Ron Unrau (runrau@cygnus.com) + + * dbxread.c: reset function_start_offset after a finishing N_FUN + is seen. + * remote-sim.c: allow TARGET_REDEFINE_DEFAULT_OPS to override + target vectors as needed. + +Sun Jun 14 08:46:25 1998 Ron Unrau (runrau@cygnus.com) + + * partial-stab.h: 'F' and 'f' type N_FUN psymbols should pass + CUR_SYMBOL_VALUE as CORE_ADDR instead of long + * buildsym.[ch]: export pending_blocks list + +Sat Jun 13 13:02:32 1998 Dawn Perchik (dawn@cygnus.com) + + * remote.c : Fix remote help string to match that of help.exp. + +Fri Jun 12 14:22:55 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * configure.in (LIBS): Add -lw to the list of libraries if needed. + +Thu Jun 11 15:05:10 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * btowc.c: Removed. + * configure.in: Don't see if we need to replace btowc(). + * Makefile.in: Don't include LIBOBJS. + * configure: Regenerated. + * gnu-regex.c (regex_compile): Only support i18n [:foo:] if + we have btowc(). + +Wed Jun 10 15:39:14 1998 Stu Grossman <grossman@babylon-5.cygnus.com> + + * c-exp.y: Fix problems with parsing "'foo.bar'::func". Some languages + allow symbols with dots. + + * gdbtypes.c (check_stub_method): Cosmetic. Use more descriptive + names for parameters. + +start-sanitize-java + * jv-exp.y: Parser now accepts primitive types. + * (parse_number): Use correct ifdef for scanf long double support. + * jv-lang.c (java_array_type): Initial cut at array support. + +end-sanitize-java + * language.c language.h (set_language): Now returns previous language. + + * symtab.c (find_methods): Make static. Cosmetic changes, including + indentation, and adding descriptive comments. Move local variable defs + into the block they are used in. + * Don't call check_stub_method any more. Use gdb_mangle_name to + generate the full method name. find_method doesn't need all the other + goobldegook that check_stub_method does. + * (gdb_mangle_name): Use more descriptive names for parameters. Fix + comment. +start-sanitize-java + * (lookup_partial_symbol lookup_block_symbol): Check for java to + ensure we can find mangled names. +end-sanitize-java + * (decode_line_1): Move local variable defs into the block they are + used in. (Improves code readability.) + +Wed Jun 10 18:04:35 1998 Frank Ch. Eigler <fche@cygnus.com> + + * gdbtypes.c (get_discrete_bounds): Assign unsigned type flag for + all-positive enum. + (create_set_type): Ditto for all-positive set values. + * values.c (unpack_field_as_long): Check for typedef in struct + field unpacking. + +Wed Jun 10 14:06:05 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * configure.in: Add some tests for gnu-regex.c's benefit. + See if btowc() function is provided in C library. + * configure, config.in: Regenerated. + * Makefile.in (CLIBS, CDEPS): Add @LIBOBJS@ to build btowc.c + if necessary. + * btowc.c: New file. + + * gnu-regex.c: Reorder wchar.h and wctype.h includes for Solaris' + benefit. + Drop namespace preserving defines for now. + +Wed Jun 10 11:53:42 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * gnu-regex.c: Include "gnu-regex.h", not "regex.h". + +Wed Jun 10 11:34:07 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * gnu-regex.c, gnu-regex.h: Change LGPL license to GPL license + to stay consistent with the rest of GDB. + +Wed Jun 10 11:27:39 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * gnu-regex.c, gnu-regex.h: Update to current FSF (glibc) versions. + +Wed Jun 10 10:58:18 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * printcmd.c (disassemble_command): move overlay mapping code + "up" into find_pc_partial_function. + * blockframe.c (find_pc_partial_function): adjust start address + and end address for overlays (mapped vs. unmapped addresses), + so that all callers of this function may benefit. + * m32r-tdep.c (m32r_skip_prologue): adjust indentation. + +Mon Jun 8 16:08:10 1998 Ron Unrau <runrau@cygnus.com> + + * objfiles.c (add_to_objfile_sections): All targets to define + TARGET_KEEP_SECTION to permit them to retain bfd sections that + GDB would otherwise have discarded. + +Fri Jun 5 13:56:19 1998 Doug Evans <devans@canuck.cygnus.com> + + * dbxread.c (read_dbx_symtab): Don't lower texthigh for last psymtab. + +Thu Jun 4 18:35:04 1998 Stan Shebs <shebs@andros.cygnus.com> + + * remote.c (init_extended_remote_ops): Make extended_remote_ops + by copying from remote_ops, move it and init_remote_ops to + usual place at end of file, remove "void" from arg lists. + +Thu Jun 4 17:51:06 1998 Mark Alexander <marka@cygnus.com> + + * sparc-tdep.c (sparc_fix_call_dummy): Byte-swap the call dummy + on bi-endian machines. + (sparc_extract_return_value): Handle values smaller than int on + machines with little-endian data. + (sparc_target_architecture_hook): Set bi_endian flag. + +Thu Jun 4 12:14:48 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * printcmd.c (disassemble_command): Fix off-by-one error for + disassembling functions in unmapped overlay sections. + +Thu Jun 4 10:15:03 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com> + + * remote.c: merged. + + - Jim Blandy <jimb@zwingli.cygnus.com> + (print_packet, remote_packet_command): New functions. + (_initialize_remote): Register the remote-packet command. + - David Taylor <taylor@texas.cygnus.com> + (_initialize_remote): remote-compare is now + compare-sections. + - Elena Zannoni <ezannoni@kwikemart.cygnus.com> + (remote_compare_command): added warning, issued in case + of mismatch only. + +Thu Jun 4 08:25:38 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * remote.c (remote_compare_command): New function, new command. + Compare object file binary image with corresponding memory on + remote target. Report differences. + +Tue Jun 2 19:05:04 1998 Mark Alexander <marka@cygnus.com> + + * sparc-tdep.c (sparc_target_architecture_hook): Set target + byte order only when it's selectable. + +Tue Jun 2 02:01:56 1998 Mark Alexander <marka@cygnus.com> + + * sparc-tdep.c (sparc_target_architecture_hook): New function to + set endianness based on machine type. + (_initialize_sparc_tdep): Initialize target_architecture_hook. + (sparc_print_register_hook): Print PSR and FPSR in fancy format + on 32-bit machines. + * config/sparc/tm-sparc.h (PRINT_REGISTER_HOOK): Redefine to + call sparc_print_register_hook instead of using inline code. + * config/sparc/tm-sp64.h (PRINT_REGISTER_HOOK): Remove. + +Thu May 28 17:19:14 1998 Keith Seitz <keiths@cygnus.com> + + * main.c (main): Check for NULL from getenv on CYGWIN32. + +Thu May 28 09:41:44 1998 Nick Clifton <nickc@cygnus.com> + + * monitor.c (monitor_vsprintf): Handle %%. Patch courtesy of + Felix Lee (flee@cygnus.com) + +Thu May 28 00:27:35 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de> + + * mips-tdep.c (mips_push_dummy_frame): Fix calculation of + PROC_REG_OFFSET and PROC_FREG_OFFSET. + +Mon Apr 27 14:37:49 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * config/v850/tm-v850.h (REGISTER_BYTE): FP_REGNUM and + FP_RAW_REGNUM use the same register location. + + * v850-tdep.c (v850_scan_prologue): Use FP_RAW_REGNUM instead of + FP_REGNUM. + (v850_frame_chain): Ditto. + + * config/v850/tm-v850.h (REGISTER_NAMES): Add "fp". + (NUM_REGS): Update. + (FP_REGNUM): Update. + (FP_RAW_REGNUM): Define. + +Wed May 27 14:22:31 1998 Keith Seitz <keiths@cygnus.com> + + * main.c (main): Convert the path returned from getenv to a posix + path on cygwin32 hosts. + +Mon May 25 13:31:27 1998 Keith Seitz <keiths@cygnus.com> + + * remote.c (remote_open_1): If an error occurs starting the remote, + pop the target AND return. + +Sat May 23 02:23:09 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de> + + * dwarf2read.c (read_subroutine_type): Set TYPE_FLAG_PROTOTYPED + on C++ functions. + * valops.c (value_arg_coerce): Add new argument to indicate whether + the function has a prototype, handle integer and float promotions + accordingly. + (call_function_by_hand): Always call value_arg_coerce, pass down + prototype information. + +Fri May 22 10:56:36 1998 John Metzler <jmetzler@cygnus.com> + + * remote.c (_initialize_remote): Typo extended__remote + +Thu May 21 13:14:25 1998 John Metzler <jmetzler@cygnus.com> + + * gnu-nat.c (init_gnu_ops): Initialization of target ops by assignment. + (_initialize_gnu_nat): Call new init + * mac-nat.c (init_child_ops): Ditto. + (_initialize_mac_nat): Ditto. + * monitor.c (init_base_monitor_ops): Ditto. + (_initialize_remote_monitors): Ditto. + * ppc-bdm.c (init_bdm_ppc_ops): Ditto. + (_initialize_bdm_ppc): Ditto. + * remote-adapt.c (init_adapt_ops): Ditto. + (_initialize_remote_adapt): Ditto. + * remote-array.c (init_array_ops): Ditto. + (_initialize_array): Ditto. + * remote-bug (init_bug_ops): Ditto. + (_initialize_remote_bug): Ditto. + * remote-e7000.c (init_e7000_ops): Ditto. + (_initialize_remote_e7000): Ditto. + * remote-eb.c (init_eb_ops): Ditto. + (_initialize_remote_eb): Ditto. + * remote-es.c (init_es1800_ops): Ditto. + (init_es1800_child_ops): Ditto. + (_initialize_es1800): Ditto. + * remote-hms.c (init_hms_ops): Ditto. + (_initialize_remote_hms): Ditto. + * remote-mm.c (init_mm_ops): Ditto. + (_initialize_remote_mm): Ditto. + * remote-nindy.c (init_nindy_ops): Ditto. + (_initialize_nindy): Ditto. + * remote_nrom.c (init_nrom_ops): Ditto. + (_initialize_remote_nrom): Ditto. + * remote-os9k (init_rombug_ops): Ditto. + (_initialize_remote_os9k): Ditto. + * remote-rdi.c (init_rdi_ops): Ditto. + (_initialize_remote_rdi): Ditto. + * remote-rdp.c (init_remote_rdp_ops): Ditto. + (_initialize_remote_rdp): Ditto. + * remote-sds.c (init_sds_ops): Ditto. + (_initialize_remote_sds): Ditto. + * remote-sim.c (init_gdbsim_ops): Ditto. + (_initialize_remote_sim): Ditto. + * remote-st.c (init_st2000_ops): Ditto. + (_initialize_remote_st2000): Ditto. + * remote-udi.c (init_udi_ops): Ditto. + (_initialize_remote_udi): Ditto. + * remote-vx.c (init_vx_ops): Ditto. + (init_vx_run_ops): Ditto. + (_initialize_vx): Ditto. + * remote.c (init_remote_ops): Ditto. + (init_extended_remote_ops): Ditto. + (_initialize_remote): Ditto. + * sparcl-tdep.c (init_sparclite_ops): Ditto. + (_initialize_sparcl_tdep): Ditto. + * v850ice.c (init_850ice_ops): Ditto. + (_initialize_v850ice): Ditto. + * win32-nat.c: (init_child_ops): Ditto. + (_initialize_inftarg): Ditto. + +1998-05-21 Jim Blandy <jimb@zwingli.cygnus.com> + + * ax-gdb.c (const_var_ref): Don't handle function names. I don't + want to implement all the "usual unary conversion" rules for + constants. + (gen_usual_unary): Turn "function" values into "pointer to + function" values, in accordance with ANSI. + (gen_deref): Don't do the usual unary conversions here. Let the + caller do it. Note that dereferencing a function pointer yields + a function designator, which we call an rvalue, not an lvalue. + (gen_address_of): Handle functions specially. + (gen_struct_ref): Perform the usual unary conversions before + calling gen_deref. + (gen_expr): In case for the prefix '*' operator, call + gen_usual_unary manually. + +Wed May 20 15:29:41 1998 Gavin Koch <gavin@cygnus.com> + + * mips/tm-tx39.h (MIPS_DEFAULT_FPU_TYPE): Defined as MIPS_FPU_NONE. + * mips/tm-tx39l.h: Same. + +Wed May 20 10:12:11 1998 John Metzler <jmetzler@cygnus.com> + + * m32r-tdep.c: (decode_prologue): Handle frames compiled with -Os. + Split out as separate function called by skip prologue and scan + prologue. new formula handles optimization in which the prologue + is interleaved with the body of the function. Also recognizes new + variations of prologue encoding. Use of frame pointer is + essential to debugging, -fno-omit-frame-pointer + (m32r_skip_prologue): Call decode prologue, ignore line info + (m32r_scan_prologue): Call decode prologue, ignore line info. + +Tue May 19 17:23:54 1998 John Metzler <jmetzler@cygnus.com> + + * w89k-rom.c (_initialize_w89k): Call new init function + (init_w89k_cmds): Convert to dynamic initialization of monitor_ops + data structure for forward compatability with additions to the + data structure. + * dbug-rom.c (_initialize_dbug_rom): ditto + (init_dbug_cmds): ditto + * m32r-rom.c (_initialize_m32r_rom): ditto + (init_m32r_cmds): ditto + +Tue May 19 14:54:11 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * tracepoint.c (memrange_cmp): use const void * args to avoid + ANSI compiler warnings. + +1998-05-19 Jim Blandy <jimb@zwingli.cygnus.com> + + * ax-gdb.c (gen_fetch, gen_var_ref, gen_deref, find_field, + gen_bitfield_ref, gen_expr): Call error, not abort. + * ax-general.c (read_const, generic_ext, ax_trace_quick, + ax_label, ax_const_d, ax_reg, ax_print): Same. + + * tracepoint.c: Remove the $(...) syntax for memranges. + (validate_actionline, encode_actions, trace_dump_command): Remove + clauses for the $(...) syntax. + (parse_and_eval_memrange): Function deleted. + (_initialize_tracepoint): Update function description. + + * gdbtk.c (struct wrapped_call_objs): Change the `func' member to + be a Tcl_ObjCmdProc, not an Tcl_CmdProc, since it accepts a vector + of objects as arguments. Change the object vector to be const, + since that's what all the users of this structure seem to expect. + (call_obj_wrapper): Cast clientData properly before storing it in + the wrapped_args structure. + + * ax-gdb.c (_initialize_ax_gdb): Make the "agent" command a + subcommand of "maintenance", as it should have been from the + beginning. #include "gdbcmd.h", to get the declaration for + maintenancelist. + * Makefile.in: Document that dependency. + +Tue May 19 12:00:58 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com> + + * tracepoint.c (get_tracepoint_by_number): new function, to access + traceframe_number for use of the GUI. + + * tracepoint.h: added prototype for get_traceframe_number. + +Mon May 18 13:34:27 1998 Keith Seitz <keiths@cygnus.com> + + * dbxread.c (process_one_symbol): If block addresses are relative to + function start addresses, reset function_start_address whenever a new + source file is seen. + +Mon May 18 13:04:27 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * tracepoint.c (get_tracepoint_by_number): make sure to advance + arg pointer even if we fail to parse a useful number. Otherwise, + since this function is called in a loop, it may loop forever! + Also change strtol call to allow arbitrary radix. + (map_args_over_tracepoints (and other places)): add QUIT; call + to loop, to allow breakout using control-C. Not all loops were + analyzed to make sure they could terminate cleanly, but even + terminating with a messed-up tracepoint list would be better + than not terminating at all! + (tdump_command): check to see if we're connected to a trace- + capable target (currently only "remote") before doing anything + else. + +Sat May 16 22:21:48 1998 Frank Ch. Eigler <fche@cygnus.com> + + * config/d30v/tm-d30v.h (INIT_FRAME_PC_FIRST): Fill in PC into + frame struct before extracting saved register offsets. + +Fri May 15 22:47:45 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * tracepoint.c (encode_actions): fix typo in printf format string. + +1998-05-15 Jim Blandy <jimb@zwingli.cygnus.com> + + Implement a few more tracing operators: ^ | & ~ ! + * ax-gdb.c (gen_integral_promotions, gen_logical_not, + gen_complement): New functions. + (gen_binop): New argument MAY_CARRY, indicating whether we need to + correct the upper bits of the value after performing the + operation. Callers changed. + (gen_expr): Handle BINOP_BITWISE_AND, BINOP_BITWISE_IOR, and + BINOP_BITWISE_XOR here as well, by calling gen_binop. Handle + UNOP_LOGICAL_NOT, UNOP_COMPLEMENT. + + * ax-gdb.c (gen_conversion): Reworked to avoid some unnecessary + sign extension. + + * ax-gdb.c (gen_usual_arithmetic): Renamed from gen_usual_binary, + to match the ANSI C standard better. Callers changed. + + * ax-gdb.c (gen_traced_pop): Add prototyped declaration. + +Fri May 15 18:18:38 1998 David Taylor <taylor@texas.cygnus.com> + + * tracepoint.c (stringify_collections_list): return a collection + of strings rather than a single string. + (free_actions_list): new function. + (encode_actions): process collection of strings returned by + stringify_collections_list. + +1998-05-15 Jim Blandy <jimb@zwingli.cygnus.com> + + * ax-gdb.c (gen_traced_pop): New function. + (gen_expr): Call it for comma operator. + (gen_trace_for_expr): Call it, instead of writing it out. + + Add facilities for sending arbitrary packets to the remote agent. + There are a bunch of improvements to make (make it generic; handle + 'O' replies properly), but I just want to get this onto the branch. + * remote.c (print_packet, remote_packet_command): New functions. + (_initialize_remote): Register the remote-packet command. + +Thu May 14 17:52:31 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com> + + * tracepoint.c: move actionline_type definition to tracepoint.h. + (validate_actionline): make non static. + + * tracepoint.h: move actioline_type definition from tracepoint.c. + (validate_actionline) moved prototype from tracepoint.c. + +Thu May 14 11:49:18 1998 David Taylor <taylor@texas.cygnus.com> + + * tracepoint.c (validate_actionline): add additional error + checking, remove some dead code. + (encode_actions): additional cleanups. + (trace_find_command): remove some dead code. + (trace_find_pc_command): ditto. + (trace_find_tracepoint_command): ditto. + (trace_find_line_command): ditto. + (trace_find_range_command): ditto. + (trace_find_outside_command): ditto. + +Thu May 14 5:51:00 1998 Ron Unrau <runrau@cygnus.com> + + * symtab.c (decode_line_1): set section for "break *<addr>" + +Wed May 13 20:58:02 1998 Mark Alexander <marka@cygnus.com> + + * corefile.c (reopen_exec_file): Reopen the exec file if + it has changed. + +Wed May 13 15:22:02 1998 Mark Alexander <marka@cygnus.com> + + * sparc-tdep.c (fetch_instruction): New function. + (single_step, sparc_init_extra_frame_info, examine_prologue): + Use fetch_instruction instead of read_memory_integer + to ensure that instructions are always read as big-endian. + +Wed May 13 14:42:21 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Add AC_FUNC_ALLOCA. + * defs.h: Check HAVE_ALLOCA_H rather than sparc. Add _AIX pragma + alloca. + * configure: Rebuild. +start-sanitize-java + * Makefile.in (jv-lang.o, jv-typeprint.o, jv-valprint.o): New + targets. +end-sanitize-java + +Wed May 13 11:19:08 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * tracepoint.c (trace_command): Remove old diagnostic code that was + preventing tracepoints from being defined with a full-path filename. + +Tue May 12 13:17:35 1998 Frank Ch. Eigler <fche@cygnus.com> + + * stabsread.c (read_one_struct_field): Check for typedef in type + tree before clearing bitfield information. + +1998-05-11 Jim Blandy <jimb@zwingli.cygnus.com> + + * ax-gdb.c (gen_binop): New function, based on gen_mul, to replace + gen_mul and gen_div, and handle `%' op as well. Correctly tests + type of arguments. + (gen_expr): Factor out common code in binary arithmetic operators. + Add support for `%'. + (gen_mul, gen_div): Removed. + +Thu May 7 14:49:38 1998 Bob Manson <manson@charmed.cygnus.com> + + * config/sparc/tm-sp64.h (CALL_DUMMY): Store and retrieve + %o0-%o5 as 64-bit values; compensate for stack bias. + (USE_STRUCT_CONVENTION): We only pass pointers to structs + if they're larger than 32 bytes. + (REG_STRUCT_HAS_ADDR): Ditto. + + * sparc-tdep.c (sparc_init_extra_frame_info): Use read_sp() + instead of read_register. If the target is a sparc64 and the frame + pointer is odd, compensate for the stack bias. + (get_saved_register): Use read_sp(). + (DUMMY_STACK_REG_BUF_SIZE): Use FP_REGISTER_BYTES. + (sparc_push_dummy_frame): Use read_sp()/write_sp(). On sparc64, + save the PC, NPC, CCR, FSR, FPRS, Y and ASI registers. + (sparc_frame_find_saved_regs): Use read_sp(). Read the PC, NPC, + CCR, FSR, FPRS, Y and ASI registers from the frame, if it's a + dummy frame. + (sparc_pop_frame): Use write_sp(). If the target is a sparc64 and + the FP is odd, compensate for stack bias. + (sparc_store_return_value): Right-justify the return value before + writing it to %o0. + (sparc_fix_call_dummy): Don't NOP out part of the call dummy on + sparc64. + (sparc64_read_sp, sparc64_read_fp, sparc64_write_sp, + sparc64_write_fp, sp64_push_arguments, + sparc64_extract_return_value): New functions to support the + sparc64 ABI. + + * dwarfread.c (handle_producer): Set processing_gcc_compilation to + the right version number. + + * dwarf2read.c (read_file_scope): Assume we're processing + GCC2 output. + +Wed May 6 16:34:03 1998 Jeffrey A Law (law@cygnus.com) + + * somsolib.c: Include gdb_stat.h. + +Mon May 4 18:34:01 1998 David Taylor <taylor@texas.cygnus.com> + + * ax-gdb.c (gen_mul): new function; (gen_div): new function; + (gen_expr): add support for * and / operators, call gen_mul and + gen_div as appropriate. + +Mon May 4 16:24:22 1998 Mark Alexander <marka@cygnus.com> + + * defs.h (make_run_cleanup): Declare. + * solib.c (find_solib): Pass correct number of arguments to + make_run_cleanup. + +Mon May 4 07:08:25 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * tracepoint.c (trace_actions_command): actions command must set + step_count to zero (in case previous actions have set it but the + new set does not). + +Sat May 2 09:35:07 1998 Stu Grossman <grossman@babylon-5.cygnus.com> + + * ocd.h: Add new flags, function codes, and processor types to support + new Wiggler capabilities. + * (ocd_write_bytes_size): New function to allow atomic writes of + memory in sizes larger than a byte. + + * ser-unix.c (baudtab): Add 57600, 115200, 230400, and 460800 baud. + +Fri May 1 19:51:32 1998 Frank Ch. Eigler <fche@cygnus.com> + + * stabsread.c (read_one_struct_field): Do not override supplied + bitfield size for a range type value. + + * gdbtypes.c (create_range_type): For a range with positive + lower limit, declare range type as unsigned. + +Fri May 1 10:58:34 1998 John Metzler <jmetzler@cygnus.com> + + * monitor.c: Turn off debug + +Fri May 1 09:29:56 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de> + + * breakpoint.c (delete_command): Skip internal breakpoints when + all breakpoints are requested. + + * stabsread.c (define_symbol): Record parameter types from Sunpro + function stabs in the TYPE_FIELDS of the function type. + +Thu Apr 30 15:59:54 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * Makefile.in (config-check-targets, config-check-hosts): Removed. + +1998-04-30 Paul Eggert <eggert@twinsun.com> + + * Makefile.in (maintainer-clean): + Don't get ahead of yourself and delete Makefile + before running `make'. + (local-maintainer-clean, do-maintainer-clean): New rules. + +Wed Apr 29 14:02:59 1998 David Taylor <taylor@texas.cygnus.com> + + * ax-gdb.c (gen_add): when adding a pointer and an int, use + the size of the pointer, not the int (typo) to decide how + to extend the result. + +Wed Apr 29 10:20:40 1998 John Metzler <jmetzler@cygnus.com> +start-sanitize-vr4111 + + * nec4102rom.c: New file implements ROM monitor adapter for + nec-vr4102 board. This board hosts the vr4111 chip. This file + required extensions to the monitor_ops structure, hooks for wait + filter, new flags. This version does not support more than one + breakpoint and resuming after a breakpoint in 16 bit mode is + completely disfunctional. +end-sanitize-vr4111 + + * monitor.h: Defined additional hooks for dmpregs, configure_hooks + and wait_filter. These additions require that all ROM monitor + interfaces be recoded to initialize monitor ops using assignments + rather than static structure initialization. Added new bits to + flags MO_EXACT_DUMPADDR, MO_HAS_BLOCKWRITES. + + * monitor.c (RDEBUG): Conditional tracing throughout the file. + (fromhex): Now recognized upper cse hex digits + (monitor_printf_noecho): + (monitor_readchar): Tracing interferes with input timing. + (monitor_open): Register different memory write functions with + dcache_init if MO_HAS_BLOCKWRITES. + (flush_monior_dcache): Added as an additional utilty. + (monitor-resume): Call continue hook if one has been supplied. + (monitor_wait_filter): New function Factored out of monitor wait + and used if alternate wait-filter has not been provided. + (monitor_wait): call alternate wait filter if provided. Call + monitor_dump_regs, a new function factored out from inline code. + (monitor_dump_block): A new function used as a utility when + monitors must dump several blocks of registers using different + commands. + (monitor_dump_regs): Call alternate function if provided. Uses new + hook in monitor.h. + (monitor_write_memory): Engage previouly added hook + MO_FILL_USES_ADDR. + (monitor_write_even_block): new function supports writing long + blocks of 4byte words. + (longlongendswap): new internal function + (monitor_write_memory_longlongs): new function writes large blocks + using command to enter a long long. + (monitor_write-memory_block): new Function figures out which block + mod to use. + (monitor_read_memory): Can now handle dump formats in which the bytes + preceeding the requested data is not printed. + +Tue Apr 28 19:41:33 1998 Tom Tromey <tromey@cygnus.com> + + * Makefile.in (GDBTKLIBS): New macro. + (INSTALLED_LIBS): Include GDBTKLIBS. + (CLIBS): Likewise. + * configure: Rebuilt. + * configure.in: Put Tcl/Tk libs into GDBTKLIBS, not LIBS. + (GDBTKLIBS): AC_SUBST. + + * tracepoint.c (memrange_cmp): Another typo fix; `memrbnge' -> + `memrange'. + + * tracepoint.c (memrange_cmp): Fixed typo in function intro. + +Tue Apr 28 17:41:20 1998 Philippe De Muyter <phdm@macqel.be> + + * symfile.c (overlay_auto_command): Add forgotten parameter definitions. + (overlay_manual_command, overlay_off_command): Likewise. + (overlay_load_command): Likewise. + * tracepoint.c (memrange_cmp): Parameters have type void *, not + struct memrange *. + +Tue Apr 28 11:08:25 1998 John Metzler <jmetzler@cygnus.com> + + * rom68k-rom.c (_initialize_rom68k): Fix unresolved init_rom_68kcmds. + +Mon Apr 27 14:32:21 1998 Mark Alexander <marka@cygnus.com> + + * config/sparc/tm-sparc.h (CALL_DUMMY): Shorten it drastically, + make it work on the simulator. + (FIX_CALL_DUMMY): Convert to function call instead of inline code. + (sparc_fix_call_dummy): Declare. + * sparc-tdep.c (sparc_fix_call_dummy): New function, taken from + old FIX_CALL_DUMMY macro, with additional fixes for simulator. + (sparc_push_dummy_frame): Set registers differently on simulator + to prevent corrupted register window save areas. + +Mon Apr 27 13:46:40 1998 John Metzler <jmetzler@cygnus.com> + + * rom68k-rom.c (_initialize_rom68k, init_rom68k_cmds): + Convert all static initializations of monitor ops structures to + executable initializations in order that additions to the data + structure definition can me made without repeating this editing + exercise. + * abug-rom.c (_initialize_abug_rom, init_abug-cmds): Ditto. + * cpu32bug-rom.c (_initialize_cpu32bug_rom, init_cpu32bug_cmds): Ditto. + * mon960-rom.c (initialize_mon960, init_mon960_cmds): Ditto. + * op50-rom.c (initialize_op50n, init_op50n_cmds): Ditto. + * ppcbug-rom.c (_initialize_ppcbug_rom, init_ppc_cmds): Ditto. + * sh3-rom.c (_initialize_sh3_rom, init_sh3_cmds): Ditto. + * sparclet-rom.c (_initialize_sparclet, init_sparclet_cmds): Ditto. + * remote-est.c (_initialize_est, init_est_cmds): Ditto. + * remote-hms.c ( _initialize_remote_hms, init_hms_cmds): Ditto. + +Mon Apr 27 10:43:04 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * gdb_string.h (strdup): Don't specify arguments in prototype. + +Sun Apr 26 07:57:21 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de> + + * rs6000-nat.c (vmap_ldinfo): Issue warning instead of error if + fstat on ldinfo_fd fails. Use objfile->obfd instead of vp->bfd + to check for reference to the same file. + + * target.c (target_read_string): Handle string transfers at the + end of a memory section gracefully. + +Fri Apr 24 17:18:56 1998 Geoffrey Noer <noer@cygnus.com> + + * Makefile.in: enable EXEEXT setting + +Fri Apr 24 11:53:49 1998 David Taylor <taylor@texas.cygnus.com> + + * tracepoint.c (add_local_symbols): change type of type from + char to int so that type shows up as 'A' or 'L' not 0. + +start-sanitize-r5900 +Fri Apr 24 11:25:07 1998 Jeffrey A Law (law@cygnus.com) + + * mips-tdep.c (mips32_decode_reg_save): Handle 128bit wide + GPR loads/stores generated on the r5900. + (mips_find_saved_regs, mips32_skip_prologue): Likewise. + * mips/tm-r5900.h (R5900_128BIT_GPR_HACK): Define. + * mips/tm-txvu.h (R5900_128BIT_GPR_HACK): Likewise. + +end-sanitize-r5900 +Thu Apr 23 16:37:20 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * README: Minor changes for 4.17 release. + +start-sanitize-java +Thu Apr 23 15:44:39 1998 Per Bothner <bothner@cygnus.com> + + * symfile.c (deduce_language_from_filename): .class implies java. + +end-sanitize-java +Thu Apr 23 12:52:21 1998 Philippe De Muyter <phdm@macqel.be> + + * configure.in (strerror): Check if function must be declared. + * acconfig.h (NEED_DECLARATION_STRERROR): New define slot. + * gdb_string.h (strerror): Function declaration issued if + NEED_DECLARATION_STRERROR. + * configure, config.in : Files regenerated. + +Thu Apr 23 12:27:43 1998 Philippe De Muyter <phdm@macqel.be> + + * symfile.c (simple_overlay_update_1): Do not prefix array address + by `&'. + * bcache.h (BCACHE_DATA_ALIGNMENT): Ditto. + * tracepoint.c (encode_actions): Ditto. + * language.c, complaints.c, utils.c (varargs.h): Do not include that + file here, it is already included indirectly by defs.h. + * dbxread.c (dbx_symfile_init, process_one_symbol): Cast xmalloc return + value to the appropriate pointer type. + * utils.c (floatformat_from_doublest): Ditto. + * tracepoint.c (read_actions, _initialize_tracepoint): Ditto. + (add_memrange): Likewise with xrealloc return value. + * stabsread.c (ref_add): Ditto. + * coffread.c (coff_symfile_init): Likewise for xmmalloc return value. + * elfread.c (elf_symfile_read): Ditto. + * os9kread.c (os9k_symfile_init): Ditto. + +Thu Apr 23 00:32:08 1998 Tom Tromey <tromey@cygnus.com> + + * config.in: Rebuilt. + * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_STPCPY, HAVE_GETTEXT, + HAVE_LC_MESSAGES): Define. + +Wed Apr 22 15:38:56 1998 Tom Tromey <tromey@cygnus.com> + + * configure: Rebuilt. + * configure.in: Call CY_GNU_GETTEXT. + * Makefile.in (top_builddir): New macro. + (INTL): Define to @INTLLIBS@. + (INTL_DEPS): New macro. + (CDEPS): Reference INTL_DEPS, not INTL. + +start-sanitize-sky +Wed Apr 22 13:40:16 1998 Doug Evans <devans@canuck.cygnus.com> + + * txvu-tdep.c (txvu_print_insn): Fix thinko. + +end-sanitize-sky +Wed Apr 22 12:58:23 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + Handle missing shared libraries during the examination of a core + dump gracefully. + * solib.c (find_solib): Use catch_errors around call to + solib_map_sections. Use warning instead of error if reading of + the shared library name fails. + (solib_map_sections): Change return and argument types to make + it callable from catch_errors. + (symbol_add_stub): Avoid GDB core dump if solib->abfd is NULL. + * irix5-nat.c, osfsolib.c (xfer_link_map_member, solib_map_sections, + symbol_add_stub): Ditto. + +Wed Apr 22 14:34:49 1998 Michael Meissner <meissner@cygnus.com> + + * Makefile.in (INTL*): Add support to link in the intl library, + and to add -I options to its source and object directories. + (INTERNAL_CFLAGS): Ditto. + (C{LIBS,DEPS}): Ditto. + +start-sanitize-sky +Wed Tue 21 17:29:48 1998 Jim Lemke <jlemke@cygnus.com> + * configure.in: Add configure option --with-sim-funit. + +end-sanitize-sky +Tue Apr 21 11:20:54 1998 Frank Ch. Eigler <fche@cygnus.com> + + * mips-tdep.c (gdb_print_insn_mips): Disassemble MIPS instructions + with subtarget-specific `mach', rather than fixed default. + * config/mips/tm-mips.h (TM_PRINT_INSN_MACH): New macro, default + disassembly `mach'. +start-sanitize-r5900 + * config/mips/tm-r5900.h (TM_PRINT_INSN_MACH): Override. +end-sanitize-r5900 +start-sanitize-sky + * config/mips/tm-txvu.h (TM_PRINT_INSN_MACH): Override. +end-sanitize-sky + +Mon Apr 20 15:35:03 1998 Philippe De Muyter <phdm@macqel.be> + + * coffread.c (decode_base_type): Treat a long field with size greater + than TARGET_LONG_BIT as long long. + * values.c (value_from_longest): Print code value in error message. + +Mon Apr 20 15:32:21 1998 Mark Kettenis <kettenis@phys.uva.nl> + + * gdb/gdb_string.h (strdup): Declare only if not defined as a + macro. + +Mon Apr 20 14:18:45 1998 J. Kean Johnston <jkj@sco.com> + + * procfs.c: Added replacement macros for LWP stuff. Fixed support + for UnixWare / SVR4.2MP targets and any targets which use + multi-file /proc entries. Fixed support for hardware watchpoints. + * solib.c: SCO needs some of the same code as SunOS. Change + preprocessor conditionals. + + * config/i386/i386sco5.mt: New file. + * config/i386/tm-i386sco5.h: New file. + * config/i386/i386sco5.mh (NATDEPFILES): add i386v-nat.o. + * config/i386/nm-i386v42mp.h + (TARGET_HAS_HARDWARE_WATCHPOINTS): define. + Add other macros for hardware assisted watchpoints. + * config/i386/nm-i386sco5.h: Correct attributions. + (TARGET_HAS_HARDWARE_WATCHPOINTS): define. + * config/i386/nm-linux.h (target_remote_watchpoint): Pass + 'type' through to i386_insert_watchpoint. + +Mon Apr 20 14:12:30 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * infrun.c (wait_for_inferior): Don't add signalled processes + as new threads. + * procfs.c (wait_fd): Note if LWP has exited. + (procfs_wait): use GETPID to get process ID. + +Sat Apr 18 15:21:04 1998 Stan Cox <scox@cygnus.com> + + * configure.tgt: Added sparc86x support. + +Thu Apr 16 13:13:24 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * rdi-share/etherdrv.c (EthernetWrite): Use strerror to get + error string if in an ANSI C-ish environment. + +Wed Apr 15 18:59:48 1998 Mark Alexander <marka@cygnus.com> + + * sparc-tdep.c (SPARC_HAS_FPU): Define. + (sparc_extract_return_value): New function, required to handle + machines without floating point. + (sparc_store_return_value): Ditto. + * config/sparc/tm-sparc.h (EXTRACT_RETURN_VALUE): Call + sparc_extract_return_value instead of using inline code. + (sparc_extract_return_value): Declare. + (STORE_RETURN_VALUE): Call sparc_store_return_value instead + of using inline code. + (sparc_store_return_value): Declare. + +Wed Apr 15 12:19:42 1998 Martin M. Hunt <hunt@cygnus.com> + + * solib.c (enable_break): Only call warning once + instead of three times. + +Tue Apr 14 16:52:59 1998 Mark Alexander <marka@cygnus.com> + + * sparc-tdep.c (sparc_extract_struct_value_address): Make it + work correctly on little-endian hosts. + (sparc_push_arguments): New function. + (gdb_print_insn_sparc): New function. + (_initialize_sparc_tdep): Make gdb_print_insn_sparc the default + disassembler, so that SPARClite-specific instructions will + be recognized. + * sparcl-tdep.c (readchar): Print debugging information. + (debug_serial_write): New function, a replacement for SERIAL_WRITE + that prints debugging information. + * config/sparc/tm-sparc.h (PUSH_ARGUMENTS): Define. + (sparc_push_arguments): Declare. + +Tue Apr 14 15:43:49 1998 John Metzler <jmetzler@cygnus.com> + + * gdbcfgxref (xref_menu): Call new regex and wild card searches + Now you can type in a specific triple like mips64-vr4300-elf or + somthing like mips*.h + (triple_search) wildcardsearch): The new functions + +start-sanitize-vr4320 + * configure.tgt: Switch over to use tm-4320.h. Since I switched to + MIPS EABI the fixes are no longer backward compatible with 4300. + * tm-vr4320.h: Added + * vr4320.mt: Added + +end-sanitize-vr4320 +Mon Apr 13 16:28:07 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com> + + * utils.c: (warning) added call to warning_hook + + * source.c: (find_source_lines) modified to call warning in case + of source vs. executable time stamp mismatch. Simplified object + file check. Initialized mtime to 0. + + * defs.h: added warning_hook prototype + + * top.c: added warning_hook prototype. + +Mon Apr 13 09:54:08 1998 Keith Seitz <keiths@andros.cygnus.com> + + * config/sparc/tm-sun4os4.h (IS_STATIC_TRANSFORM_NAME): Add missing + definition. + +Fri Apr 10 22:36:28 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + Update support for x86 Solaris 2. + * config/i386/tm-i386sol2.h, nm-i386sol2.h: New configuration + files for x86 Solaris 2. + * config/i386/i386sol2.mt, i386sol2.mh: Use them. + * config/sparc/tm-sun4sol2.h (PROCFS_GET_CARRY): New macro, extract + carry flag from a given regset. + (IS_STATIC_TRANSFORM_NAME): New macro, check if a symbol name + is a SunPro transformed name. + * i386-tdep.c (sunpro_static_transform_name): New function to + extract the source name from a SunPro transformed name. + * inferior.h (procfs_first_available, procfs_get_pid_fd): + Add prototypes. + * infrun.c (wait_for_inferior): Handle breakpoint hit in + signal handler without intervening stop in sigtramp. + * procfs.c (procfs_lwp_creation_handler): Use PROCFS_GET_CARRY + instead of direct access to the status register. + (procfs_get_pid_fd): New function, returns procfs fd for a given pid. + * sol-thread.c (ps_lgetLDT): New function, returns LDT for a given + lwpid. + (sol_find_new_threads): Handle failed libthread_db initialization + gracefully. + * stabsread.c (define_symbol): Use IS_STATIC_TRANSFORM_NAME + to check for a SunPro transformed symbol name. + +Fri Apr 10 10:35:35 1998 John Metzler <jmetzler@cygnus.com> + + * utils.c (fmthex): A formatting function for hexdumps + + * mips-tdep.c (unpack_mips16): Fixed instruction decoding, lots of + bit pattern interpretations. mips_fetch_instruction does not work + for 16 bit instructions. Some confusion remains about sign + extension in backward branches. + (mips32_relative_offset): Sign extension + (mips32_next_pc): Major debugging, bit pattern interpretation + (print_unpack): debugging printf + (fetch_mips_16): new funtion, key on PC low bit, not symbol table + (mips16_next_16): Initial major debugging of this function. Lots + of bit pattern mistakes. + (mips_next_pc): key on low bit of PC, not symbol table. + * symfile.c(generic_load) : Added a download verification which + reads back the loade code. Download chunk size is now a defined + macro. Fixed a bug in which downloading slips into loading one + byte at a time. Lower level functions in monitor.c can load long + sequences of bytes and make use of these fixups. Referencing + bfd-start_address directly was incorrectly getting zero for start. + +Thu Apr 9 19:20:32 1998 Ian Lance Taylor <ian@cygnus.com> + + * mips-tdep.c (do_fp_register_row): Use alloca rather than arrays + with dynamic size. + +Wed Apr 8 19:21:42 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * top.c (print_gdb_version): Print 1998 now. + +Wed Apr 8 16:57:22 1998 Philippe De Muyter <phdm@macqel.be> + + * source.c: Remove obsolete decl of strstr(). + +Wed Apr 8 16:47:33 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * solib.c (solib_create_inferior_hook): Remove Ulrich Drepper's + patch of March 23 1998. + * breakpoint.c (breakpoint_re_set_one): Remove Ulrich Drepper's + patch of March 23 1998. + +Sat Apr 4 10:05:00 1998 Dawn Perchik <dawn@cygnus.com> + + * mdebugread.c (parse_partial_symbols): If this is an .mdebug + section in an ELF file, override a symbol's ECOFF section with its + ELF section. Also, fix stabs continuation where a stabs string + continues for more than one continuation. + +Mon Apr 6 09:17:48 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * mips-tdep.c (mips_push_arguments): Specify dimention of valbuf + using MAX_REGISTER_RAW_SIZE. + +Sat Apr 4 10:05:00 1998 Dawn Perchik <dawn@cygnus.com> + + * infrun.c: Fix prototype of signals_info to match static funtion. + +Thu Apr 2 12:47:41 1998 Frank Ch. Eigler <fche@cygnus.com> + + * sol-thread.c (sol_thread_store_registers): Save & restore new + value of single updated register to prevent accidental clobbering. + +Wed Apr 1 22:01:09 1998 Mark Alexander <marka@cygnus.com> + + * config/sparc/tm-sparclite.h (TARGET_BYTE_ORDER_SELECTABLE): Define. + * config/sparc/sparclite.mt: Link in the erc32 simulator. + +Wed Apr 1 16:30:49 1998 Ian Dall <Ian.Dall@dsto.defence.gov.au> + + * ns32k-tdep.c (flip_bytes, ns32k_localcount, + ns32k_get_enter_addr, sign_extend): Restore functions mysteriously + deleted. + + * ns32knbsd-nat.c: New (?) file to support fetching and storing + registers on NetBSD hosts. + + * nbsd.mh (NATDEPFILES): put ns32knbsd-nat.o instead of + ns32k-nat.o + + * ns32km3-nat.c (reg_offset): Get order of floating point + registers correct. Add extra 32382 register offsets. + (REG_ADDRESS): define to point at correct part of thread + state. Use calls to "warning" instead of "message". + + * tm-nbsd.h, tm-ns32km3.h (REGISTER_NAMES, NUM_REGS, + REGISTER_BYTES, REGISTER_BYTE): redefine allowing for 32382 + fpu registers. + +Wed Apr 1 13:43:07 1998 Philippe De Muyter <phdm@macqel.be> + + * NEWS: m68k-motorola-sysv host support added. + * coffread.c (coff_start_symtab): Accept the filename as an argument, + set it here. Callers updated. + +Wed Apr 1 23:13:23 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * config/mips/tm-mips.h (REGISTER_VIRTUAL_TYPE): Handle 32 bit SR, + FSR and FIR registers. + (REGISTER_VIRTUAL_SIZE): Compute using REGISTER_VIRTUAL_TYPE. + (REGISTER_RAW_SIZE): Define using REGISTER_VIRTUAL_SIZE. + + * config/mips/tm-mips64.h: Ditto. + +Tue Mar 31 21:30:39 1998 Nick Clifton <nickc@cygnus.com> + + * arm-tdep.c (gdb_print_insn_arm): Attach a fake Thumb symbol + vector to the info structure when disassembling thumb + instructions. + + * coffread.c (coff_symtab_read, read_one_sym, + process_coff_symbol): Support Thumb symbol types. + + * dbxread.c (process_one_symbol): Call SMASH_TEXT_ADDRESS (if it + is defined) for function symbols. + +Mon Feb 16 14:05:54 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * d10v-tdep.c (d10v_extract_return_value): Wierd. GCC wants to + return odd sized register quantities with only half of the first + register used! + + * config/d10v/tm-d10v.h (USE_STRUCT_CONVENTION): Use stack when + size > 8. + +Tue Mar 31 16:39:28 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * tracepoint.c (get_tracepoint_by_number): change warning to note. + (delete_trace_command): suppress y/n query if no tracepoints, or + if not from_tty. (trace_pass_command): reject junk at end of args. + (read_actions): an action list consisting only of "end" is discarded. + (validate_actionline (for collect command)): an argument beginning + with a dollar_sign but not recognized as a special argument is + parsed like any other expression -- if it isn't a register name, + it's rejected. Also reject an empty argument to while-stepping. + (trace_find_command): reject a negative frame number argument. + (_initialize_tracepoint): set $traceframe initially to -1. + +Mon Mar 30 16:42:12 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * rdi-share/Makefile.am, rdi-share/aclocal.m4, + rdi-share/configure: New files. + * rdi-share/configure.in: Rewritten to be an autoconf input file. + * rdi-share/Makefile.in, rdi-share/configure: Generated by + automake/autoconf. + * rdi-share/dbg_hif.h, etherdrv.c, hostchan.c: Use autoconf tests + to check environment. + +Sun Mar 29 15:17:16 1998 Keith Seitz <keiths@onions.cygnus.com> + + * tracepoint.c (trace_start_command): Set trace_running_p. + (trace_stop_command): Clear trace_running_p. + +Sat Mar 28 15:19:48 1998 Stan Shebs <shebs@andros.cygnus.com> + + * NEWS: Update for 4.17 release. + +Fri Mar 27 10:15:50 1998 David Taylor <taylor@tito.cygnus.com> + + * tracepoint.c (parse_and_eval_memrange): Fix memory leaks. + (encode_actions): Use the new gen_trace_for_expr function + instead of expr_to_address_and_size; collect registers when + using expressions. (clear_collection_list): Fix memory leak. + +1998-03-26 Jim Blandy <jimb@zwingli.cygnus.com> + + * ax-gdb.h (gen_trace_for_expr): Add prototype. + +Thu Mar 26 17:24:23 1998 David Taylor <taylor@texas.cygnus.com> + + * tracepoint.c (validate_actionline): Fix memory leak. + (encode_actions): Fix memory leak. + +Thu Mar 26 16:16:55 1998 David Taylor <taylor@tito.cygnus.com> + + * tracepoint.c (trace_mention): New function. + (trace_command): Call it. + +1998-03-26 Jim Blandy <jimb@zwingli.cygnus.com> + + * ax-general.c (ax_reqs): New function. + * ax.h (enum agent_flaws, struct agent_reqs): New types. + (agent_reqs): New extern prototype. Well, actually, this was + there before, due to a premature checkin. + (struct aop_map): Add new `data_size' member. + * ax-general.c (aop_map): Supply its value. + * ax-gdb.c (agent_command): Call ax_reqs, for testing. + + * ax-general.c (ax_print): If we encounter an invalid or + incomplete opcode, don't abort; just print an error message. + + * ax-gdb.c: Generate trace bytecodes, as appropriate. + (trace_kludge): New variable. + (gen_fetch, gen_bitfield_ref): Emit trace bytecodes, if asked + nicely. + (expr_to_agent): Ask for no trace bytecodes. + (gen_trace_for_expr): New function. + (agent_command): Call it, and display the result appropriately --- + no struct axs_value, so no type or kind information. + + * ax-gdb.c: Use TARGET_CHAR_BIT throughout, not HOST_CHAR_BIT. + +Thu Mar 26 22:29:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com> + + * tracepoint.c (trace_status_command): Recognize a boolean return + value from the stub to indicate whether trace experiment is + running. Export this value as a global state variable. + (trace_running_p) for use by the GUI. (from Michael Snyder) + (trace_pass_command) added call to modify_tracepoint_hook. + + * tracepoint.h export trace_running_p. + +Thu Mar 26 13:08:01 1998 David Taylor <taylor@texas.cygnus.com> + + * tracepoint.c (validate_actionline): do not error out if + exp->elts[0].opcode is not on short line -- let + expr_to_address_and_size handle it. + +1998-03-26 Jim Blandy <jimb@zwingli.cygnus.com> + + * tracepoint.c: Include "ax.h", not "agentexpr.h". + + * tracepoint.c (encode_actions): Call expr_to_address_and_size, + not simply expr_to_agent. + + * ax-general.c: Comment out code in progress, so everyone else can + at least compile. + + * gdbtypes.c: Doc fix. + + * ax.h, ax-gdb.h, ax-general.c, ax-gdb.c: New files. + * Makefile.in (REMOTE_OBJS): Add ax-general.o and ax-gdb.o. + (SFILES): Add ax-general.c, ax-gdb.c. + (ax_h): New variable. + (ax-general.o, ax-gdb.o): New rules. + +start-sanitize-sky +Wed Mar 25 11:45:19 1998 Frank Ch. Eigler <fche@cygnus.com> + + * configure.in (sim-gpu2): Added target type checking to make + --with-sim-gpu2 option only valid for sky target. + * configure: Regenerated. +end-sanitize-sky + +Tue Mar 24 16:22:40 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk> + + * Makefile.in: Derive SHELL from configure. + * config/d10v/d10v.mt config/m32r/m32r.mt + config/mn10200/mn10200.mt config/mn10300/mn10300.mt + config/d30v/d30v.mt : Remove -lm from SIM. This prevents + dependency checking of -lm (under NT native builds). (It is + automatically added by configure if it exists.) + * doc/configure mswin/configure nlm/configure + testsuite/gdb.base/configure testsuite/gdb.c++/configure + testsuite/gdb.chill/configure testsuite/gdb.disasm/configure + testsuite/gdb.stabs/configure testsuite/gdb.threads/configure: + Regenerate with autoconf 2.12.1 to fix shell issues for NT native + builds. + +Mon Mar 23 18:10:57 1998 Ulrich Drepper (drepper@cygnus.com) + + * solib.c (solib_create_inferior_hook): Rewrite previous + change to check the type of file via BFD. + +Mon Mar 23 13:52:28 1998 Ulrich Drepper (drepper@cygnus.com) + + * breakpoint.c (breakpoint_re_set_one): Treat bp_shlib_events + like bp_breakpoints. + * solib.c (solib_create_inferior_hook): Relocate section addresses + if the alleged start address doesn't agree with the PC. + +start-sanitize-sky +Mon Mar 23 13:07:22 1998 Frank Ch. Eigler <fche@cygnus.com> + + * configure.in (sim-gpu2): Added --with-sim-gpu2 as configure + option, to allow gdb+sim linking with sky GPU2 library. + * configure: Regenerated. + +end-sanitize-sky +Sat Mar 21 19:34:49 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com> + + merged changes from Foundry (list follows by file/author): + + - Tom Tromey <tromey@cygnus.com> + * Makefile.in (gdbres.o): New target. + (WINDRES): New define. + * configure: Rebuilt. + * configure.in (WINDRES): Define. + (CONFIG_OBS): Include gdbres.o on Windows. + * gdbtool.ico: New file. + * gdb.rc: New file. + + * ser-unix.c + - Keith Seitz <keiths@onions.cygnus.com> + (wait_for): Don't reset the timeout_remaining for CYGWIN32, + since we now effectively poll the serial port. + Don't reset the current_timeout, either, since this member is used + by hardwire_readchar to track the timeout and call the ui_loop_hook. + (hardwire_readchar): Poll the serial port for Cygwin32. We timeout + every second, update the UI, and loop around doing this until we + have hit the real timeout or we get data or an error. This will + allow the UI to stay active while gdb is "blocked" talking to the + target. + - Martin M. Hunt <hunt@cygnus.com> + (wait_for): Do reset current_timeout because it is only used to + keep track of what the current timeout for the scb is. + + * top.c + - Martin M. Hunt <hunt@cygnus.com> + (quit_confirm): Change exit message again + for GUI. + (pc_changed_hook): Add prototype. + - Tom Tromey <tromey@cygnus.com> + (quit_confirm): Added missing `else'. + (quit_confirm): Special-case message if init_ui_hook is + set. + + * symtab.c + - Martin M. Hunt <hunt@cygnus.com> + (find_pc_sect_line): If no symbol information + is found, return correct pc anyway. + (find_methods): Comment out an apparently + bogus error message because it messes up Foundry. + + * serial.c + - Martin M. Hunt <hunt@cygnus.com> + (_initialize_serial): Add a description of + "set remotelogbase". + + * findvar.c + - Martin M. Hunt <hunt@cygnus.com> + (write_register_gen): Add call to + pc_changed_hook if the PC is being changed. + + * defs.h + - Martin M. Hunt <hunt@cygnus.com> + (pc_changed_hook): Define. + + * command.c + - Martin M. Hunt <hunt@cygnus.com> + (do_setshow_command): If no arguments are supplied, + don't dump core, instead print out an error message. + + * breakpoint.c + - Martin M. Hunt <hunt@cygnus.com> + Make set_raw_breakpoint, set_breakpoint_count, + and breakpoint_count non-static so they are accessible from + gdbtk.c. + (enable_breakpoint): Enable breakpoint + with same disposition instead of changing all breakpoints + to donttouch. + + * annotate.h + - Keith Seitz <keiths@onions.cygnus.com> + Add declarations for annotation hooks. + + * annotate.c + - Keith Seitz <keiths@onions.cygnus.com> + Add hooks: annotate_starting_hook, annotate_stopped_hook, + annotate_signalled_hook, annotate_exited_hook. + (annotate_starting): If hook exists, call it instead. + (annotate_stopped): If hook exists, call it instead. + (annotate_exited): If hook exists, call it instead. + (annotate_signalled): If hook exists, call it instead. + +Fri Mar 20 14:45:36 1998 Michael Snyder <msnyder@cleaver.cygnus.com> + + * gdbserver/Makefile.in: add dependency on XM_CLIBS. + * gdbserver/low-sim.c (registers) force into alignment. + (create_inferior): Fix typo on new_argv; add abfd arg to + sim_open, sim_create_inferior. Add reg_size arg to + sim_fetch_register, sim_store_register. Make simulator + take a single-step to get into a known running state. + * gdbserver/gdbreplay.c: include fcntl.h for def'n of F_SETFL. + * gdbserver/server.c: Add remote_debug variable to control + debug output. + * gdbserver/server.h: Add prototypes for enable/disable_async_io. + * gdbserver/remote-utils.c: add verbose debugging output controlled + by "remote_debug" variable. Add call to "disable_async_io()" + to avoid being killed by async SIGIO signals. + * config/m32r/m32r.mt: define GDBSERVER_(LIBS and DEPFILES), + so that gdbserver can be built with the m32r simulator. + +Fri Mar 20 09:04:06 1998 Andrew Cagney <cagney@b1.cygnus.com> + +start-sanitize-r5900 + * config/mips/tm-r5900.h (REGISTER_VIRTUAL_SIZE): Redefine as + expression from REGISTER_VIRTUAL_TYPE. + (REGISTER_RAW_SIZE): Ditto. + (REGISTER_VIRTUAL_TYPE): Redefine, use explicit size for 32 bit + registers. + +end-sanitize-r5900 + * gdbtypes.h (builtin_type_{,u}int{8,16,32,64}): New gdb builtin + types. +start-sanitize-r5900 + (builtin_type_{,u}int128): Ditto. +end-sanitize-r5900 + + * gdbtypes.c (_initialize_gdbtypes): Initialize new types. + + * mips-tdep.c (do_gp_register_row): Pad register value when GP + register is smaller than MIPS_REGSIZE. + + * findvar.c (value_of_register): When raw and virtual register + values identical, check that sizes are consistent. + +Thu Mar 19 11:32:15 1998 Michael Snyder (msnyder@cleaver.cygnus.com) + + * minsyms.c (compare_minimal_symbols): If addresses are identical, + then compare on names. Sorted list should have symbols with + identical addresses AND names adjacent, so dups can be discarded. + +Wed Mar 18 12:50:17 1998 Jeff Law (law@cygnus.com) + + * stabsread.c (define_symbol): Don't look for ',' as a LRS + indicator. + +Wed Mar 18 10:34:51 1998 Nick Clifton <nickc@cygnus.com> + + * rdi-share/etherdrv.c: Set sys_errlist[] as char * not const char *. + +Fri Mar 13 15:43:53 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * config/mips/xm-mips.h (CC_HAS_LONG_LONG): Undefine for Ultrix + when compiling with native cc, the compiler has broken long long + support. + +Fri Mar 13 15:37:02 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * config/m68k/xm-sun3os4.h: Remove malloc declarations, they + are handled via autoconf now. + * remote.c (remote_ops, extended_remote_ops): Replace static + forward declaration by moving the static definition to the top of + the file, for old K&R compilers. + * tracepoint.c (collect_symbol, trace_start_command): + Replace ANSI string concatenation with K&R compatible simple string. + +1998-03-11 Fred Fish <fnf@ninemoons.com> + + * source.c (select_source_symtab): Don't reach error if we have + a current_source_symtab from reading in partial symbol table. + +start-sanitize-vr4320 +Tue Mar 10 16:15:13 1998 Gavin Koch <gavin@cygnus.com> + + * configure.tgt (mips64*vr4320*el-*-elf*) : Removed spurious case. + +end-sanitize-vr4320 +Fri Mar 6 13:10:27 1998 Fred Fish <fnf@cygnus.com> + + * utils.c (quit): Call SERIAL_DRAIN_OUTPUT rather than + SERIAL_FLUSH_OUTPUT. + * serial.h (struct serial_ops): Add drain_output, pointer to + function that waits for output to drain. + (SERIAL_DRAIN_OUTPUT): Macro to wait for output to drain. + * ser-unix.c (hardwire_drain_output): New function and prototype. + + * ser-unix.c (hardwire_ops): Add entry for drain_output function. + * ser-tcp.c (tcp_ops): Ditto. + * ser-ocd.c (ocd_ops): Ditto. + * ser-mac.c (mac_ops): Ditto. + * ser-go32.c (dos_ops): Ditto. + * ser-e7kpc.c (e7000pc_ops): Ditto. + +Thu Mar 5 16:07:41 1998 Michael Snyder (msnyder@cleaver.cygnus.com) + + * sparcl-tdep.c: fix #endif comments + +Thu Mar 5 15:10:35 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * Makefile.in (BISON): Configure substitutes in @YACC@, not @BISON@. + +Thu Mar 5 14:42:41 1998 Keith Seitz <keiths@onions.cygnus.com> + + * ocd.c (ocd_open): If we fail ocd_start_remote, make sure we + error () so that we abort out of bdm_ppc_open. + +Wed Mar 4 16:53:52 1998 Martin M. Hunt <hunt@cygnus.com> + + * serial.c (_initialize_serial): Add a description of + "set remotelogbase". + + * command.c (do_setshow_command): If no arguments are supplied, + don't dump core, instead print out an error message. + +Wed Mar 4 16:50:18 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * gdbtk.c (gdb_listfiles): Fix thinko in last change. + +Wed Mar 4 15:34:49 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * gdbtk.c (gdb_listfiles): Allocate space for 'files' dynamically. + +Wed Mar 4 01:39:08 1998 Ron Unrau <runrau@cygnus.com> + + * elfread.c (elf_symtab_read): merge SYMBOL_IS_SPECIAL into + MAKE_MSYMBOL_SPECIAL + * config/mips/tm-mips.h: ditto + +Tue Mar 3 17:19:08 1998 John Metzler <jmetzler@cygnus.com> + +start-sanitize-vr4111 + * config/mips/tm-vr4xxx.h: implements vr4111 as separate from 4300 + * config/mips/vr4xxx.tm: implements vr4111 as separate from 4300 + * configure.tgt: Recognise mips64vr4111-*-elf as vr4xxx +end-sanitize-vr4111 + * dwarfread.c (read_tag_pointer_type): Pointer sizes now come from + TARGET_PTR_BIT rather from sizeof(char *) on host. + +Tue Mar 3 14:37:02 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * alpha-nat.c (fetch_osf_core_registers): Renamed from + fetch_aout_core_registers. + (alpha_osf_core_fns): Renamed from alpha_aout_core_fns, change + flavour to bfd_target_unknown_flavour for OSF core files. + +start-sanitize-vr4320 +Tue Mar 3 11:12:39 1998 Gavin Koch <gavin@cygnus.com> + + * configure.tgt (mips64*vr4320*el-*-elf*,mips64*vr4320*-*-elf*) : + Added. + +end-sanitize-vr4320 +Mon Mar 2 17:44:13 1998 Michael Snyder (msnyder@cleaver.cygnus.com) + + * breakpoint.c (_initialize_breakpoint): Make "en" an alias + for "enable" (so that it doesn't conflict with "end"). + +Mon Mar 2 17:04:25 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * Makefile (VERSION): Bump to 4.17.1. + +Mon Mar 2 16:59:15 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * rdi-share/etherdrv.c (sys_errlist): Add correct decl for Linux. + +Mon Mar 2 16:51:44 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * Makefile.in (YYFILES): Remove in maintainer-clean, not distclean. + +Mon Mar 2 16:47:11 1998 Philippe De Muyter <phdm@macqel.be> + + * Makefile.in (distclean): Add `rm $(YYFILES)'. + +Mon Mar 2 16:45:48 1998 Philippe De Muyter <phdm@macqel.be> + + * coffread.c (coff_read_enum_type): Set TYPE_FLAG_UNSIGNED if enum + is unsigned. + +Sun Mar 2 15:16:13 1998 Richard Henderson <rth@cygnus.com> + + * configure.host, configure.tgt: Add sparc-linux. + * sparc-nat.c: Include <asm/reg.h> not <machine/reg.h> for Linux. + * config/sparc/*linux*: New files. + +Mon Mar 2 12:12:41 1998 Anthony Thompson (athompso@cambridge.arm.com) + + * arm-tdep.c (gdb_print_insn_arm): Call print_insn_big_arm + if we're big endian; else call print_insn_little_arm. + +Mon Feb 24 11:24:57 1998 Richard Henderson <rth@cygnus.com> + + * Makefile.in (BISON): Don't even pretend to use yacc. + (c-exp.tab.o): Use bison -o to use a unique intermediate file. + (f-exp.tab.o, m2-exp.tab.o): Likewise. +start-sanitize-java + (jv-exp.tab.o): Likewise. +end-sanitize-java + +Tue Feb 24 03:32:59 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * remote-sim.c (gdbsim_fetch_register): Don't abort when the + register size is wrong. + +start-sanitize-r5900 +Tue Feb 24 02:53:41 1998 And<rew Cagney <cagney@b1.cygnus.com> + + * config/mips/tm-r5900.h (REGISTER_VIRTUAL_SIZE, + REGISTE_RAW_SIZE): Re-define. + +end-sanitize-r5900 +Thu Feb 19 16:49:48 1998 John Metzler <jmetzler@cygnus.com> + + * target.c (debug_to_fetch_registers,debug_to_store_registers, + debug-to_insert_breakpoint,debug_to_remove_breakpoint): tracing + 64 bit targets crashed long long printfs. + +Tue Feb 17 16:36:22 1998 Michael Snyder (msnyder@cleaver.cygnus.com) + + * symfile.c (read_target_int_array): rename read_target_long_array + and force the sizeof an ovly_table element to sizeof(long), + instead of sizeof(int). + +Tue Feb 17 18:05:05 1998 Frank Ch. Eigler <fche@cygnus.com> + + * remote-mips.c (mips_request): Use unsigned long during parsing + returned value from monitor, to prevent accidental sign extension. + +Tue Feb 17 14:28:33 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de> + + * acconfig.h: FORCE_MMCHECK changed to MMCHECK_FORCE. + * configure.in: Ditto. + * configure: Regenerated. + +Tue Feb 17 14:07:34 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de> + + * gdbtypes.c (check_typedef): Do not try to resolve the length of + a type which has TYPE_FLAG_TARGET_STUB set, if the target type has + set TYPE_FLAG_TARGET_STUB as well. + +Tue Feb 17 14:32:18 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register): + Pass register size to sim_{fetch,store}_register. Check nr of + register bytes transfered is correct. + +Mon Feb 16 14:05:54 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * remote-d10v.c (remote_d10v_open): Call push_remote_target + instead of open_remote_target. + + * remote.c (remote_xfer_memory): Use REMOTE_TRANSLATE_XFER_ADDRESS + to translate addr/size when defined. + (open_remote_target): Delete. + + * target.h (open_remote_target): Delete. + + * config/d10v/tm-d10v.h (REMOTE_TRANSLATE_XFER_ADDRESS): Define. + +Mon Feb 16 14:05:54 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * config/d10v/tm-d10v.h (USE_STRUCT_CONVENTION): Define. True when + sizeof type > 1. + +Mon Feb 16 14:05:54 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * config/d10v/tm-d10v.h (USE_STRUCT_CONVENTION): Define. True when + sizeof type > 1. + +Sun Feb 15 16:10:50 1998 Ron Unrau <runrau@cygnus.com> + + * parse.c (write_dollar_variable): call new function + target_map_name_to_register to allow targets to define their own + register name aliases. + * infcmd.c (registers_info): use target_map_name_to_register so that + "print $reg" and "info reg $reg" use the same register name aliases. + +Fri Feb 13 16:40:30 1998 Stan Shebs <shebs@andros.cygnus.com> + + * config/i386/i386mk.mt (OBJFORMATS): Delete, no longer used. + * config/i386/xm-i386mk.h: Fix an include. + * config/pyr/tm-pyr.h (PC_INNER_THAN): Remove, never used. + +Thu Feb 12 16:12:07 1998 Frank Ch. Eigler <fche@cygnus.com> + + * remote-mips.c (mips_enter_debug): Sleep before sending CR to + monitor. + (mips_exit_debug): Accept any whitespace / verbiage before monitor + prompt reappears. + +Thu Feb 12 18:25:42 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * d10v-tdep.c (show_regs): Avoid use of %llx when printing 8 byte + accumulators. + +Thu Feb 12 17:10:22 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * valops.c (value_at): For d10v, make read pointers with + read_target_unsigned_integer, keep addresses unsigned. + (value_fetch_lazy): Ditto. + +Thu Feb 12 12:14:02 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * remote-d10v.c: New file. Layer the d10v GDB->remote memory map + on top of the remote serial memory transfer functions. + + * config/d10v/d10v.mt (TDEPFILES): Add remote-d10v.o + + * Makefile.in (remote-d10v.o): Add dependencies. + + * remote.c (remote_open_1): Add arg extended_p, engage extended + protocol when extended_p. + (remote_open, extended_remote_open): Pass !extended_p / + extended_p to remote_open_1. + + * remote.c (open_remote_target), target.h: New function. + +Wed Feb 11 08:41:15 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * config/i386/fbsd.mh (XDEPFILES): Add ser-tcp.o. + +Tue Feb 10 17:50:37 1998 Keith Seitz <keiths@onions.cygnus.com> + + * tracepoint.c (tracepoint_operation): Call the modify_tracepoint_hook + if it exists. + Remove static declaration of free_actions. + + * tracepoint.h: Add declaration of free_actions. + +Tue Feb 10 12:17:13 1998 Fred Fish <fnf@cygnus.com> + + * symtab.c (decode_line_1): Revert change that mistakenly + removed assignment of sals[0].pc field. + +Mon Feb 10 12:37:47 1998 Philippe De Muyter <phdm@macqel.be> + + * m68k/tm-delta68.h (EXTRACT_RETURN_VALUE): Type argument for + `REGISTER_CONVERT_TO_VIRTUAL is `TYPE', not + `REGISTER_VIRTUAL_TYPE (FP0_REGNUM)'; + (STORE_RETURN_VALUE): Ditto, and offset for `write_register_bytes' + is `REGISTER_BYTE (FP0_REGNUM)', not `FP0_REGNUM'. + (FRAME_NUM_ARGS): New macro. + * m68k/tm-news.h (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE): Ditto. + * delta68-nat.c (clear_insn_cache): New function, forgotten in previous + patch. + +Mon Feb 9 11:10:06 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * d10v-tdep.c: Replace references to IMEM_ADDR and DMEM_ADDR with + D10V_MAKE_[DI]ADDR and D10V_CONVERT_[ID]ADDR_TO_RAW macros. + + * config/d10v/tm-d10v.h (IMEM_START): Move to 0x01...... + (DMEM_START): Move to 0x00...... + (STACK_START): Move to 0x00..7ffe. + (D10V_MAKE_IADDR, D10V_MAKE_DADDR): Translate unconditionally. + + * d10v-tdep.c (d10v_xlate_addr): Delete function. + +Mon Feb 9 15:10:21 1998 Fred Fish <fnf@cygnus.com> + + * symtab.c (fixup_psymbol_section): Move forward declaration to + top of file with other such decls. Make it a static function. + * symtab.h: Minor formatting tweaks. + +Mon Feb 9 13:14:12 1998 Stan Shebs <shebs@andros.cygnus.com> + + * config/a29k-udi.mt, config/i960/vxworks960.mt (REMOTE_OBS): + Remove redefinition. + * config/i960/tm-i960.h (BREAKPOINT): Define. + +Mon Feb 9 15:35:38 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.in (init.c): Ignore errors when making init.c. Seems + necessary to work around bug in Solaris make. + +Sun Feb 6 02:44:28 1997 Philippe De Muyter <phdm@macqel.be> + + * m68k/tm-delta68.h (CPLUS_MARKER): Macro deleted. + (EXTRACT_STRUCT_VALUE_ADDRESS): Macro defined. + (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE): Macros modified + because floating-point values return via %fp0. + (CLEAR_INSN_CACHE): New macro. + * m68k/tm-m68k.h (REGISTER_CONVERT_TO_VIRTUAL): Macro fixed + to use DOUBLEST. + (REGISTER_CONVERT_TO_RAW): Ditto. + * infptrace.c (child_xfer_memory): If CLEAR_INSN_CACHE is defined, + call it after having written in child process's memory. + * inflow.c (PROCESS_GROUP_TYPE): Macro defined if HAVE_TERMIO. + (gdb_has_a_terminal, terminal_ours_1): Functions fixed for HAVE_TERMIO. + +Fri Feb 6 16:17:30 1998 Jeffrey A Law (law@cygnus.com) + + * config/mips/tm-mips64.h (TARGET_LONG_BIT): Allow final target to + override. + (TARGET_LONG_LONG_BIT): Likewise. + (TARGET_PTR_BIT): Likewise. +start-sanitize-r5900 + * config/mips/tm-r5900.h (TARGET_PTR_BIT): Define to 32 bits. +end-sanitize-r5900 + +start-sanitize-sky +Fri Feb 6 14:33:34 1998 Doug Evans <devans@canuck.cygnus.com> + + * configure.tgt (mips64r5900*-sky-elf*): Replaces txvu-elf. + * config/mips/txvu.mt (SIM): txvu -> mips. + +end-sanitize-sky +Fri Feb 6 17:42:22 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * config/d10v/tm-d10v.h (D10V_CONVERT_IADDR_TO_RAW, + D10V_CONVERT_DADDR_TO_RAW): Define. + + * d10v-tdep.c (d10v_push_arguments): Re-write. Pass arguments in + registers, regardless of their size, when they fit. + +Thu Feb 5 13:16:36 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * d10v-tdep.c (d10v_extract_return_value): For function pointers + translate address to IMAP area. + + * config/d10v/tm-d10v.h (EXTRA_FRAME_INFO): Delete dummy from + struct. + (POP_FRAME): Point at generic_pop_current_frame. + + * d10v-tdep.c (d10v_pop_frame): Delete code handling dummy frames, + handled earlier. + (d10v_push_return_address): New function. + (d10v_pop_dummy_frame): Delete. + (d10v_fix_call_dummy): Delete. + (d10v_call_dummy_address): Delete. + + * d10v-tdep.c (d10v_init_extra_frame_info): Clear dummy and + frameless. + + * d10v-tdep.c (d10v_push_arguments): Keep stack word aligned. + + * config/d10v/tm-d10v.h (EXTRACT_STRUCT_VALUE_ADDRESS): Extract + address of structure from first ARG1_REGNUM. + + * d10v-tdep.c (d10v_push_arguments): Force 4 byte args into + even-odd register pair. Store 1 and 2 byte args in registers. + + * valops.c (value_fetch_lazy): Ensure that a D10V function pointer + is fetched in the correct byte order. + (value_at): Ditto. Also ensure data pointers are mapped to data + segment. + + * config/d10v/tm-d10v.h (D10V_DADDR_P, D10V_IADDR_P): + + * d10v-tdep.c: Replace 2 with REGISTER_RAW_SIZE. + (d10v_pop_frame): Replace R13 with LR_REGNUM. + (d10v_push_arguments): Replace R2 with ARG1_REGNUM. + (d10v_push_arguments): Replace 6 with ARGN_REGNUM. + (d10v_extract_return_value): Access return value with RET1_REGNUM. + + * config/d10v/tm-d10v.h (ARG1_REGNUM, ARGN_REGNUM, RET1_REGNUM): + Define. + (STORE_RETURN_VALUE): Specify return register using RET1_REGNUM. + (STORE_STRUCT_RETURN): Specify ARG1_REGNUM as the struct ptr + location. + +Thu Feb 5 13:16:36 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * blockframe.c (generic_pop_dummy_frame): Flush the frame, no + longer valid. + + * blockframe.c (generic_pop_current_frame), frames.h: New + function. + +Thu Feb 5 17:18:16 1998 Andrew Cagney <cagney@b1.cygnus.com> + + * remote-sim.c (gdbsim_create_inferior): clear_proceed_status + before /re/starting the simulator. + +Thu Feb 5 15:55:31 1998 C. M. Heard (heard@vvnet.com) + + * top.c (do_nothing): Remove signal handler after signal is caught. + +Thu Feb 5 11:57:06 1998 Michael Snyder (msnyder@cleaver.cygnus.com) + + * tracepoint.c (tracepoint_operation): call free_actions instead + of free. (free_actions): eliminate some memory leaks for actions. + (validate_actionline): pass string arg by reference, so we can + change the pointer. Change all memrange collection arguments to + canonical form (literal address and size), to enforce early + evaluation. Accept UNOP_MEMVAL (assembly variables) for + trace collection. (parse_and_eval_memrange): accept expressions + for the address and size fields of a memrange (and evaluate + them immediately). (several places): use -1 instead of zero + to distinguish an absolute memrange from a register-relative one. + (encode_actions): add handling for UNOP_MEMVAL (assembly variable). + +Wed Feb 4 17:40:21 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * Makefile.in (SFILES): add tracepoint.c. + (LINTFILES): add @CONFIG_SRCS@. + (SOURCES): Ditto. + * configure.in (CONFIG_SRCS): Mirror use of CONFIG_OBS. + * configure: Regenerated. + +Tue Feb 3 16:12:32 1998 Gordon W. Ross (gwr@mc.com) + + * infptrace.c (child_resume): Don't try to step if + NO_SINGLE_STEP is defined. + +Mon Feb 2 19:06:13 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * Makefile.in (VERSION): Bump to 4.16.2. + +Mon Feb 2 17:18:25 1998 Richard Henderson <rth@cygnus.com> + + * alpha-nat.c (fetch_aout_core_registers): Rename from + fetch_core_registers. + (fetch_elf_core_registers): New function. + (supply_gregset): Use ALPHA_REGSET_BASE. + (supply_fpregset): Likewise. + (fill_fpregset): Likewise. + (alpha_aout_core_fns): Rename from alpha_core_fns. + (alpha_elf_core_fns): New. + * config/alpha/alpha-linux.mh (NATDEPFILES): solib.o not osfsolib.o. + Disable MMALLOC. + * config/alpha/nm-linux.h (SVR4_SHARED_LIBS): Define if ELF. + (TARGET_ELF64): Likewise. + (ALPHA_REGSET_BASE): New. + * config/alpha/nm-osf.h (ALPHA_REGSET_BASE): New. + * config/alpha/tm-alphalinux.h: Include tm-sysv4.h. + + * solib.c (elf_locate_base): Add TARGET_ELF64 support. + (info_sharedlibary_command): Likewise. + + * configure.host: Match alpha*. + * configure.tgt: Likewise. + +Fri Jan 30 15:11:38 1998 David Taylor <taylor@texas.cygnus.com> + + Changes by <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE> + * infrun.c (IN_SOLIB_DYNSYM_RESOLVE_CODE): new macro for detecting + whether we are in the dynamic symbol resolution code + (wait_for_inferior): invoke it. + * solib.c (in_svr4_dynsym_resolve_code): new function + (enable_break): record start and end of the dynamic linker + text and plt sections for use in in_svr4_dynsym_resolve_code. + * solib.h (IN_SOLIB_DYNSYM_RESOLVE_CODE): add svr4 definition; + (in_svr4_dynsym_resolve_code): declare it. + * config/nm-gnu.h (solib.h): move inclusion to after definition + of SVR4_SHARED_LIBS. + * config/nm-sysv4.h (solib.h): ditto. + * config/i386/nm-i386sco5.h (solib.h): ditto. + * config/i386/nm-linux.h (solib.h): ditto. + * config/mips/nm-irix5.h (IN_SOLIB_DYNSYM_RESOLVE_CODE): undefine. + +Thu Jan 29 19:39:31 1998 Stan Shebs <shebs@andros.cygnus.com> + + * coffread.c (coff_symtab_read) [SEM]: Remove code, macro can + never be defined. + * dbxread.c (process_one_symbol) [BLOCK_ADDRESS_ABSOLUTE]: + Remove, no longer needed. + * hppa-tdep.c (N_SET_MAGIC): Remove, no longer used. + * config/pa/xm-hppab.h (SEEK_SET, SEEK_CUR, SEEK_END): Ditto. + * config/mips/tm-mipsm3.h (NUMERIC_REG_NAMES): Ditto. + * config/mips/mipsm3.mt (TDEPFILES): Remove mipsread.o. + +Wed Jan 28 14:46:52 1998 Stan Shebs <shebs@andros.cygnus.com> + + Suggested by Chris Walter <walter@budoe.bu.edu>: + * dwarfread.c (set_cu_language): Recognize Fortran. + * dwarf2read.c (set_cu_language): Ditto. + (read_array_type): Fix language test. + +Wed Jan 28 12:51:08 1998 Michael Snyder (msnyder@cleaver.cygnus.com) + + * blockframe.c (generic_frame_chain_valid): A frame pointer may + be valid if it is equal to the frame pointer of its caller (ie. + not necessarily strictly INNER_THAN). Allows frameless functions. + +Wed Jan 28 11:23:25 1998 Mark Alexander <marka@cygnus.com> + + * monitor.c (monitor_vsprintf): New function to handle + printing of large addresses using %A format specifier. + (monitor_printf_noecho, monitor_printf): Use monitor_vsprintf + instead of vsprintf. + * dve3900-rom.c (_initialize_r3900_rom): Use %A instead of %Lx + to print addresses. + +Tue Jan 27 16:14:23 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * configure.in (CONFIG_LDFLAGS): Only add -export-dynamic + when using GNU ld. + +Mon Jan 26 19:07:46 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * config/alpha/tm-alphalinux.h (alpha_linux_sigtramp_offset): + Add closing parenthesis. From HJ Lu. + +Mon Jan 26 17:54:45 1998 Mark Alexander <marka@cygnus.com> + + * dve3900-rom.c: Improve performance by using memory commands + that print less fluff. Minor cosmetic changes. + Eliminate compiler warnings. + +Sat Jan 24 23:44:43 1998 Martin M. Hunt <hunt@cygnus.com> + + * breakpoint.c (enable_breakpoint): Preserve breakpoint + disposition when enabling a breakpoint. + + * symtab.c (find_pc_sect_line): If no symbol information + is found, return correct pc anyway. + +Fri Jan 23 17:26:22 1998 Stan Shebs <shebs@andros.cygnus.com> + + * configure.host (i[3456]86-*-osf1mk*, mips-*-mach3*, + ns32k-*-mach3*): Fix file names. + (i[3456]86-*-os9k, m88*-*-mach3*, w65-*-*): Remove config + recognition, no source files for these. + * configure.tgt (powerpc-*-aix4*): Remove config, now identical + to powerpc-*-aix*. + * config/powerpc/{aix4.mh,aix4.mt,tm-ppc-aix4.h}: Remove files, + no longer needed. + +Fri Jan 23 16:49:41 1998 Mark Alexander <marka@cygnus.com> + + * monitor.c (monitor_write, monitor_readchar): New functions. + * monitor.h (monitor_write, monitor_readchar): Declare. + * dve3900-rom.c: Add support for fast loading on ethernet connections. + +Fri Jan 23 07:47:06 1998 Fred Fish <fnf@cygnus.com> + + * config/d10v/tm-d10v.h (CALL_DUMMY): Define as "{ 0 }". + (TARGET_READ_FP): Define to d10v_read_fp rather than d10v_read_sp. + (TARGET_WRITE_FP): Define to d10v_write_fp rather than d10v_write_sp. + (d10v_write_fp, d10v_read_fp): Add prototypes. + * symtab.c (decode_line_1): Remove assignment of sals[0].pc field. + * symfile.c (simple_overlay_update, simple_overlay_update_1): + Ignore the size of overlay sections. This check is redundant anyway. + * printcmd.c (print_frame_args): Ditto. + * valops.c (value_fetch_lazy): Ditto. + * values.c (unpack_long): Ditto. + * d10v-tdep.c (d10v_frame_chain, d10v_frame_find_saved_regs, + d10v_init_extra_frame_info): Fix some minor bugs so the finish command + works properly. + (show_regs): Change num1 and num2 types from "long long" to "LONGEST". + (d10v_read_fp, d10v_write_fp): New functions. + (d10v_push_arguments): Remove unneeded assigns to "val" and "contents". + (d10v_push_arguments): Fix for pointers and structs. + (d10v_extract_return_value): Fix for pointers and chars. + +Tue Jan 20 18:53:18 1998 Stan Shebs <shebs@andros.cygnus.com> + + * configure.tgt (i386-*-mach*, m88*-*-mach3*): Remove config + recognition, no source files for these (note that the i386 Mach + config is for pre-Mach 3). + (mips*-*-mach3*, ns32k-*-mach3*): Fix file names. + * config/mips/mipsel64.mt: Remove, never referenced. + +Mon Jan 19 14:01:28 1998 Stan Shebs <shebs@andros.cygnus.com> + + * top.c (print_gdb_version): Restore to original message. + +Mon Jan 19 13:34:40 1998 Ian Lance Taylor <ian@cygnus.com> + + From cgf@bbc.com (Chris Faylor): + * win32-nat.c (child_mourn_inferior): Call ContinueDebugEvent to + let the child exit. + (child_kill_inferior): Respond to all debug events as the child is + terminating. + + * Makefile.in (all): Change gdb dependency to gdb$(EXEEXT). + (uninstall): Add $(EXEEXT) to file name to remove. + (gdb$(EXEEXT)): Rename target from plain gdb. + (gdb1$(EXEEXT)): Rename target from plain gdb1. + (clean, mostlyclean): Add $(EXEEXT) to binary names to remove. + +1998-01-16 Felix Lee <flee@cygnus.com> + + * top.c (print_gdb_version): delete stutter. + +Thu Jan 15 12:29:13 1998 Nick Clifton <nickc@cygnus.com> + + * remote-rdi.c (arm_rdi_open): Patch from Tony.Thompson@arm.com + to prevent spurous error messages on non-ICE targets. + +Wed Jan 14 19:27:02 1998 Stan Shebs <shebs@andros.cygnus.com> + + * config/mips/{r3900.mt,r3900l.mt,tm-r3900.h,tm-r3900l.h}: + Remove, no longer used. + +Wed Jan 14 18:11:26 1998 Michael Meissner <meissner@cygnus.com> + + Patch from Jim Wilson. + * d30v-tdep.c (d30v_frame_find_saved_regs_offsets): Properly + declare void function before use. + + * config/d30v/tm-d30v.h (CALL_DUMMY): Initialize as { 0 }, not {}. + +Tue Jan 13 16:38:48 1998 Fred Fish <fnf@cygnus.com> + + * configure.in (--with-mmalloc): Add new configure arg to use the + mmalloc package. Default is to not use it. + (START_INFERIOR_TRAPS_EXPECTED): Define to the integer 2, not + the string "2". + * acconfig.h (USE_MMALLOC, FORCE_MMCHECK): Add #undef. + * configure: Regenerated. + * config.in: Regenerated. + * Makefile.in (MMALLOC_DIR, MMALLOC_SRC): Remove. + (MMALLOC): Set using configure. + (MMALLOC_CFLAGS): Set using configure. + + * config/i386/tm-linux.h (sys_quotactl): Define to 1 rather + than just defining it. + * mpw-make.sed: Undefine USE_MMALLOC rather than defining NO_MMALLOC. + * utils.c (NO_MMALLOC): Use USE_MMALLOC instead. + * objfiles.c: ditto. + * defs.h: ditto. + + * config/sparc/sun4os4.mh (MMALLOC_CFLAGS): Remove. + * config/m68k/sun3os4.mh (MMALLOC_CFLAGS): Remove. + * config/i386/cygwin32.mh (MMALLOC_CFLAGS): Remove. + * config/alpha/alpha-osf3.mh (MMALLOC_CFLAGS): Remove. + * config/alpha/alpha-osf2.mh (MMALLOC_CFLAGS): Remove. + * gdbserver/Makefile.in (MMALLOC_*): Remove. + * config/rs6000/rs6000.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/rs6000/aix4.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/powerpc/aix4.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/powerpc/aix.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/ns32k/ns32km3.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/mips/mipsm3.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/mips/decstation.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/m88k/cxux.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/i386/xm-windows.h (NO_MMALLOC, NO_MMCHECK): Remove. + * config/i386/i386mk.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/i386/i386m3.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/i386/i386gnu.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/alpha/alpha-osf1.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + * config/alpha/alpha-linux.mh (MMALLOC, MMALLOC_CFLAGS): Remove. + +Mon Jan 12 11:46:51 1998 Michael Snyder (msnyder@cleaver.cygnus.com) + + * config/m68k/tm-m68k.h (REGISTER_VIRTUAL_TYPE): make A0 thru A7 + default to void pointer type (so that their default radix is hex). + + * symtab.c: move rbreak_command from no_class to class_breakpoint + so it will be listed under "help breakpoints". + +Sat Jan 10 14:58:04 1998 Stan Shebs <shebs@andros.cygnus.com> + + * rdi-share/hostchan.c: Remove gettimeofday declaration. + +Thu Jan 8 11:03:59 1998 Nick Clifton <nickc@cygnus.com> + + * remote-rdp.c: Applied patches submitted by Tony.Thompson@arm.com + to implement the Angel remote debugging interface. + + * Makefile.in: Add build rules for remote-rdi.c and + rdi-share/libangsd.a. + + * configure.tgt: Updated from source on branch. + * config/arm/tm-arm.h: Updated from source on branch. + * arm-tdep.c: Updated from source on branch. + + * rdi-share: New directory, RDI library contributed by ARM. + +Mon Jan 5 20:21:59 1998 Mark Alexander <marka@cygnus.com> + + * monitor.h (MO_PRINT_PROGRAM_OUTPUT): Define. + * monitor.c (monitor_wait): Echo program output. + * dve3900-rom.c (_initialize_r3900_rom): Remove MO_HANDLE_NL flag, + add MO_PRINT_PROGRAM_OUTPUT flag. + +Mon Jan 5 18:21:11 1998 David Taylor <taylor@texas.cygnus.com> + + * top.h (HAVE_SIGSETJMP): define SIGJMP_BUF, SIGSETJMP, and + SIGLONGJMP appropriately based on whether HAVE_SIGSETJMP is + defined. + * top.c (return_to_top_level, catch_errors): use the new macros + * main.c (SET_TOP_LEVEL): ditto. + * config/xm-sysv4.h (HAVE_SIGSETJMP): Define. + +Fri Jan 2 18:48:58 1998 Mark Alexander <marka@cygnus.com> + + * configure.in: Double up brackets in shell case pattern. + +Fri Jan 2 17:06:05 1998 Michael Snyder (msnyder@cleaver.cygnus.com) + + * tracepoint.c (finish_tfind_command): improved algorithm for + deciding when we've "stepped" into a new stack frame. + (map_args_over_tracepoints): loop over tracepoint list "safely", + since list elements may be deleted during loop. + (read_actions): add actions to history list. + +For older changes see ChangeLog-97 + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: Mon Aug 31 15:42:10 1998 Tom Tromey <tromey@cygnus.com> * top.c (context_hook): Define. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 4a40e16..ce55733 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1,5 +1,5 @@ /* Target-dependent code for the Acorn Risc Machine, for GDB, the GNU Debugger. - Copyright (C) 1988, 1989, 1991, 1992, 1993, 1995, 1996 + Copyright (C) 1988, 1989, 1991, 1992, 1993, 1995, 1996, 1998 Free Software Foundation, Inc. This file is part of GDB. @@ -22,16 +22,85 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "frame.h" #include "inferior.h" #include "gdbcmd.h" - +#include "gdbcore.h" +#include "symfile.h" +#include "gdb_string.h" +#include "coff/internal.h" /* Internal format of COFF symbols in BFD */ + +/* Thumb function addresses are odd (bit 0 is set). Here are some + macros to test, set, or clear bit 0 of addresses. */ +#define IS_THUMB_ADDR(addr) ((addr) & 1) +#define MAKE_THUMB_ADDR(addr) ((addr) | 1) +#define UNMAKE_THUMB_ADDR(addr) ((addr) & ~1) + +/* Macros to round N up or down to the next A boundary; A must be + a power of two. */ +#define ROUND_DOWN(n,a) ((n) & ~((a) - 1)) +#define ROUND_UP(n,a) (((n) + (a) - 1) & ~((a) - 1)) + /* Set to true if the 32-bit mode is in use. */ int arm_apcs_32 = 1; +/* Flag set by arm_fix_call_dummy that tells whether the target function + is a Thumb function. This flag is checked by arm_push_arguments. + FIXME: Change the PUSH_ARGUMENTS macro (and its use in valops.c) to + pass the function address as an additional parameter. */ + +static int target_is_thumb; + +/* Flag set by arm_fix_call_dummy that tells whether the calling function + is a Thumb function. This flag is checked by arm_pc_is_thumb + and arm_call_dummy_breakpoint_offset. */ + +static int caller_is_thumb; + +/* Tell if the program counter value in MEMADDR is in a Thumb function. */ + +int +arm_pc_is_thumb (memaddr) + bfd_vma memaddr; +{ + struct minimal_symbol * sym; + CORE_ADDR sp; + + /* If bit 0 of the address is set, assume this is a Thumb address. */ + if (IS_THUMB_ADDR (memaddr)) + return 1; + + /* Thumb function have a "special" bit set in minimal symbols */ + sym = lookup_minimal_symbol_by_pc (memaddr); + if (sym) + { + return (MSYMBOL_IS_SPECIAL(sym)); + } + else + return 0; +} + +/* Tell if the program counter value in MEMADDR is in a call dummy that + is being called from a Thumb function. */ + +int +arm_pc_is_thumb_dummy (memaddr) + bfd_vma memaddr; +{ + CORE_ADDR sp = read_sp(); + + if (PC_IN_CALL_DUMMY (memaddr, sp, sp+64)) + return caller_is_thumb; + else + return 0; +} + CORE_ADDR arm_addr_bits_remove (val) -CORE_ADDR val; + CORE_ADDR val; { - return (val & (arm_apcs_32 ? 0xfffffffc : 0x03fffffc)); + if (arm_pc_is_thumb (val)) + return (val & (arm_apcs_32 ? 0xfffffffe : 0x03fffffe)); + else + return (val & (arm_apcs_32 ? 0xfffffffc : 0x03fffffc)); } CORE_ADDR @@ -41,6 +110,35 @@ arm_saved_pc_after_call (frame) return ADDR_BITS_REMOVE (read_register (LR_REGNUM)); } +/* A typical Thumb prologue looks like this: + push {r7, lr} + add sp, sp, #-28 + add r7, sp, #12 + Sometimes the latter instruction may be replaced by: + mov r7, sp +*/ + +static CORE_ADDR +thumb_skip_prologue (pc) + CORE_ADDR pc; +{ + CORE_ADDR current_pc; + + for (current_pc = pc; current_pc < pc + 20; current_pc += 2) + { + unsigned short insn = read_memory_unsigned_integer (current_pc, 2); + + if ( (insn & 0xfe00) != 0xb400 /* push {..., r7, lr} */ + && (insn & 0xff00) != 0xb000 /* add sp, #simm */ + && (insn & 0xff00) != 0xaf00 /* add r7, sp, #imm */ + && insn != 0x466f /* mov r7, sp */ + && (insn & 0xffc0) != 0x4640) /* mov r0-r7, r8-r15 */ + break; + } + + return current_pc; +} + /* APCS (ARM procedure call standard) defines the following prologue: mov ip, sp @@ -55,11 +153,28 @@ arm_saved_pc_after_call (frame) CORE_ADDR arm_skip_prologue (pc) -CORE_ADDR pc; + CORE_ADDR pc; { unsigned long inst; - CORE_ADDR skip_pc = pc; + CORE_ADDR skip_pc; + CORE_ADDR func_addr, func_end; + struct symtab_and_line sal; + + /* See what the symbol table says. */ + if (find_pc_partial_function (pc, NULL, & func_addr, & func_end)) + { + sal = find_pc_line (func_addr, 0); + if (sal.line != 0 && sal.end < func_end) + return sal.end; + } + + /* Check if this is Thumb code. */ + if (arm_pc_is_thumb (pc)) + return thumb_skip_prologue (pc); + /* Can't find the prologue end in the symbol table, try it the hard way + by disassembling the instructions. */ + skip_pc = pc; inst = read_memory_integer (skip_pc, 4); if (inst != 0xe1a0c00d) /* mov ip, sp */ return pc; @@ -104,101 +219,735 @@ CORE_ADDR pc; return skip_pc; } -void -arm_frame_find_saved_regs (frame_info, saved_regs_addr) - struct frame_info *frame_info; - struct frame_saved_regs *saved_regs_addr; + + +/* Function: thumb_scan_prologue (helper function for arm_scan_prologue) + This function decodes a Thumb function prologue to determine: + 1) the size of the stack frame + 2) which registers are saved on it + 3) the offsets of saved regs + 4) the offset from the stack pointer to the frame pointer + This information is stored in the "extra" fields of the frame_info. + + A typical Thumb function prologue might look like this: + push {r7, lr} + sub sp, #28, + add r7, sp, #12 + Which would create this stack frame (offsets relative to FP) + old SP -> 24 stack parameters + 20 LR + 16 R7 + R7 -> 0 local variables (16 bytes) + SP -> -12 additional stack space (12 bytes) + The frame size would thus be 36 bytes, and the frame offset would be + 12 bytes. The frame register is R7. */ + +static void +thumb_scan_prologue (fi) + struct frame_info * fi; { - register int regnum; - register int frame; - register int next_addr; - register int return_data_save; - register int saved_register_mask; + CORE_ADDR prologue_start; + CORE_ADDR prologue_end; + CORE_ADDR current_pc; + int saved_reg[16]; /* which register has been copied to register n? */ + int i; - memset (saved_regs_addr, '\0', sizeof (*saved_regs_addr)); - frame = frame_info->frame; - return_data_save = read_memory_integer (frame, 4) & 0x03fffffc - 12; - saved_register_mask = read_memory_integer (return_data_save, 4); - next_addr = frame - 12; - for (regnum = 4; regnum < 10; regnum++) - if (saved_register_mask & (1 << regnum)) - { - next_addr -= 4; - saved_regs_addr->regs[regnum] = next_addr; - } - if (read_memory_integer (return_data_save + 4, 4) == 0xed6d7103) + if (find_pc_partial_function (fi->pc, NULL, & prologue_start, & prologue_end)) { - next_addr -= 12; - saved_regs_addr->regs[F0_REGNUM + 7] = next_addr; + struct symtab_and_line sal = find_pc_line (prologue_start, 0); + + if (sal.line == 0) /* no line info, use current PC */ + prologue_end = fi->pc; + else if (sal.end < prologue_end) /* next line begins after fn end */ + prologue_end = sal.end; /* (probably means no prologue) */ } - if (read_memory_integer (return_data_save + 8, 4) == 0xed6d6103) + else + prologue_end = prologue_start + 40; /* We're in the boondocks: allow for */ + /* 16 pushes, an add, and "mv fp,sp" */ + + prologue_end = min (prologue_end, fi->pc); + + /* Initialize the saved register map. When register H is copied to + register L, we will put H in saved_reg[L]. */ + for (i = 0; i < 16; i++) + saved_reg[i] = i; + + /* Search the prologue looking for instructions that set up the + frame pointer, adjust the stack pointer, and save registers. */ + + fi->framesize = 0; + for (current_pc = prologue_start; current_pc < prologue_end; current_pc += 2) { - next_addr -= 12; - saved_regs_addr->regs[F0_REGNUM + 6] = next_addr; + unsigned short insn; + int regno; + int offset; + + insn = read_memory_unsigned_integer (current_pc, 2); + + if ((insn & 0xfe00) == 0xb400) /* push { rlist } */ + { + /* Bits 0-7 contain a mask for registers R0-R7. Bit 8 says + whether to save LR (R14). */ + int mask = (insn & 0xff) | ((insn & 0x100) << 6); + + /* Calculate offsets of saved R0-R7 and LR. */ + for (regno = LR_REGNUM; regno >= 0; regno--) + if (mask & (1 << regno)) + { + fi->framesize += 4; + fi->fsr.regs[saved_reg[regno]] = -(fi->framesize); + saved_reg[regno] = regno; /* reset saved register map */ + } + } + else if ((insn & 0xff00) == 0xb000) /* add sp, #simm */ + { + offset = (insn & 0x7f) << 2; /* get scaled offset */ + if (insn & 0x80) /* is it signed? */ + offset = -offset; + fi->framesize -= offset; + } + else if ((insn & 0xff00) == 0xaf00) /* add r7, sp, #imm */ + { + fi->framereg = THUMB_FP_REGNUM; + fi->frameoffset = (insn & 0xff) << 2; /* get scaled offset */ + } + else if (insn == 0x466f) /* mov r7, sp */ + { + fi->framereg = THUMB_FP_REGNUM; + fi->frameoffset = 0; + saved_reg[THUMB_FP_REGNUM] = SP_REGNUM; + } + else if ((insn & 0xffc0) == 0x4640) /* mov r0-r7, r8-r15 */ + { + int lo_reg = insn & 7; /* dest. register (r0-r7) */ + int hi_reg = ((insn >> 3) & 7) + 8; /* source register (r8-15) */ + saved_reg[lo_reg] = hi_reg; /* remember hi reg was saved */ + } + else + break; /* anything else isn't prologue */ } - if (read_memory_integer (return_data_save + 12, 4) == 0xed6d5103) +} + +/* Function: check_prologue_cache + Check if prologue for this frame's PC has already been scanned. + If it has, copy the relevant information about that prologue and + return non-zero. Otherwise do not copy anything and return zero. + + The information saved in the cache includes: + * the frame register number; + * the size of the stack frame; + * the offsets of saved regs (relative to the old SP); and + * the offset from the stack pointer to the frame pointer + + The cache contains only one entry, since this is adequate + for the typical sequence of prologue scan requests we get. + When performing a backtrace, GDB will usually ask to scan + the same function twice in a row (once to get the frame chain, + and once to fill in the extra frame information). +*/ + +static struct frame_info prologue_cache; + +static int +check_prologue_cache (fi) + struct frame_info * fi; +{ + int i; + + if (fi->pc == prologue_cache.pc) { - next_addr -= 12; - saved_regs_addr->regs[F0_REGNUM + 5] = next_addr; + fi->framereg = prologue_cache.framereg; + fi->framesize = prologue_cache.framesize; + fi->frameoffset = prologue_cache.frameoffset; + for (i = 0; i <= NUM_REGS; i++) + fi->fsr.regs[i] = prologue_cache.fsr.regs[i]; + return 1; } - if (read_memory_integer(return_data_save + 16, 4) == 0xed6d4103) + else + return 0; +} + + +/* Function: save_prologue_cache + Copy the prologue information from fi to the prologue cache. +*/ + +static void +save_prologue_cache (fi) + struct frame_info * fi; +{ + int i; + + prologue_cache.pc = fi->pc; + prologue_cache.framereg = fi->framereg; + prologue_cache.framesize = fi->framesize; + prologue_cache.frameoffset = fi->frameoffset; + + for (i = 0; i <= NUM_REGS; i++) + prologue_cache.fsr.regs[i] = fi->fsr.regs[i]; +} + + +/* Function: arm_scan_prologue + This function decodes an ARM function prologue to determine: + 1) the size of the stack frame + 2) which registers are saved on it + 3) the offsets of saved regs + 4) the offset from the stack pointer to the frame pointer + This information is stored in the "extra" fields of the frame_info. + + A typical Arm function prologue might look like this: + mov ip, sp + stmfd sp!, {fp, ip, lr, pc} + sub fp, ip, #4 + sub sp, sp, #16 + Which would create this stack frame (offsets relative to FP): + IP -> 4 (caller's stack) + FP -> 0 PC (points to address of stmfd instruction + 12 in callee) + -4 LR (return address in caller) + -8 IP (copy of caller's SP) + -12 FP (caller's FP) + SP -> -28 Local variables + The frame size would thus be 32 bytes, and the frame offset would be + 28 bytes. */ + +static void +arm_scan_prologue (fi) + struct frame_info * fi; +{ + int regno, sp_offset, fp_offset; + CORE_ADDR prologue_start, prologue_end, current_pc; + + /* Check if this function is already in the cache of frame information. */ + if (check_prologue_cache (fi)) + return; + + /* Assume there is no frame until proven otherwise. */ + fi->framereg = SP_REGNUM; + fi->framesize = 0; + fi->frameoffset = 0; + + /* Check for Thumb prologue. */ + if (arm_pc_is_thumb (fi->pc)) + { + thumb_scan_prologue (fi); + save_prologue_cache (fi); + return; + } + + /* Find the function prologue. If we can't find the function in + the symbol table, peek in the stack frame to find the PC. */ + if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end)) + { + /* Assume the prologue is everything between the first instruction + in the function and the first source line. */ + struct symtab_and_line sal = find_pc_line (prologue_start, 0); + + if (sal.line == 0) /* no line info, use current PC */ + prologue_end = fi->pc; + else if (sal.end < prologue_end) /* next line begins after fn end */ + prologue_end = sal.end; /* (probably means no prologue) */ + } + else + { + /* Get address of the stmfd in the prologue of the callee; the saved + PC is the address of the stmfd + 12. */ + prologue_start = (read_memory_integer (fi->frame, 4) & 0x03fffffc) - 12; + prologue_end = prologue_start + 40; /* FIXME: should be big enough */ + } + + /* Now search the prologue looking for instructions that set up the + frame pointer, adjust the stack pointer, and save registers. */ + + sp_offset = fp_offset = 0; + for (current_pc = prologue_start; current_pc < prologue_end; current_pc += 4) + { + unsigned int insn = read_memory_unsigned_integer (current_pc, 4); + + if ((insn & 0xffff0000) == 0xe92d0000) /* stmfd sp!, {..., r7, lr} */ + { + int mask = insn & 0xffff; + + /* Calculate offsets of saved registers. */ + for (regno = PC_REGNUM; regno >= 0; regno--) + if (mask & (1 << regno)) + { + sp_offset -= 4; + fi->fsr.regs[regno] = sp_offset; + } + } + else if ((insn & 0xfffff000) == 0xe24cb000) /* sub fp, ip #n */ + { + unsigned imm = insn & 0xff; /* immediate value */ + unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */ + imm = (imm >> rot) | (imm << (32-rot)); + fp_offset = -imm; + fi->framereg = FP_REGNUM; + } + else if ((insn & 0xfffff000) == 0xe24dd000) /* sub sp, sp #n */ + { + unsigned imm = insn & 0xff; /* immediate value */ + unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */ + imm = (imm >> rot) | (imm << (32-rot)); + sp_offset -= imm; + } + else if ((insn & 0xffff7fff) == 0xed6d0103) /* stfe f?, [sp, -#c]! */ + { + sp_offset -= 12; + regno = F0_REGNUM + ((insn >> 12) & 0x07); + fi->fsr.regs[regno] = sp_offset; + } + else if (insn == 0xe1a0c00d) /* mov ip, sp */ + continue; + else + break; /* not a recognized prologue instruction */ + } + + /* The frame size is just the negative of the offset (from the original SP) + of the last thing thing we pushed on the stack. The frame offset is + [new FP] - [new SP]. */ + fi->framesize = -sp_offset; + fi->frameoffset = fp_offset - sp_offset; + + save_prologue_cache (fi); +} + + +/* Function: find_callers_reg + Find REGNUM on the stack. Otherwise, it's in an active register. One thing + we might want to do here is to check REGNUM against the clobber mask, and + somehow flag it as invalid if it isn't saved on the stack somewhere. This + would provide a graceful failure mode when trying to get the value of + caller-saves registers for an inner frame. */ + +static CORE_ADDR +arm_find_callers_reg (fi, regnum) + struct frame_info * fi; + int regnum; +{ + for (; fi; fi = fi->next) + +#if 0 /* FIXME: enable this code if we convert to new call dummy scheme. */ + if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + return generic_read_register_dummy (fi->pc, fi->frame, regnum); + else +#endif + if (fi->fsr.regs[regnum] != 0) + return read_memory_integer (fi->fsr.regs[regnum], + REGISTER_RAW_SIZE(regnum)); + return read_register (regnum); +} + + +/* Function: frame_chain + Given a GDB frame, determine the address of the calling function's frame. + This will be used to create a new GDB frame struct, and then + INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame. + For ARM, we save the frame size when we initialize the frame_info. + + The original definition of this function was a macro in tm-arm.h: + { In the case of the ARM, the frame's nominal address is the FP value, + and 12 bytes before comes the saved previous FP value as a 4-byte word. } + + #define FRAME_CHAIN(thisframe) \ + ((thisframe)->pc >= LOWEST_PC ? \ + read_memory_integer ((thisframe)->frame - 12, 4) :\ + 0) +*/ + +CORE_ADDR +arm_frame_chain (fi) + struct frame_info * fi; +{ +#if 0 /* FIXME: enable this code if we convert to new call dummy scheme. */ + CORE_ADDR fn_start, callers_pc, fp; + + /* is this a dummy frame? */ + if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + return fi->frame; /* dummy frame same as caller's frame */ + + /* is caller-of-this a dummy frame? */ + callers_pc = FRAME_SAVED_PC(fi); /* find out who called us: */ + fp = arm_find_callers_reg (fi, FP_REGNUM); + if (PC_IN_CALL_DUMMY (callers_pc, fp, fp)) + return fp; /* dummy frame's frame may bear no relation to ours */ + + if (find_pc_partial_function (fi->pc, 0, &fn_start, 0)) + if (fn_start == entry_point_address ()) + return 0; /* in _start fn, don't chain further */ +#endif + CORE_ADDR caller_pc, fn_start; + struct frame_info caller_fi; + int framereg = fi->framereg; + + if (fi->pc < LOWEST_PC) + return 0; + + /* If the caller is the startup code, we're at the end of the chain. */ + caller_pc = FRAME_SAVED_PC (fi); + if (find_pc_partial_function (caller_pc, 0, &fn_start, 0)) + if (fn_start == entry_point_address ()) + return 0; + + /* If the caller is Thumb and the caller is ARM, or vice versa, + the frame register of the caller is different from ours. + So we must scan the prologue of the caller to determine its + frame register number. */ + if (arm_pc_is_thumb (caller_pc) != arm_pc_is_thumb (fi->pc)) { - next_addr -= 12; - saved_regs_addr->regs[F0_REGNUM + 4] = next_addr; + memset (& caller_fi, 0, sizeof (caller_fi)); + caller_fi.pc = caller_pc; + arm_scan_prologue (& caller_fi); + framereg = caller_fi.framereg; } - saved_regs_addr->regs[SP_REGNUM] = next_addr; - saved_regs_addr->regs[PC_REGNUM] = frame - 4; - saved_regs_addr->regs[PS_REGNUM] = frame - 4; - saved_regs_addr->regs[FP_REGNUM] = frame - 12; + + /* If the caller used a frame register, return its value. + Otherwise, return the caller's stack pointer. */ + if (framereg == FP_REGNUM || framereg == THUMB_FP_REGNUM) + return arm_find_callers_reg (fi, framereg); + else + return fi->frame + fi->framesize; } +/* Function: init_extra_frame_info + This function actually figures out the frame address for a given pc and + sp. This is tricky because we sometimes don't use an explicit + frame pointer, and the previous stack pointer isn't necessarily recorded + on the stack. The only reliable way to get this info is to + examine the prologue. */ + void -arm_push_dummy_frame () +arm_init_extra_frame_info (fi) + struct frame_info * fi; { - register CORE_ADDR sp = read_register (SP_REGNUM); - register int regnum; + int reg; + + if (fi->next) + fi->pc = FRAME_SAVED_PC (fi->next); + + memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs); + +#if 0 /* FIXME: enable this code if we convert to new call dummy scheme. */ + if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + { + /* We need to setup fi->frame here because run_stack_dummy gets it wrong + by assuming it's always FP. */ + fi->frame = generic_read_register_dummy (fi->pc, fi->frame, SP_REGNUM); + fi->framesize = 0; + fi->frameoffset = 0; + return; + } + else +#endif + { + arm_scan_prologue (fi); + + if (!fi->next) /* this is the innermost frame? */ + fi->frame = read_register (fi->framereg); + else /* not the innermost frame */ + /* If we have an FP, the callee saved it. */ + if (fi->framereg == FP_REGNUM || fi->framereg == THUMB_FP_REGNUM) + if (fi->next->fsr.regs[fi->framereg] != 0) + fi->frame = read_memory_integer (fi->next->fsr.regs[fi->framereg], + 4); + + /* Calculate actual addresses of saved registers using offsets determined + by arm_scan_prologue. */ + for (reg = 0; reg < NUM_REGS; reg++) + if (fi->fsr.regs[reg] != 0) + fi->fsr.regs[reg] += fi->frame + fi->framesize - fi->frameoffset; + } +} + + +/* Function: frame_saved_pc + Find the caller of this frame. We do this by seeing if LR_REGNUM is saved + in the stack anywhere, otherwise we get it from the registers. - /* opcode for ldmdb fp,{v1-v6,fp,ip,lr,pc}^ */ - sp = push_word (sp, 0xe92dbf0); /* dummy return_data_save ins */ - /* push a pointer to the dummy instruction minus 12 */ - sp = push_word (sp, read_register (SP_REGNUM) - 16); - sp = push_word (sp, read_register (PS_REGNUM)); - sp = push_word (sp, read_register (SP_REGNUM)); + The old definition of this function was a macro: + #define FRAME_SAVED_PC(FRAME) \ + ADDR_BITS_REMOVE (read_memory_integer ((FRAME)->frame - 4, 4)) +*/ + +CORE_ADDR +arm_frame_saved_pc (fi) + struct frame_info * fi; +{ +#if 0 /* FIXME: enable this code if we convert to new call dummy scheme. */ + if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + return generic_read_register_dummy (fi->pc, fi->frame, PC_REGNUM); + else +#endif + { + CORE_ADDR pc = arm_find_callers_reg (fi, LR_REGNUM); + return IS_THUMB_ADDR (pc) ? UNMAKE_THUMB_ADDR (pc) : pc; + } +} + + +/* Return the frame address. On ARM, it is R11; on Thumb it is R7. + Examine the Program Status Register to decide which state we're in. */ + +CORE_ADDR +arm_target_read_fp () +{ + if (read_register (PS_REGNUM) & 0x20) /* Bit 5 is Thumb state bit */ + return read_register (THUMB_FP_REGNUM); /* R7 if Thumb */ + else + return read_register (FP_REGNUM); /* R11 if ARM */ +} + + +/* Calculate the frame offsets of the saved registers (ARM version). */ +void +arm_frame_find_saved_regs (fi, regaddr) + struct frame_info *fi; + struct frame_saved_regs *regaddr; +{ + memcpy (regaddr, &fi->fsr, sizeof (struct frame_saved_regs)); +} + + +void +arm_push_dummy_frame () +{ + CORE_ADDR old_sp = read_register (SP_REGNUM); + CORE_ADDR sp = old_sp; + CORE_ADDR fp, prologue_start; + int regnum; + + /* Push the two dummy prologue instructions in reverse order, + so that they'll be in the correct low-to-high order in memory. */ + /* sub fp, ip, #4 */ + sp = push_word (sp, 0xe24cb004); + /* stmdb sp!, {r0-r10, fp, ip, lr, pc} */ + prologue_start = sp = push_word (sp, 0xe92ddfff); + + /* push a pointer to the dummy prologue + 12, because when + stm instruction stores the PC, it stores the address of the stm + instruction itself plus 12. */ + fp = sp = push_word (sp, prologue_start + 12); + sp = push_word (sp, read_register (PC_REGNUM)); /* FIXME: was PS_REGNUM */ + sp = push_word (sp, old_sp); sp = push_word (sp, read_register (FP_REGNUM)); - for (regnum = 9; regnum >= 4; regnum --) + + for (regnum = 10; regnum >= 0; regnum --) sp = push_word (sp, read_register (regnum)); - write_register (FP_REGNUM, read_register (SP_REGNUM) - 8); + + write_register (FP_REGNUM, fp); + write_register (THUMB_FP_REGNUM, fp); write_register (SP_REGNUM, sp); } +/* Fix up the call dummy, based on whether the processor is currently + in Thumb or ARM mode, and whether the target function is Thumb + or ARM. There are three different situations requiring three + different dummies: + + * ARM calling ARM: uses the call dummy in tm-arm.h, which has already + been copied into the dummy parameter to this function. + * ARM calling Thumb: uses the call dummy in tm-arm.h, but with the + "mov pc,r4" instruction patched to be a "bx r4" instead. + * Thumb calling anything: uses the Thumb dummy defined below, which + works for calling both ARM and Thumb functions. + + All three call dummies expect to receive the target function address + in R4, with the low bit set if it's a Thumb function. +*/ + void -arm_pop_frame () +arm_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p) + char * dummy; + CORE_ADDR pc; + CORE_ADDR fun; + int nargs; + value_ptr * args; + struct type * type; + int gcc_p; { - register CORE_ADDR fp = read_register (FP_REGNUM); - register unsigned long return_data_save = - read_memory_integer (ADDR_BITS_REMOVE (read_memory_integer (fp, 4)) - 12, - 4); - register int regnum; + static short thumb_dummy[4] = + { + 0xf000, 0xf801, /* bl label */ + 0xdf18, /* swi 24 */ + 0x4720, /* label: bx r4 */ + }; + static unsigned long arm_bx_r4 = 0xe12fff14; /* bx r4 instruction */ + + /* Set flag indicating whether the current PC is in a Thumb function. */ + caller_is_thumb = arm_pc_is_thumb (read_pc()); + + /* If the target function is Thumb, set the low bit of the function address. + And if the CPU is currently in ARM mode, patch the second instruction + of call dummy to use a BX instruction to switch to Thumb mode. */ + target_is_thumb = arm_pc_is_thumb (fun); + if (target_is_thumb) + { + fun |= 1; + if (!caller_is_thumb) + store_unsigned_integer (dummy + 4, sizeof (arm_bx_r4), arm_bx_r4); + } - write_register (PS_REGNUM, read_memory_integer (fp - 4, 4)); - write_register (PC_REGNUM, ADDR_BITS_REMOVE (read_register (PS_REGNUM))); - write_register (SP_REGNUM, read_memory_integer (fp - 8, 4)); - write_register (FP_REGNUM, read_memory_integer (fp - 12, 4)); - fp -= 12; - for (regnum = 9; regnum >= 4; regnum--) + /* If the CPU is currently in Thumb mode, use the Thumb call dummy + instead of the ARM one that's already been copied. This will + work for both Thumb and ARM target functions. */ + if (caller_is_thumb) { - if (return_data_save & (1 << regnum)) + int i; + char *p = dummy; + int len = sizeof (thumb_dummy) / sizeof (thumb_dummy[0]); + + for (i = 0; i < len; i++) { - fp -= 4; - write_register (regnum, read_memory_integer (fp, 4)); + store_unsigned_integer (p, sizeof (thumb_dummy[0]), thumb_dummy[i]); + p += sizeof (thumb_dummy[0]); + } + } + + /* Put the target address in r4; the call dummy will copy this to the PC. */ + write_register (4, fun); +} + + +/* Return the offset in the call dummy of the instruction that needs + to have a breakpoint placed on it. This is the offset of the 'swi 24' + instruction, which is no longer actually used, but simply acts + as a place-holder now. + + This implements the CALL_DUMMY_BREAK_OFFSET macro. +*/ + +int +arm_call_dummy_breakpoint_offset () +{ + if (caller_is_thumb) + return 4; + else + return 8; +} + + +CORE_ADDR +arm_push_arguments(nargs, args, sp, struct_return, struct_addr) + int nargs; + value_ptr * args; + CORE_ADDR sp; + int struct_return; + CORE_ADDR struct_addr; +{ + int argreg; + int float_argreg; + int argnum; + int stack_offset; + + /* Initialize the integer and float register pointers. */ + argreg = A1_REGNUM; + float_argreg = F0_REGNUM; + + /* the struct_return pointer occupies the first parameter-passing reg */ + if (struct_return) + write_register (argreg++, struct_addr); + + /* The offset onto the stack at which we will start copying parameters + (after the registers are used up) begins at 16 in the old ABI. + This leaves room for the "home" area for register parameters. */ + stack_offset = REGISTER_SIZE * 4; + + /* Now load as many as possible of the first arguments into + registers, and push the rest onto the stack. Loop thru args + from first to last. */ + for (argnum = 0; argnum < nargs; argnum++) + { + char * val; + value_ptr arg = args[argnum]; + struct type * arg_type = check_typedef (VALUE_TYPE (arg)); + struct type * target_type = TYPE_TARGET_TYPE (arg_type); + int len = TYPE_LENGTH (arg_type); + enum type_code typecode = TYPE_CODE (arg_type); + CORE_ADDR regval; + + val = (char *) VALUE_CONTENTS (arg); + + /* If the argument is a pointer to a function, and it's a Thumb + function, set the low bit of the pointer. */ + if (typecode == TYPE_CODE_PTR + && target_type != NULL + && TYPE_CODE (target_type) == TYPE_CODE_FUNC) + { + regval = extract_address (val, len); + if (arm_pc_is_thumb (regval)) + store_address (val, len, MAKE_THUMB_ADDR (regval)); + } + +#define MAPCS_FLOAT 0 /* --mapcs-float not implemented by the compiler yet */ +#if MAPCS_FLOAT + /* Up to four floating point arguments can be passed in floating + point registers on ARM (not on Thumb). */ + if (typecode == TYPE_CODE_FLT + && float_argreg <= ARM_LAST_FP_ARG_REGNUM + && !target_is_thumb) + { + /* This is a floating point value that fits entirely + in a single register. */ + regval = extract_address (val, len); + write_register (float_argreg++, regval); + } + else +#endif + { + /* Copy the argument to general registers or the stack in + register-sized pieces. Large arguments are split between + registers and stack. */ + while (len > 0) + { + int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE; + + if (argreg <= ARM_LAST_ARG_REGNUM) + { + regval = extract_address (val, partial_len); + + /* It's a simple argument being passed in a general + register. */ + write_register (argreg, regval); + argreg++; + } + else + { + /* Write this portion of the argument to the stack. */ + partial_len = len; + sp -= partial_len; + write_memory (sp, val, partial_len); + } + + len -= partial_len; + val += partial_len; + } } } + + /* Return adjusted stack pointer. */ + return sp; +} + +void +arm_pop_frame () +{ + struct frame_info *frame = get_current_frame(); + int regnum; + + for (regnum = 0; regnum < NUM_REGS; regnum++) + if (frame->fsr.regs[regnum] != 0) + write_register (regnum, + read_memory_integer (frame->fsr.regs[regnum], 4)); + + write_register (PC_REGNUM, FRAME_SAVED_PC (frame)); + write_register (SP_REGNUM, read_register (frame->framereg)); + flush_cached_frames (); } static void print_fpu_flags (flags) -int flags; + int flags; { if (flags & (1 << 0)) fputs ("IVO ", stdout); if (flags & (1 << 1)) fputs ("DVZ ", stdout); @@ -240,72 +989,67 @@ arm_othernames () void convert_from_extended (ptr, dbl) -void *ptr; -double *dbl; + void * ptr; + double * dbl; { *dbl = *(double*)ptr; } void convert_to_extended (dbl, ptr) -void *ptr; -double *dbl; + void * ptr; + double * dbl; { *(double*)ptr = *dbl; } -int -arm_nullified_insn (inst) - unsigned long inst; +static int +condition_true (cond, status_reg) + unsigned long cond; + unsigned long status_reg; { - unsigned long cond = inst & 0xf0000000; - unsigned long status_reg; - if (cond == INST_AL || cond == INST_NV) - return 0; - - status_reg = read_register (PS_REGNUM); + return 1; switch (cond) { case INST_EQ: - return ((status_reg & FLAG_Z) == 0); - case INST_NE: return ((status_reg & FLAG_Z) != 0); + case INST_NE: + return ((status_reg & FLAG_Z) == 0); case INST_CS: - return ((status_reg & FLAG_C) == 0); - case INST_CC: return ((status_reg & FLAG_C) != 0); + case INST_CC: + return ((status_reg & FLAG_C) == 0); case INST_MI: - return ((status_reg & FLAG_N) == 0); - case INST_PL: return ((status_reg & FLAG_N) != 0); + case INST_PL: + return ((status_reg & FLAG_N) == 0); case INST_VS: - return ((status_reg & FLAG_V) == 0); - case INST_VC: return ((status_reg & FLAG_V) != 0); + case INST_VC: + return ((status_reg & FLAG_V) == 0); case INST_HI: - return ((status_reg & (FLAG_C | FLAG_Z)) != FLAG_C); + return ((status_reg & (FLAG_C | FLAG_Z)) == FLAG_C); case INST_LS: - return (((status_reg & (FLAG_C | FLAG_Z)) ^ FLAG_C) == 0); + return ((status_reg & (FLAG_C | FLAG_Z)) != FLAG_C); case INST_GE: - return (((status_reg & FLAG_N) == 0) != ((status_reg & FLAG_V) == 0)); - case INST_LT: return (((status_reg & FLAG_N) == 0) == ((status_reg & FLAG_V) == 0)); + case INST_LT: + return (((status_reg & FLAG_N) == 0) != ((status_reg & FLAG_V) == 0)); case INST_GT: - return (((status_reg & FLAG_Z) != 0) || - (((status_reg & FLAG_N) == 0) != ((status_reg & FLAG_V) == 0))); - case INST_LE: return (((status_reg & FLAG_Z) == 0) && (((status_reg & FLAG_N) == 0) == ((status_reg & FLAG_V) == 0))); + case INST_LE: + return (((status_reg & FLAG_Z) != 0) || + (((status_reg & FLAG_N) == 0) != ((status_reg & FLAG_V) == 0))); } - return 0; + return 1; } #define submask(x) ((1L << ((x) + 1)) - 1) -#define bit(obj,st) (((obj) & (1L << (st))) >> st) -#define bits(obj,st,fn) \ - (((obj) & submask (fn) & ~ submask ((st) - 1)) >> (st)) +#define bit(obj,st) (((obj) >> (st)) & 1) +#define bits(obj,st,fn) (((obj) >> (st)) & submask ((fn) - (st))) #define sbits(obj,st,fn) \ ((long) (bits(obj,st,fn) | ((long) bit(obj,fn) * ~ submask (fn - st)))) #define BranchDest(addr,instr) \ @@ -313,10 +1057,11 @@ arm_nullified_insn (inst) #define ARM_PC_32 1 static unsigned long -shifted_reg_val (inst, carry, pc_val) +shifted_reg_val (inst, carry, pc_val, status_reg) unsigned long inst; int carry; unsigned long pc_val; + unsigned long status_reg; { unsigned long res, shift; int rm = bits (inst, 0, 3); @@ -331,7 +1076,7 @@ shifted_reg_val (inst, carry, pc_val) shift = bits (inst, 7, 11); res = (rm == 15 - ? ((pc_val | (ARM_PC_32 ? 0 : read_register (PS_REGNUM))) + ? ((pc_val | (ARM_PC_32 ? 0 : status_reg)) + (bit (inst, 4) ? 12 : 8)) : read_register (rm)); @@ -364,18 +1109,83 @@ shifted_reg_val (inst, carry, pc_val) } +/* Return number of 1-bits in VAL. */ + +static int +bitcount (val) + unsigned long val; +{ + int nbits; + for (nbits = 0; val != 0; nbits++) + val &= val - 1; /* delete rightmost 1-bit in val */ + return nbits; +} + + +static CORE_ADDR +thumb_get_next_pc (pc) + CORE_ADDR pc; +{ + unsigned long pc_val = ((unsigned long)pc) + 4; /* PC after prefetch */ + unsigned short inst1 = read_memory_integer (pc, 2); + CORE_ADDR nextpc = pc + 2; /* default is next instruction */ + unsigned long offset; + + if ((inst1 & 0xff00) == 0xbd00) /* pop {rlist, pc} */ + { + CORE_ADDR sp; + + /* Fetch the saved PC from the stack. It's stored above + all of the other registers. */ + offset = bitcount (bits (inst1, 0, 7)) * REGISTER_SIZE; + sp = read_register (SP_REGNUM); + nextpc = (CORE_ADDR) read_memory_integer (sp + offset, 4); + nextpc = ADDR_BITS_REMOVE (nextpc); + if (nextpc == pc) + error ("Infinite loop detected"); + } + else if ((inst1 & 0xf000) == 0xd000) /* conditional branch */ + { + unsigned long status = read_register (PS_REGNUM); + unsigned long cond = bits (inst1, 8, 11); + if (cond != 0x0f && condition_true (cond, status)) /* 0x0f = SWI */ + nextpc = pc_val + (sbits (inst1, 0, 7) << 1); + } + else if ((inst1 & 0xf800) == 0xe000) /* unconditional branch */ + { + nextpc = pc_val + (sbits (inst1, 0, 10) << 1); + } + else if ((inst1 & 0xf800) == 0xf000) /* long branch with link */ + { + unsigned short inst2 = read_memory_integer (pc + 2, 2); + offset = (sbits (inst1, 0, 10) << 12) + (bits (inst2, 0, 10) << 1); + nextpc = pc_val + offset; + } + + return nextpc; +} + + CORE_ADDR arm_get_next_pc (pc) CORE_ADDR pc; { - unsigned long pc_val = (unsigned long) pc; - unsigned long this_instr = read_memory_integer (pc, 4); - unsigned long status = read_register (PS_REGNUM); - CORE_ADDR nextpc = (CORE_ADDR) (pc_val + 4); /* Default case */ + unsigned long pc_val; + unsigned long this_instr; + unsigned long status; + CORE_ADDR nextpc; + + if (arm_pc_is_thumb (pc)) + return thumb_get_next_pc (pc); + + pc_val = (unsigned long) pc; + this_instr = read_memory_integer (pc, 4); + status = read_register (PS_REGNUM); + nextpc = (CORE_ADDR) (pc_val + 4); /* Default case */ - if (! arm_nullified_insn (this_instr)) + if (condition_true (bits (this_instr, 28, 31), status)) { - switch (bits(this_instr, 24, 27)) + switch (bits (this_instr, 24, 27)) { case 0x0: case 0x1: /* data processing */ case 0x2: case 0x3: @@ -384,7 +1194,7 @@ arm_get_next_pc (pc) unsigned long rn; int c; - if (bits(this_instr, 12, 15) != 15) + if (bits (this_instr, 12, 15) != 15) break; if (bits (this_instr, 22, 25) == 0 @@ -400,11 +1210,11 @@ arm_get_next_pc (pc) { unsigned long immval = bits (this_instr, 0, 7); unsigned long rotate = 2 * bits (this_instr, 8, 11); - operand2 = ((immval >> rotate) | (immval << (32-rotate)) - & 0xffffffff); + operand2 = ((immval >> rotate) | (immval << (32-rotate))) + & 0xffffffff; } else /* operand 2 is a shifted register */ - operand2 = shifted_reg_val (this_instr, c, pc_val); + operand2 = shifted_reg_val (this_instr, c, pc_val, status); switch (bits (this_instr, 21, 24)) { @@ -523,14 +1333,7 @@ arm_get_next_pc (pc) { /* up */ unsigned long reglist = bits (this_instr, 0, 14); - unsigned long regbit; - - for (; reglist != 0; reglist &= ~regbit) - { - regbit = reglist & (-reglist); - offset += 4; - } - + offset = bitcount (reglist) * 4; if (bit (this_instr, 24)) /* pre */ offset += 4; } @@ -577,17 +1380,160 @@ arm_get_next_pc (pc) return nextpc; } +#include "bfd-in2.h" +#include "libcoff.h" + +static int +gdb_print_insn_arm (memaddr, info) + bfd_vma memaddr; + disassemble_info * info; +{ + if (arm_pc_is_thumb (memaddr)) + { + static asymbol * asym; + static combined_entry_type ce; + static struct coff_symbol_struct csym; + static struct _bfd fake_bfd; + static bfd_target fake_target; + + if (csym.native == NULL) + { + /* Create a fake symbol vector containing a Thumb symbol. This is + solely so that the code in print_insn_little_arm() and + print_insn_big_arm() in opcodes/arm-dis.c will detect the presence + of a Thumb symbol and switch to decoding Thumb instructions. */ + + fake_target.flavour = bfd_target_coff_flavour; + fake_bfd.xvec = & fake_target; + ce.u.syment.n_sclass = C_THUMBEXTFUNC; + csym.native = & ce; + csym.symbol.the_bfd = & fake_bfd; + csym.symbol.name = "fake"; + asym = (asymbol *) & csym; + } + + memaddr = UNMAKE_THUMB_ADDR (memaddr); + info->symbols = & asym; + } + else + info->symbols = NULL; + + if (TARGET_BYTE_ORDER == BIG_ENDIAN) + return print_insn_big_arm (memaddr, info); + else + return print_insn_little_arm (memaddr, info); +} + +/* This function implements the BREAKPOINT_FROM_PC macro. It uses the program + counter value to determine whether a 16- or 32-bit breakpoint should be + used. It returns a pointer to a string of bytes that encode a breakpoint + instruction, stores the length of the string to *lenptr, and adjusts pc + (if necessary) to point to the actual memory location where the + breakpoint should be inserted. */ + +unsigned char * +arm_breakpoint_from_pc (pcptr, lenptr) + CORE_ADDR * pcptr; + int * lenptr; +{ + CORE_ADDR sp = read_sp(); + + if (arm_pc_is_thumb (*pcptr) || arm_pc_is_thumb_dummy (*pcptr)) + { + static char thumb_breakpoint[] = THUMB_BREAKPOINT; + + *pcptr = UNMAKE_THUMB_ADDR (*pcptr); + *lenptr = sizeof (thumb_breakpoint); + + return thumb_breakpoint; + } + else + { + static char arm_breakpoint[] = ARM_BREAKPOINT; + + *lenptr = sizeof (arm_breakpoint); + + return arm_breakpoint; + } +} + +/* Return non-zero if the PC is inside a call thunk (aka stub or trampoline). + This implements the IN_SOLIB_CALL_TRAMPOLINE macro. */ + +int +arm_in_call_stub (pc, name) + CORE_ADDR pc; + char * name; +{ + CORE_ADDR start_addr; + + /* Find the starting address of the function containing the PC. If the + caller didn't give us a name, look it up at the same time. */ + if (find_pc_partial_function (pc, name ? NULL : &name, &start_addr, NULL) == 0) + return 0; + + return strncmp (name, "_call_via_r", 11) == 0; +} + + +/* If PC is in a Thumb call or return stub, return the address of the target + PC, which is in a register. The thunk functions are called _called_via_xx, + where x is the register name. The possible names are r0-r9, sl, fp, ip, + sp, and lr. */ + +CORE_ADDR +arm_skip_stub (pc) + CORE_ADDR pc; +{ + char * name; + CORE_ADDR start_addr; + + /* Find the starting address and name of the function containing the PC. */ + if (find_pc_partial_function (pc, &name, &start_addr, NULL) == 0) + return 0; + + /* Call thunks always start with "_call_via_". */ + if (strncmp (name, "_call_via_", 10) == 0) + { + /* Use the name suffix to determine which register contains + the target PC. */ + static char *table[15] = + { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", + "r8", "r9", "sl", "fp", "ip", "sp", "lr" + }; + int regno; + + for (regno = 0; regno <= 14; regno++) + if (strcmp (&name[10], table[regno]) == 0) + return read_register (regno); + } + return 0; /* not a stub */ +} + + void _initialize_arm_tdep () { - tm_print_insn = print_insn_little_arm; + tm_print_insn = gdb_print_insn_arm; add_com ("othernames", class_obscure, arm_othernames, "Switch to the other set of register names."); + /* ??? Maybe this should be a boolean. */ add_show_from_set (add_set_cmd ("apcs32", no_class, - var_integer, (char *)&arm_apcs_32, + var_zinteger, (char *)&arm_apcs_32, "Set usage of ARM 32-bit mode.\n", &setlist), - &showlist); + & showlist); + +} +/* Test whether the coff symbol specific value corresponds to a Thumb function */ +int +coff_sym_is_thumb(int val) +{ + return (val == C_THUMBEXT || + val == C_THUMBSTAT || + val == C_THUMBEXTFUNC || + val == C_THUMBSTATFUNC || + val == C_THUMBLABEL); } diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h index 4d01254..cfd8fe3 100644 --- a/gdb/config/mips/tm-mips.h +++ b/gdb/config/mips/tm-mips.h @@ -576,7 +576,8 @@ typedef unsigned long t_inst; /* Integer big enough to hold an instruction */ being used to store the symbol size, so the assumption is that the symbol size cannot exceed 2^31. - MAKE_MSYMBOL_SPECIAL tests whether an ELF symbol is "special", i.e. refers + ELF_MAKE_MSYMBOL_SPECIAL + tests whether an ELF symbol is "special", i.e. refers to a 16-bit function, and sets a "special" bit in a minimal symbol to mark it as a 16-bit function MSYMBOL_IS_SPECIAL tests the "special" bit in a minimal symbol @@ -584,9 +585,9 @@ typedef unsigned long t_inst; /* Integer big enough to hold an instruction */ the "info" field with the "special" bit masked out */ -#define MAKE_MSYMBOL_SPECIAL(sym,msym) \ +#define ELF_MAKE_MSYMBOL_SPECIAL(sym,msym) \ { \ - if (((elf_symbol_type *) sym) -> internal_elf_sym.st_other == STO_MIPS16) { \ + if (((elf_symbol_type *)(sym))->internal_elf_sym.st_other == STO_MIPS16) { \ MSYMBOL_INFO (msym) = (char *) (((long) MSYMBOL_INFO (msym)) | 0x80000000); \ SYMBOL_VALUE_ADDRESS (msym) |= 1; \ } \ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 2987882..2339b6b 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1148,8 +1148,8 @@ add_partial_symbol (pdi, objfile) case DW_TAG_subprogram: if (pdi->is_external) { - prim_record_minimal_symbol (pdi->name, pdi->lowpc + baseaddr, - mst_text, objfile); + /*prim_record_minimal_symbol (pdi->name, pdi->lowpc + baseaddr, + mst_text, objfile);*/ add_psymbol_to_list (pdi->name, strlen (pdi->name), VAR_NAMESPACE, LOC_BLOCK, &objfile->global_psymbols, @@ -1157,8 +1157,8 @@ add_partial_symbol (pdi, objfile) } else { - prim_record_minimal_symbol (pdi->name, pdi->lowpc + baseaddr, - mst_file_text, objfile); + /*prim_record_minimal_symbol (pdi->name, pdi->lowpc + baseaddr, + mst_file_text, objfile);*/ add_psymbol_to_list (pdi->name, strlen (pdi->name), VAR_NAMESPACE, LOC_BLOCK, &objfile->static_psymbols, @@ -1195,8 +1195,8 @@ add_partial_symbol (pdi, objfile) if (pdi->locdesc == NULL) return; addr = decode_locdesc (pdi->locdesc, objfile); - prim_record_minimal_symbol (pdi->name, addr + baseaddr, - mst_file_data, objfile); + /*prim_record_minimal_symbol (pdi->name, addr + baseaddr, + mst_file_data, objfile);*/ add_psymbol_to_list (pdi->name, strlen (pdi->name), VAR_NAMESPACE, LOC_STATIC, &objfile->static_psymbols, diff --git a/gdb/elfread.c b/gdb/elfread.c index 95e905f..2669e97 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -538,8 +538,8 @@ elf_symtab_read (abfd, addr, objfile, dynamic) if (msym != NULL) msym->filename = filesymname; #endif -#ifdef MAKE_MSYMBOL_SPECIAL - MAKE_MSYMBOL_SPECIAL (sym,msym); +#ifdef ELF_MAKE_MSYMBOL_SPECIAL + ELF_MAKE_MSYMBOL_SPECIAL(sym,msym); #endif } } |