Commit Graph

6605 Commits

Author SHA1 Message Date
Michael Snyder be4d133316 2002-01-03 Michael Snyder <msnyder@redhat.com>
Implement a "generate-core-file" command in gdb, save target state.
	* gcore.c: New file.  Implement new command 'generate-core-file'.
	Save a corefile image of the current state of the inferior.
	* linux-proc.c: Add linux-specific code for saving corefiles.
	* target.h (struct target_ops): Add new target vectors for saving
	corefiles; to_find_memory_regions and to_make_corefile_notes.
	(target_find_memory_regions): New macro.
	(target_make_corefile_notes): New macro.
	* target.c (update_current_target): Inherit new target methods.
	(dummy_find_memory_regions): New place-holder method.
	(dummy_make_corefile_notes): New place-holder method.
	(init_dummy_target): Initialize new dummy target vectors.
	* exec.c (exec_set_find_memory_regions): New function.
	Allow the exec_ops vector for memory regions to be taken over.
	(exec_make_note_section): New function, target vector method.
	* defs.h (exec_set_find_memory_regions): Export prototype.
	* procfs.c (proc_find_memory_regions): New function, corefile method.
	(procfs_make_note_section): New function, corefile method.
	(init_procfs_ops): Set new target vector pointers.
	(find_memory_regions_callback): New function.
	(procfs_do_thread_registers): New function.
	(procfs_corefile_thread_callback): New function.
	* sol-thread.c (sol_find_memory_regions): New function.
	(sol_make_note_section): New function.
	(init_sol_thread_ops): Initialize new target vectors.
	* inftarg.c (inftarg_set_find_memory_regions): New function.
	Allow to_find_memory_regions vector to be taken over.
	(inftarg_set_make_corefile_notes): New function.
	Allow to_make_corefile_notes vector to be taken over.
	* thread-db.c (thread_db_new_objfile): Don't activate thread-db
	interface layer if not target_has_execution (may be a corefile).
	* config/i386/linux.mh: Add gcore.o to NATDEPFILES.
	* config/sparc/sun4sol2.mh: Ditto.
	* config/alpha/alpha-linux.mh: Ditto.
	* config/arm/linux.mh: Ditto.
	* config/i386/x86-64linux.mh: Ditto.
	* config/ia64/linux.mh: Ditto.
	* config/m68k/linux.mh: Ditto.
	* config/mips/linux.mh: Ditto.
	* config/powerpc/linux.mh: Ditto.
	* config/sparc/linux.mh: Ditto.
2002-01-09 00:37:02 +00:00
Michael Snyder c6b92abd3d 2002-01-07 Michael Snyder <msnyder@redhat.com>
* arm-linux-nat.c: Remove references to regcache.c internal data
	(registers[] and register_valid[]).
2002-01-08 22:14:15 +00:00
Michael Snyder 4b09dc8c14 2002-01-07 Michael Snyder <msnyder@redhat.com>
* linux-proc.c: New file.  Implement child_pid_to_exec_file,
	so that attaching to a pid will automatically read the process's
	symbol file and shlibs.
	* Makefile.in: Add rule for linux-proc.o.
	* config/nm-linux.h: Define CHILD_PID_TO_EXEC_FILE.
	* config/alpha/alpha-linux.mh: Add linux-proc.o to NATDEPFILES.
	* config/arm/linux.mh: Ditto.
	* config/i386/linux.mh: Ditto.
	* config/i386/x86-64linux.mh: Ditto.
	* config/ia64/linux.mh: Ditto.
	* config/m68k/linux.mh: Ditto.
	* config/mips/linux.mh: Ditto.
	* config/powerpc/linux.mh: Ditto.
	* config/sparc/linux.mh: Ditto.
2002-01-08 22:09:50 +00:00
Michael Snyder c7cccb7613 2002-01-07 Michael Snyder <msnyder@redhat.com>
* solib.c (info_sharedlibrary_command): Use TARGET_PTR_BIT
	instead of bfd_get_arch_size.  Don't bail out just because
	there's no exec_bfd.
2002-01-08 18:55:26 +00:00
Pierre Muller c25b74acfa 2002-01-06 Pierre Muller <muller@ics.u-strasbg.fr>
* win32-nat.c: Add i386-tdep.h dependency.
2002-01-08 08:26:42 +00:00
Michael Snyder 34c0bd933d 2002-01-07 Michael Snyder <msnyder@redhat.com>
* cp-valprint.c (cp_print_value): FIXME comment, alloca size.
	* p-valprint.c (pascal_object_print_value): Ditto.
	* somread.c (som_symtab_read): Ditto.
	* symfile.c (simple_free_overlay_region_table): Ditto.
	* valops.c (value_assign): Ditto.
2002-01-08 02:09:31 +00:00
Michael Snyder 21c1c9207f 2002-01-07 Michael Snyder <msnyder@redhat.com>
* tracepoint.c (tracepoint_save_command): From Klee Deines --
	use tilde_expand and strerror for opening save-tracepoints file.
2002-01-08 01:52:12 +00:00
Michael Snyder 5bbd998e61 2002-01-07 Michael Snyder <msnyder@redhat.com>
* thread-db.c (thread_db_new_objfile): Indendation fix.
2002-01-08 01:34:12 +00:00
Michael Snyder 94cd915f48 2002-01-07 Michael Snyder <msnyder@redhat.com>
* infptrace.c (GDB_MAX_ALLOCA): New define.
	(child_xfer_memory): Use xmalloc/xfree instead of alloca if the
	size of the buffer exceeds GDB_MAX_ALLOCA (default 1 megabyte,
	can be overridden with whatever value is appropriate to the host).
	* infttrace.c (child_xfer_memory): Add FIXME warning about use of
	alloca to allocate potentially large buffer.
	* rs6000-nat.c (child_xfer_memory): Ditto.
	* symm-nat.c (child_xfer_memory): Ditto.
	* x86-64-linux-nat.c (child_xfer_memory): Ditto.
2002-01-08 00:59:31 +00:00
Jackie Smith Cashion 494e8a93ef 2002-01-07 Jackie Smith Cashion <jsmith@redhat.com>
From Nick Clifton  <nickc@redhat.com>
	* d10v-tdep.c: Set STACK_START to 0x200bffe.
2002-01-07 20:43:46 +00:00
Michael Snyder d0e1d48ef4 2002-01-07 Michael Snyder <msnyder@redhat.com>
* solib-legacy.c (legacy_svr4_fetch_link_map_offsets):
	Don't use exec_bfd if it's NULL.
2002-01-07 19:45:14 +00:00
Mark Kettenis 290b2c7ad8 * valops.c (value_arg_coerce): Fix formatting. 2002-01-06 22:09:08 +00:00
Andrew Cagney aef21287e3 <string.h> -> "gdb_string.h" 2002-01-06 19:18:28 +00:00
Andrew Cagney 30efa6272a Doco which targets are not multi-arch. 2002-01-06 19:10:24 +00:00
Andrew Cagney 9b4ff27668 * MAINTAINERS: Mark a29k target as obsolete.
* Makefile.in (a29k-tdep.o, remote-adapt.o, remote-eb.o)
(remote-mm.o, remote-udi.o): Obsolete.  Remove references in
comments.
* NEWS: Note that a29k targets are obsolete.
* a29k-tdep.c: Mark as obsolete.
* configure.tgt: Mark a29k-*-aout*, a29k-*-coff*, a29k-*-elf*,
a29k-*-ebmon*, a29k-*-kern*, a29k-*-none*, a29k-*-udi* and
a29k-*-vxworks* targets as obsolete.
* remote-adapt.c: Obsolete.
* remote-eb.c: Obsolete.
* remote-mm.c: Obsolete.
* remote-udi.c: Obsolete.
* config/a29k/a29k-udi.mt: Obsolete.
* config/a29k/a29k.mt: Obsolete.
* config/a29k/tm-a29k.h: Obsolete.
* config/a29k/tm-vx29k.h: Obsolete.
* config/a29k/vx29k.mt: Obsolete.
2002-01-06 15:02:01 +00:00
Andrew Cagney a9011d31b6 last? remaining BIG_ENDIAN switch 2002-01-06 04:50:56 +00:00
Andrew Cagney 79e10fabfc Move changelog to correct position. 2002-01-06 04:37:53 +00:00
Andrew Cagney 9299404eba Don't include <endian.h> 2002-01-05 22:06:38 +00:00
Jason Thorpe 7e89e3575d * acconfig.h (HAVE_PT_GETXMMREGS): New.
* config.in: Regenerate.
* configure.in: Update copyright years.
Add test for PT_GETXMMREGS supplied by <sys/ptrace.h>.
* configure: Regenerate.
* i386bsd-nat.c: Update copyright years.
(fill_gregset): Use regcache_collect.
(fetch_inferior_registers): Only fetch integer registers
if requested to do so.  Add support for XMM registers
using PT_GETXMMREGS.
(store_inferior_registers): Only store integer registers
if requested to do so.  Add support for XMM registers
using PT_SETXMMREGS.
* i386nbsd-nat.c (fetch_inferior_registers): Remove.
(store_inferior_registers): Remove.
(fetch_core_registers): Use supply_gregset and i387_supply_fsave.
(fetch_elfcore_registers): New function.
(i386nbsd_elfcore_fns): New.
(_initialize_i386nbsd_nat): Register i386nbsd_elfcore_fns.
* config/i386/nbsd.mh (NATDEPFILES): Add i387-nat.o and
i386bsd-nat.o.
* config/i386/nbsdelf.mh (NATDEPFILES): Likewise.
* config/i386/nbsd.mt (TDEPFILES): Add i386bsd-nat.o.
* config/i386/nbsdelf.mt (TDEPFILES): Likewise.
* config/i386/tm-nbsd.h: Update copyright years.
(HAVE_SSE_REGS): Define.
(IN_SIGTRAMP): Define as i386bsd_in_sigtramp.
(SIGTRAMP_START): Redefine as i386bsd_sigtramp_start.
(SIGTRAMP_END): Redefine as i386bsd_sigtramp_end.
(SIGCONTEXT_PC_OFFSET): Remove.
(FRAME_SAVED_PC): Define as i386bsd_frame_saved_pc.
2002-01-05 18:36:32 +00:00
Andrew Cagney a752853e6e Remove obsolete MacOS support. 2002-01-05 05:54:31 +00:00
Andrew Cagney d7449b42d3 s/BIG_ENDIAN/BFD_ENDIAN_BIG/ 2002-01-05 04:30:46 +00:00
Daniel Jacobowitz 356374e821 2002-01-04 Daniel Jacobowitz <drow@mvista.com>
* thread-db.c (thread_db_new_objfile): Do not enable thread_db
        for core files.
2002-01-05 01:46:30 +00:00
Jason Thorpe a2b8f8f88f * config/arm/nbsd.mh (XDEPFILES): Remove ser-tcp.o. 2002-01-04 23:49:04 +00:00
Andrew Cagney 12466af99c Move value_ptr typedef to gdbtk-wrapper from value.h. 2002-01-04 23:21:38 +00:00
Jason Thorpe 3549ab40a5 * i386nbsd-nat.c: Update copyright years.
Include i386-tdep.h.
2002-01-04 22:43:31 +00:00
Elena Zannoni fec8b34f93 Mention PR number fixed. 2002-01-04 19:55:08 +00:00
Elena Zannoni fedbd09164 2002-01-04 Elena Zannoni <ezannoni@redhat.com>
* stabsread.c: Update copyright years.

	From Debashis Mahata <debashis.mahata@wipro.com>:
	(read_struct_fields): Deal with Sun C compiler erroneous stab
	output for structs and unions.
2002-01-04 19:43:09 +00:00
Daniel Jacobowitz eb43544b6f 2002-01-04 Daniel Jacobowitz <drow@mvista.com>
* p-valprint.c: Include "cp-abi.h" for baseclass_offset
        prototype.
2002-01-04 19:16:28 +00:00
Daniel Jacobowitz 1514d34ee0 2002-01-04 Daniel Jacobowitz <drow@mvista.com>
* cp-abi.c: Fix whitespace.
        (baseclass_offset): New wrapper function.
        * cp-abi.h (baseclass_offset): Add prototype.
        (struct cp_abi_ops): Add baseclass_offset pointer.

        * valops.c (vb_match): Move to...
        * gnu-v2-abi.c (vb_match): here.
        * valops.c (baseclass_offset): Move to...
        * gnu-v2-abi.c (gnuv2_baseclass_offset): here, and rename.

        * gnu-v3-abi.c (gnuv3_baseclass_offset): New function.

        * gnu-v2-abi.c (init_gnuv2_ops): Initialize baseclass_offset.
        * gnu-v3-abi.c (init_gnuv3_ops): Likewise.
        * hpacc-abi.c (init_hpacc_ops): Likewise.
2002-01-04 18:20:19 +00:00
Daniel Jacobowitz 7f8c928258 2002-01-04 Daniel Jacobowitz <drow@mvista.com>
* valops.c (find_overload_match): Accept obj as a
        reference parameter.  Update it before returning.
        * value.h (find_overload_match): Update prototype.
        * eval.c (evaluate_subexp_standard): Pass object to
        find_overload_match by reference.
2002-01-04 17:51:38 +00:00
Andrew Cagney f23631e444 s/value_ptr/struct value */ 2002-01-04 05:20:09 +00:00
Andrew Cagney a1a5b71e88 Roll ChangeLog files. 2002-01-03 06:02:43 +00:00
Mark Kettenis d2a7c97aaf * i386-tdep.h (struct gdbarch_tdep): Add `os_ident' member.
* i386-tdep.c: Include "elf-bfd.h".
(process_note_abi_tag_sections): New function.
(i386_gdbarch_init): Add code to recognize various OS/ABI
combinations.
2002-01-01 16:29:43 +00:00
Mark Kettenis c5ad026aef * maint.c (_initialize_maint_cmds): Add missing in
string-literal.
2002-01-01 15:17:40 +00:00
Michael Snyder 902d0061c7 2001-12-30 Michael Snyder <msnyder@redhat.com>
* sparc-tdep.c (sparc-store-return-value): Whitespace fix-up.
2001-12-30 17:00:43 +00:00
Elena Zannoni 1fcc0bb8b2 2001-12-29 Elena Zannoni <ezannoni@redhat.com>
* Makefile.in (rs6000-tdep.o): Add dependency on parser-defs.h.

	* rs6000-tdep.c: Include parser-defs.h.
	(rs6000_register_virtual_type): Rewrite, including handling of
	AltiVec regs type.
	(altivec_register_p): New function.
	(rs6000_do_altivec_registers): New function.
	(rs6000_altivec_registers_info): New function.
	(rs6000_do_registers_info): New function.
	(R16): Define.
	(PPC_ALTIVEC_REGS): Define.
	(registers_powerpc): Add AltiVec registers.
	(registers_7400): Define.
	(variants): Add 7400 machine.
	(rs6000_gdbarch_init): Set the numbers of AltiVec registers.
	Initialize gdbarch_do)_registers_info.
	(rs6000_info_power_command): New function.
	(info_power_cmdlist): New static variable.
	(_initialize_rs6000_tdep): Add new 'info powerpc altivec' command.

	* ppc-tdep.h (struct gdbarch_tdep): Add altivec regnum fields.
	(altivec_register_p): Export.
2001-12-30 00:14:50 +00:00
Mark Kettenis 2c48bda39c * i386bsd-nat.c (reg_offset): Fix typo. 2001-12-29 20:15:47 +00:00
Mark Kettenis ec80a8ea8b * i386-tdep.c (i386_push_dummy_frame): Don't write back the
modified frame pointer until the old frame pointer has been saved.
2001-12-29 19:38:16 +00:00
Andrew Cagney 428721aaa3 * arch-utils.c (initialize_current_architecture): Test byte_order
against BFD_ENDIAN_UNKNOWN.
(gdbarch_info_init): Initialize byte_order to BFD_ENDIAN_UNKNOWN.
* gdbarch.sh: Update comments on default value of byte_order.
(verify_gdbarch, gdbarch_update_p): Test byte_order against
BFD_ENDIAN_UNKNOWN.
* gdbarch.h, gdbarch.c: Re-generate.
2001-12-29 19:25:58 +00:00
Michael Snyder 388faa4837 2001-12-21 Michael Snyder <msnyder@redhat.com>
* procfs.c (info_proc_cmd): Add the 'mappings' sub-command that
	was dropped a few years ago, when procfs.c was rewritten.
	(info_proc_mappings): New function, implement 'info proc mappings'.
	(mappingflags): New function.
	(_initialize_procfs): Document new option to 'info proc' command.
2001-12-28 19:47:08 +00:00
Michael Snyder c38333241f 2001-12-27 Michael Snyder <msnyder@redhat.com>
* i386-linux-nat.c: Include i386-tdep.h.
2001-12-27 19:52:31 +00:00
Michael Snyder b01d807cd9 2001-12-27 Michael Snyder <msnyder@redhat.com>
* maint.c (match_substring): GNU coding standards fixes.
	(print_bfd_section_info): Ditto.
	(print_objfile_section_info): Ditto.
2001-12-27 19:33:05 +00:00
Mark Kettenis 473e38f346 * maint.c (match_substring): Make parameters `string' and `substr'
const.  Make local variable `tok' const.
2001-12-27 15:37:35 +00:00
Mark Kettenis 96297dabb3 * config/i386/tm-i386.h (FP7_REGNUM, FIRST_FPU_CTRL_REGNUM,
FCTRL_REGNUM, FPC_REGNUM, FSTAT_REGNUM, FTAG_REGNUM, FCS_REGNUM,
FCOFF_REGNUM, FDS_REGNUM, FDOFF_REGNUM, FOP_REGNUM,
LAST_FPU_CTRL_REGNUM, XMM0_REGNUM, XMM7_REGNUM, MXCSR_REGNUM,
IS_FP_REGNUM, IS_SSE_REGNUM): Removed.
(FP0_REGNUM): Define conditionally depending on HAVE_I387_REGS.
(SIZEOF_FPU_CTRL_REGS): Hardcode value.
* i386-tdep.h (struct gdbarch_tdep): Change such that it contains
a single member `num_xmm_regs'.
(FPC_REGNUM): New macro.
(FIRST_FPU_REGNUM, LAST_FPU_REGNUM, FISRT_XMM_REGNUM,
LAST_XMM_REGNUM, MXCSR_REGNUM, FIRST_FPU_CTRL_REGNUM,
LAST_FPU_CTRL_REGNUM): Removed.
(FCTRL_REGNUM, FSTAT_REGNUM, FTAG_REGNUM, FOP_REGNUM, XMM0_REGNUM,
MXCSR_REGNUM): Define unconditionally.  Change macros to match the
comment describing the register layout.
(FISEG_REGNUM, FIOFF_REGNUM, FOSEG_REGNUM, FOOFF_REGNUM): New macros.
(FP_REGNUM_P, FPC_REGNUM_P, SSE_REGNUM_P): New macros.
(IS_FP_REGNUM, IS_FPU_CTRL_REGNUM, IS_SSE_REGNUM): Make obsolete,
unconditionally define in terms of FP_REGNUM_P, FPC_REGNUM_P and
SSE_REGNUM_P).
(FCS_REGNUM, FCOFF_REGNUM, FDS_REGNUM, FDOFF_REGNUM): Make
obsolete, unconditionally define in terms of FISEG_REGNUM,
FIOFF_REGNUM, FOSEG_REGNUM, FOOFF_REGNUM.
* i386-tdep.c (i386_gdbarch_init): Initialize `num_xmm_regs'
member of `struct gdbarch_tdep'.
* x86-64-tdep.c (i386_gdbarch_init): Change initialization of
`struct gdbarch_tdep'.
* i387-nat.c (FCS_REGNUM, FCOFF_REGNUM, FDS_REGNUM, FDOFF_REGNUM):
Replace with FISEG_REGNUM, FIOFF_REGNUM, FOSEG_REGNUM and
FOOFF_REGNUM.  Use FPC_REGNUM instead of FIRST_FPU_CTRL_REGNUM.
Use XMM0_REGNUM instead of LAST_FPU_CTRL_REGNUM.
2001-12-27 15:22:27 +00:00
Andrew Cagney f976f6d464 * cli/cli-script.c (execute_control_command): Replace value_ptr
with a struct value pointer.
* ch-lang.c (evaluate_subexp_chill): Ditto.
* printcmd.c (printf_command): Ditto.
* tracepoint.c (set_traceframe_context): Ditto.
(encode_actions): Ditto.
* eval.c (evaluate_subexp_standard): Ditto.
2001-12-25 22:24:39 +00:00
Andrew Cagney 06b25f14b0 * gdbarch.sh: When an int variable, print value using %d instead
of %ld.
* gdbarch.c: Re-generate.
2001-12-25 22:19:40 +00:00
Tom Rix dfea300e54 powerpc aix build failure. Add self to maintainers. 2001-12-24 20:07:02 +00:00
Tom Tromey 58d370e0e6 * configure, config.in: Rebuilt.
* configure.in: Check for realpath.
	* defs.h (gdb_realpath): Declare.
	* symtab.h (partial_symtab): Added fullname field.
	* source.c (openp): Use gdb_realpath.
	(forget_cached_source_info): Clear full name of each partial
	symtab.
	* utils.c (gdb_realpath): New function.
	* symtab.c (lookup_symtab): Removed.
	(lookup_symtab_1): Renamed to lookup_symtab.
	(lookup_symtab): Look for real path.
	(lookup_partial_symtab): Likewise.
2001-12-21 22:32:37 +00:00
Michael Snyder a532ca6282 2001-12-21 Michael Snyder <msnyder@redhat.com>
* maint.c (match_substring): New function.  Tokenizer for
        'maintenance info sections' command arguments.
        (match_bfd_flag): Use match_substring.
        (print_bfd_section_info): Use match_substring.
        (print_objfile_section_info): Use match_substring.
        (maintenance_info_sections): Use match_substring.
2001-12-21 17:30:02 +00:00
Orjan Friberg dbbff68389 2001-12-21 Orjan Friberg <orjanf@axis.com>
* configure.tgt: Delete CRIS from multi-arch targets.

	* config/cris/tm-cris.h: New file.

	* config/cris/cris.mt (TDEPFILES): Add corelow.o solib.o solib-svr4.o.
	(TM_FILE): New macro.

	* cris-tdep.c (cris_examine): Correct check for srp register.
	(supply_gregset, fetch_core_registers,
	cris_linux_svr4_fetch_link_map_offsets, cris_fpless_backtrace):
	New functions.
	(_initialize_cris_tdep): Add core functions and new command.
	(cris_gdbarch_init): Define link map offsets.
2001-12-21 09:53:58 +00:00
Jeff Law 9b3128c4d9 * somsolib.c (som_solib_add): Ignore the solib limit threshhold
if AUTO_SOLIB_LIMIT is not greater than zero.

        * somsolib.c (som_solib_create_inferior_hook): No longer warn
        about missing __d_pid symbol.
2001-12-20 23:40:15 +00:00
Elena Zannoni 45229ea46c 2001-12-20 Elena Zannoni <ezannoni@redhat.com>
* ppc-linux-nat.c (ppc_ptrace_cannot_fetch_store_register):
	New function.
	(fetch_register): New function.
	(fetch_ppc_registers): New function.
	(fetch_inferior_registers): New function.
	(store_register): New function.
	(store_ppc_registers): New function.
	(store_inferior_registers): New function.
	(ppc_register_u_addr): Eliminate ustart parameter and its
	uses. Make static.
	(PT_READ_U, PT_WRITE_U, PTRACE_XFER_TYPE): Define if needed.
	Include sys/ptrace.h.

	* config/powerpc/nm-linux.h (FETCH_INFERIOR_REGISTERS): Define.
	(U_REGS_OFFSET, REGISTER_U_ADDR): Delete.

	* config/powerpc/linux.mh (NATDEPFILES): Delete core-aout.o.
2001-12-20 23:31:27 +00:00
Elena Zannoni 2a18e3d9a9 2001-12-20 Elena Zannoni <ezannoni@redhat.com>
* rs6000-nat.c (fetch_register): Don't error out unless the
        register number is really bogus.
2001-12-20 23:29:24 +00:00
Michael Snyder e3d3bfda1f 2001-12-20 Michael Snyder <msnyder@redhat.com>
* maint.c (maintenance_info_sections): Accept new argument
	'ALLOBJ', iterate over all object files.
	(print_section_table): Delete.  Replaced by:
	(print_section_info): New function.
	(print_bfd_section_info): New function.
	(print_objfile_section_info): New function.
	(_initialize_maint_commands): Add help for new features.
2001-12-20 22:31:24 +00:00
Kevin Buettner d4473757f1 * arm-tdep.c (arm_scan_prologue): Don't require "mov ip, sp"
to be the first instruction in the prologue.  Also, revise
	the way the frame offset is computed for frameless functions.
2001-12-20 21:56:56 +00:00
Kevin Buettner f079148d61 Fix some ARM call dummy problems. 2001-12-20 21:40:22 +00:00
Michael Snyder 43155bc167 2001-12-20 Michael Snyder <msnyder@redhat.com>
* maint.c (maintenance_info_sections): Pass string argument to
	print_section_table, so that it can be used to select sections.
	(print_section_table): Change PTR to void *.  Look at string arg
	to select sections by name and by flag attributes.
	(match_bfd_flags): New function.
	(print_bfd_flags): New function.
2001-12-20 21:03:03 +00:00
Jeff Law 47724592cf * cli/cli-decode.c (add_cmd): Initialize pre_show_hook in
the new command.
2001-12-20 18:35:30 +00:00
Andrew Cagney b323314b01 * remote.c (struct packet_reg): Add field in_g_packet.
(struct remote_state): Rename field g_packet to regs;
(free_remote_state): Update.
(init_remote_state): Add pseudo-registers to table.  Initialize
in_g_packet.  Drop sentinal from table.
(packet_reg_from_regnum, packet_reg_from_pnum): Update.
(remote_fetch_registers): Handle registers not in the g-packet.
(remote_store_registers): Ditto.
2001-12-20 17:39:58 +00:00
Andrew Cagney 2c283bc467 * gdbarch.sh (TARGET_CHAR_SIGNED): Do not specify the print
format.
2001-12-20 17:23:06 +00:00
Jim Blandy 1a889ea5ea * s390-tdep.c (s390_pop_frame_regular): Make sure the saved_regs
array is actually set before we try to use it.
2001-12-20 08:55:31 +00:00
Jim Blandy 529765f487 * s390-tdep.c (s390_frame_saved_pc_nofix): If we get the saved PC
out of the return address register, cache that in the frame's
extra info, just as if we'd gotten it from the saved regs array;
that way, it's not a lie to set the saved_pc_valid flag.
2001-12-20 08:54:02 +00:00
Jim Blandy 76cc2cf029 * s390-tdep.c (s390_get_frame_info): Give orig_sp a reasonable
value, even when fextra_info->stack_bought can't be trusted,
2001-12-20 08:52:37 +00:00
Jim Blandy c5e243bbc4 * s390-tdep.c (s390_readinstruction): Don't call
info->read_memory_func to read zero bytes.  Some targets'
xfer_memory functions can't cope with that.
2001-12-20 08:50:47 +00:00
Jim Blandy 2e7db62a77 * gdbarch.sh (TARGET_CHAR_SIGNED): New macro.
* gdbarch.c, gdbarch.h: Regenerated.
* gdbtypes.c (build_gdbtypes): If TARGET_CHAR_SIGNED is zero,
set the TYPE_FLAG_UNSIGNED bit on the type.
* s390-tdep.c (s390_gdbarch_init): On the S/390, characters
are unsigned by default.
* rs6000-tdep.c (rs6000_gdbarch_init): Same for PowerPC and
RS6000.
2001-12-20 08:33:34 +00:00
Elena Zannoni 16a0f3e75e 2001-12-19 Elena Zannoni <ezannoni@redhat.com>
* corefile.c (do_captured_read_memory_integer,
        safe_read_memory_integer): New functions.
        * gdbcore.h (safe_read_memory_integer): Export.
        * arm-tdep.c (arm_scan_prologue): Use safe_read_memory_integer,
        to read the frame value, to capture calls to error().
2001-12-19 23:54:27 +00:00
Jim Blandy b09677dcf8 * s390-tdep.c (s390_register_name): S390_LAST_REGNUM is, in fact,
the last register number, not one greater than the last register
number.

* s390-tdep.c (s390_register_virtual_type): Replace clever but
incorrect range comparison with correct, legible equivalent.
2001-12-19 23:07:53 +00:00
Jim Blandy 23b7362fd7 * s390-tdep.c (s390_register_raw_size): Replace unnecessarily
obscure range comparison with legible equivalent.
2001-12-19 22:24:49 +00:00
Jeff Law 1cdb71fe7e * config/pa/tm-hppa.h (STORE_RETURN_VALUE): Use hppa_store_return_value.
(EXTRACT_RETURN_VALUE): Similarly.
        * hppa-tdep.c (hppa_store_return_value): New function.
        (hppa_extract_return_value): New function.
2001-12-19 20:21:43 +00:00
Jeff Law 6c482b8720 * infttrate.c (child_acknowledge_created_inferior): Pass
correct argument to add_thread.
        (update_thread_state_after_attach): Likewise.
2001-12-19 19:16:50 +00:00
Fernando Nasser 80fcf3f023 2001-12-19 Fernando Nasser <fnasser@redhat.com>
* config/arm/tm-arm.h: Properly define SOFTWARE_SINGLE_STEP_P.
	Always define SOFTWARE_SINGLE_STEP.
	* config/arm/tm-embed.h: Properly define SOFTWARE_SINGLE_STEP_P.
	* arm-tdep.c (arm_get_next_pc, thumb_get_next_pc, bitcount,
	shifted_reg_val): Always compile these functions.
	(arm_software_single_step): Fix second argument in function calls.
2001-12-19 17:57:42 +00:00
Andrew Cagney fb6ecb0ffc Add function gdbarch_info_init() replaces memset(). 2001-12-19 14:14:52 +00:00
Jim Blandy ae23c7a369 * c-lang.c (c_emit_char): Print ASCII 11 as '\v', to match
ISO C, and our parser.  Print ASCII 0 as '\0', since that's what
people are used to seeing.
2001-12-19 06:29:18 +00:00
Jim Blandy 78a5120271 * c-lang.c (c_printstr, c_builtin_types, cplus_builtin_types):
Fix indentation.
2001-12-19 03:07:08 +00:00
Jim Blandy c0d4a49f4e * Makefile.in (c-exp.tab.o): Delete duplicate build rule. Fix
dependency list on remaining build rule.
2001-12-19 02:45:36 +00:00
Martin Hunt 67a59bc02d 2001-12-18 Martin M. Hunt <hunt@redhat.com>
* ser-tcp.c (tcp_open): Disable Nagle algorithm which
	improves performance in some cases.
2001-12-18 18:54:18 +00:00
Ben Harris de7dd7a986 2001-12-17 Ben Harris <bjh21@netbsd.org>
* armbsd-nat.c: Remove file, renamed to armnbsd-nat.c.
	* armnbsd-nat.c: New file, renamed from armbsd-nat.c.
	* Makefile.in: Rename armbsd-nat.c to armnbsd-nat.c.
	* config/arm/nbsd.mh: Likewise.
2001-12-17 21:14:10 +00:00
Corinna Vinschen c9f63e6b7f * NEWS: Note new target XStormy16.
* MAINTAINERS: Add -Werror to XStormy16.
2001-12-17 18:13:11 +00:00
Fernando Nasser 9512d7fdf5 2001-12-17 Fernando Nasser <fnasser@redhat.com>
From Richard Earnshaw <rearnsha@arm.com>:
	* arm-tdep.c (arm_software_single_step): New function. Implements
	software single-stepping for ARM targets.
	(arm_get_next_pc, thumb_get_next_pc, bitcount, shifted_reg_val): Only
	needed for software single-stepping.
	* config/arm/tm-arm.h: Activate SOFTWARE_SINGLE_STEP_P.
2001-12-17 17:03:58 +00:00
Fernando Nasser c5c586eddb 2001-12-17 Fernando Nasser <fnasser@redhat.com>
From Richard Earnshaw <rearnsha@arm.com>:
        * config/arm/nbsd.mh, config/arm/nbsd.mt, config/arm/tm-nbsd.h,
        config/arm/nm-nbsd.h, config/arm/xm-nbsd.h: New files.
        * armbsd-nat.c: New file.
        * Makefile.in: Build it.
        * configure.host, configure.tgt: Support NetBSD/arm.
2001-12-17 16:37:35 +00:00
Corinna Vinschen 7c0a2a0aaa * MAINTAINERS: Add myself as XStormy16 maintainer. 2001-12-17 15:52:33 +00:00
Kevin Buettner 2d5177f34b Conditionally include solib.h. 2001-12-16 00:59:58 +00:00
Andrew Cagney 33cce46887 Regenerate. 2001-12-15 18:07:57 +00:00
Andrew Cagney 8dacb7ef2e * MAINTAINERS: Remove powerpcle-eabi and rs6000-ibm-aix3.2 from
target list.
2001-12-15 17:09:04 +00:00
Andrew Cagney 778eb05eac LITTLE_ENDIAN -> BFD_ENDIAN_LITTLE 2001-12-15 16:53:24 +00:00
Andrew Cagney a6c47c143a * ui-out.c (struct ui_out_table): Add field entry_level.
(verify_field): New function.
(verify_field_proper_position): Delete function.
(verify_field_alignment): Delete function.
(ui_out_field_int): Update to use verify_field.
(ui_out_field_skip): Ditto.
(ui_out_field_string): Ditto.
(ui_out_field_fmt): Ditto.
(ui_out_table_begin): Initialize table.entry_level.
(ui_out_table_end): Clear table.entry_level.
(ui_out_begin): Call verify_field before pushing the new tuple or
list onto the stack.  Use table.entry_level.
2001-12-15 05:18:42 +00:00
Corinna Vinschen 2d6f4d1516 * config/djgpp/fnchange.lst: Add entries for opcodes/xstormy16-* files. 2001-12-14 09:27:42 +00:00
Andrew Cagney ef8570deb0 Return typelength of register virtual type as size. 2001-12-13 23:48:34 +00:00
Jackie Smith Cashion e6ccd35f61 gdb/ChangeLog
2001-12-13  Jackie Smith Cashion  <jsmith@redhat.com>

	* cli/cli-script.c (print_command_lines): Remove extra
	"if", "else", "while", and "end" from show user output.

testsuite/ChangeLog
2001-12-13  Jackie Smith Cashion  <jsmith@redhat.com>

        * gdb.base/commands.exp (user_defined_command_test): Make "show user"
        test expect string more specific.
2001-12-13 22:42:23 +00:00
Kevin Buettner 5d003c9592 * i387-nat.c (i387_fill_fxsave): Change type of ``val'' from char
to short so that we don't memcpy() beyond the end of this buffer.
	Also, change shift value used in computing val to account for the
	fact that only eight bits are used.
2001-12-13 17:34:52 +00:00
Corinna Vinschen 0c884e1782 * Makefile.in: Add support for xstormy16.
* configure.tgt: Ditto.
	* xstormy16-tdep.c: New file.
	* config/xstormy16/xstormy16.mt: New file.
2001-12-13 13:34:41 +00:00
Andreas Schwab 49d5aff7e5 * MAINTAINERS (write-after-approval): Add myself. 2001-12-13 10:29:21 +00:00
Jim Blandy 29e472bc65 * Makefile.in (c-exp.tab.o): Add missing dependencies. 2001-12-12 14:21:30 +00:00
Jim Blandy 68c4266554 * Makefile.in (c_lang_h): New variable. Use it in dependency
lists, instead of `c-lang.h' itself.
2001-12-12 14:13:24 +00:00
Fred Fish 74a9bb82c5 Approved by Jim Blandy:
2001-12-11  Fred Fish  <fnf@redhat.com>
	* c-typeprint.c (c_type_print_base): Use type flags access macros
	to test bits.
	* ch-typeprint.c (chill_type_print_base): Ditto.
	* ch-valprint.c (chill_val_print): Ditto.
	* d10v-tdep.c (d10v_pointer_to_address): Ditto.
	* dwarf2read.c (dwarf2_add_member_fn): Ditto.
	* dwarfread.c (read_structure_scope): Ditto.
	* gdbtypes.c (create_range_type): Dittol
	(create_set_type): Ditto.
	(check_typedef): Ditto.
	* jv-typeprint.c (java_type_print_base): Ditto.
	* p-typeprint.c (pascal_type_print_base): Ditto
	* p-valprint.c (pascal_val_print): Ditto.
	* stabsread.c (read_cfront_member_functions): Ditto.
	(read_member_functions): Ditto.
	(cleanup_undefined_types): Ditto.
	* valprint.c (val_print): Ditto.
	* valops.c (hand_function_call): Remove is_prototyped
	variable and just use type flag test macro directly.
2001-12-12 02:11:52 +00:00
Fred Fish e9e79dd9fc Approved by Jim Blandy:
2001-12-11  Fred Fish  <fnf@redhat.com>

	* gdbtypes.c (print_bound_type): New function.
	(recursive_dump_type): Print type struct code values
	TYPE_CODE_BITSTRING, TYPE_CODE_COMPLEX, TYPE_CODE_TEMPLATE,
	and TYPE_CODE_TEMPLATE_ARG.
	(recursive_dump_type): Print type struct members
	upper_bound_type, lower_bound_type, cv_type, and as_type.
	Also always print the tagname member, even when it is NULL.

	* testsuite/gdb.base/maint.exp: Update to match changes in
	type dumping code.
2001-12-12 02:07:12 +00:00
Michael Snyder 0e7c5946f3 2001-12-11 Michael Snyder <msnyder@redhat.com>
* d10v-tdep.c (d10v_register_virtual_size): Delete.
	(d10v_gdbarch_init): Use generic_register_virtual_size.
	* rs6000-tdep.c (rs6000_register_virtual_size): Delete.
	(rs6000_gdbarch_init): Use generic_register_virtual_size.
	* x86-64-tdep.c (x86_64_register_virtual_size): Delete.
	(i386_gdbarch_init): Use generic_register_virtual_size.
2001-12-11 22:16:48 +00:00
Michael Snyder ce29138a6e 2001-12-10 Michael Snyder <msnyder@redhat.com>
* arch-utils.c (generic_register_virtual_size): New function.
	* arch-utils.h: Export generic version of register_virtual_size.
	* gdbarch.sh (REGISTER_VIRTUAL_SIZE): Use new function as default.
	* gdbarch.c: Regenerate.
2001-12-11 22:15:55 +00:00
Andrew Cagney 5ae326fa70 Rearange code to supress -Wuninitialized error. 2001-12-11 18:35:38 +00:00
Fred Fish 0478d61cc2 Approved by Jim Blandy:
2001-12-10  Fred Fish  <fnf@redhat.com>
	* values.c (value_fn_field): Add physname variable.  Use a minimal
	symbol if we don't find a full symbol.  Remove setting of the new
	value's type since that was already done by allocate_value().
	Remove obsolete commented out error call since callees need to
	handle a NULL return, which is possible result not an error.
	* eval.c (evaluate_subexp_standard): Move check for inlined
	functions to precede attempt to dereference a NULL argvec[0].
2001-12-10 23:05:00 +00:00