Commit Graph

14446 Commits

Author SHA1 Message Date
Daniel Jacobowitz fd8f87c5ee * mips-linux-nat.c (mips_linux_cannot_fetch_register)
(mips_linux_cannot_store_register): List supported instead of
	unsupported registers.
2003-07-07 15:17:55 +00:00
Daniel Jacobowitz 13adf674f8 * disasm.c (dump_insns): Separate instructions from addresses. 2003-07-07 15:13:17 +00:00
Andreas Schwab 8de307e0c2 * Makefile.in (m68k-tdep.o, m68klinux-tdep.o): Update
dependencies.
	* m68k-tdep.c (NUM_FREGS): Delete.
	(SIG_PC_FP_OFFSET): Delete.
	(TARGET_M68K): Delete.
	(P_MOVEAL_SP_FP, P_ADDAW_SP, P_ADDAL_SP, P_SUBQW_SP,
	P_SUBQL_SP, P_LEA_SP_SP, P_LEA_PC_A5, P_FMOVEMX_SP,
	P_MOVEL_SP, P_MOVEML_SP): Define.
	(P_MOVL_SP_FP, P_MOVL, P_JSR, P_BSR, P_LEAL, P_MOVML, P_FMOVM,
	P_TRAP): Delete.
        (m68k_register_raw_size): Delete.
	(m68k_register_virtual_size): Delete.
	(m68k_register_type): Renamed from m68k_register_virtual_type and
	add gdbarch argument.
	(m68k_store_struct_return): Delete.
	(m68k_deprecated_extract_return_value): Delete.
	(m68k_deprecated_extract_struct_value_address): Delete.
	(m68k_frame_chain): Delete.
	(m68k_frame_saved_pc): Delete.
	(m68k_fix_call_dummy): Delete.
	(m68k_push_dummy_frame): Delete.
	(m68k_pop_frame): Delete.
	(m68k_extract_return_value): New function.
	(m68k_store_return_value): Rewrite using regcache.
	(m68k_extract_struct_value_address): Rewrite using regcache.
	(m68k_push_dummy_call): New function.
	(struct m68k_frame_cache): Define.
	(m68k_alloc_frame_cache): New function.
	(m68k_analyze_frame_setup): New function.
	(m68k_analyze_register_saves): New function.
	(m68k_analyze_prologue): New function.
	(m68k_skip_prologue): Rewrite using above functions.
	(m68k_unwind_pc): New function.
	(m68k_frame_cache): New function.
	(m68k_frame_this_id): New function.
	(m68k_frame_prev_register): New function.
	(m68k_frame_unwind): New variable.
	(m68k_frame_p): New function.
	(m68k_sigtramp_frame_cache): New function.
	(m68k_sigtramp_frame_this_id): New function.
	(m68k_sigtramp_frame_prev_register): New function.
	(m68k_sigtramp_frame_unwind): New variable.
	(m68k_sigtramp_frame_p): New function.
	(m68k_frame_base_address): New function.
	(m68k_frame_base): New function.
	(m68k_unwind_dummy_id): New function.
	(fill_gregset): Use regcache_collect.
	(fill_fpregset): Likewise.
	(m68k_saved_pc_after_call): Only define if SYSCALL_TRAP is
	defined.
	(m68k_gdbarch_init): Don't define call_dummy_words.  Don't set
	deprecated_init_frame_pc, deprecated_store_struct_return,
	deprecated_extract_return_value, deprecated_store_return_value,
	deprecated_frame_chain, deprecated_frame_saved_pc,
	deprecated_frame_init_saved_regs, deprecated_register_raw_size,
	deprecated_register_virtual_size,
	deprecated_max_register_raw_size,
	deprecated_max_register_virtual_size,
	deprecated_register_virtual_type, deprecated_register_size,
	deprecated_register_byte, deprecated_register_bytes,
	deprecated_fp_regnum, deprecated_use_generic_dummy_frames,
	call_dummy_location, deprecated_call_dummy_breakpoint_offset,
	deprecated_pc_in_call_dummy, deprecated_call_dummy_length,
	deprecated_call_dummy_start_offset, deprecated_call_dummy_words,
	deprecated_sizeof_call_dummy_words, deprecated_fix_call_dummy,
	deprecated_push_dummy_frame, deprecated_pop_frame,
	deprecated_dummy_write_sp.  Set deprecated_saved_pc_after_call
	only if SYSCALL_TRAP is defined.  Set extract_return_value,
	store_return_value, extract_struct_value_address, register_type,
	push_dummy_call, unwind_dummy_id, unwind_pc.  Add two frame unwind
	predicates.
	* m68k-tdep.h (M68K_D1_REGNUM, M68K_NUM_REGS,
	M68K_MAX_REGISTER_SIZE): Define.
	(struct m68k_sigtramp_info): Define.
	(struct gdbarch_tdep): Add get_sigtramp_info.
	* m68klinux-nat.c (fetch_register): Use register_size instead of
	REGISTER_RAW_SIZE.  Don't put assignment in if.
	(store_register): Likewise.
	(fetch_inferior_registers): Likewise.
	(store_inferior_registers): Likewise.
	* m68klinux-tdep.c (m68k_linux_sigtramp_saved_pc): Delete.
	(m68k_linux_frame_saved_pc): Delete.
	(m68k_linux_sigcontext_reg_offset,
	m68k_linux_ucontext_reg_offset): Define.
	(m68k_linux_get_sigtramp_info): New function.
	(m68k_linux_extract_return_value): Rewrite using regcache.
	(m68k_linux_store_return_value): Likewise.
	(m68k_linux_extract_struct_value_address): Likewise.
	(m68k_linux_init_abi): Set get_sigtramp_info in tdep structure.
	Don't set deprecated_frame_saved_pc,
	deprecated_extract_return_value, deprecated_store_return_value,
	deprecated_extract_struct_value_address.  Set
	extract_return_value, store_return_value,
	extract_struct_value_address.
2003-07-07 15:06:11 +00:00
Andreas Schwab 2705e97210 * gdb.asm/m68k.inc: New file.
* gdb.asm/asm-source.exp: Use it for m68k-*-*.
2003-07-07 14:48:50 +00:00
Andrew Cagney eb8bc28217 2003-07-07 Andrew Cagney <cagney@redhat.com>
* expprint.c: Include "user-regs.h" instead of "frame.h".
	(print_subexp): Use user_reg_map_regnum_to_name, instead of
	frame_map_regnum_to_name.
	* frame.c: Include "user-regs.h" instead of "builtin-regs.h".
	(frame_map_name_to_regnum): Simplify, call
	user_reg_map_name_to_regnum.
	(frame_map_regnum_to_name): Simplify, call
	user_reg_map_regnum_to_name.
	(frame_register_unwind): Update.
	* std-regs.c: Include "user-regs.h" instead of "builtin-regs.h".
	(_initialize_frame_reg): Call user_reg_add_builtin.
	* findvar.c: Include "user-regs.h" instead of "builtin-regs.h".
	(value_of_register): Use value_of_user_reg.
	* eval.c (evaluate_subexp_standard): Update.
	* parse.c (write_dollar_variable): Update.
	* d10v-tdep.c (d10v_print_registers_info): Update.
	* infcmd.c (registers_info): Update.
	* Makefile.in (SFILES): Delete "builtin-regs.c", add "user-regs.c".
	(builtin_regs_h): Delete macro.
	(user_regs_h): Define.
	(COMMON_OBS): Delete "builtin-regs.o", add "user-regs.o".
	(builtin-regs.o): Delete target.
	(user-regs.o): Specify dependencies.
	(expprint.o): Update dependencies.
	(findvar.o): Update dependencies.
	(frame.o): Update dependencies.
	(std-regs.o): Update dependencies.
2003-07-07 14:36:58 +00:00
gdbadmin 503e66900f *** empty log message *** 2003-07-07 00:00:31 +00:00
Andreas Schwab 83876b3be5 * gdb.objc/basicclass.exp ("Call an Objective-C method with no
arguments"): Also match negative number.

	* gdb.base/float.exp ("info float"): Add test for m68k-*-*.
2003-07-06 22:27:34 +00:00
Christopher Faylor 9f476a0143 * win32-nat.c (solib_symbols_add): Use one variable for all section address
stuff.  Pass variable rather than address of variable to safe_symbol_file_add.
2003-07-06 19:48:54 +00:00
Andreas Schwab a731b83190 * m68klinux-nat.c (fill_fpregset): Fix use of loop index. 2003-07-06 18:58:26 +00:00
gdbadmin d997928b76 *** empty log message *** 2003-07-06 00:00:01 +00:00
gdbadmin fc814fa1b7 *** empty log message *** 2003-07-05 00:00:02 +00:00
Joel Brobecker 9f83329d30 * rs6000-nat.c (vmap_symtab): Fix compilation error. 2003-07-04 16:42:59 +00:00
Kris Warkentin 27e28cc5db 2003-07-04 Kris Warkentin <kewarken@qnx.com>
* config/i386/nto.mh: Set XM_FILE to xm-i386.h
2003-07-04 15:57:08 +00:00
Kris Warkentin 61bb466e19 2003-07-04 Kris Warkentin <kewarken@qnx.com>
* nto-procfs.c: New file.  Native procfs support for QNX Neutrino.
* config/i386/nto.mh: New file.
* config/i386/nm-nto.h: New file.
* configure.host: Add i[3456]86-*-nto*.
2003-07-04 15:48:57 +00:00
Joel Brobecker 100f2e98f8 * remote-vx.c (vx_add_symbols): Fix compilation error. 2003-07-04 01:27:25 +00:00
gdbadmin 5df1b4db85 *** empty log message *** 2003-07-04 00:00:02 +00:00
Andrew Cagney e23457df3d 2003-07-03 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (REGISTER_NAME): Do not supply a default.
	* gdbarch.h, gdbarch.c: Re-generate.
	* config/sparc/tm-sparc.h (REGISTER_NAME): Define.
	(legacy_register_name): Declare.
	* config/sparc/tm-sp64.h (legacy_register_name): Declare.
	(REGISTER_NAME): Define.
	* sparc-tdep.c (legacy_register_name): New function.
	* config/pa/tm-hppa64.h (REGISTER_NAMES): Delete macro.
	(REGISTER_NAME): Define.
	(hppa64_register_name): Declare.
	* config/pa/tm-hppa.h (REGISTER_NAMES): Delete macro.
	* hppa-tdep.c (hppa_gdbarch_init): Set hppa_register_name.
	(hppa64_register_name): New function.
	(hppa_register_name): New function.
	* arch-utils.c (legacy_register_name): Delete.
	* arch-utils.h (legacy_register_name): Delete.
2003-07-03 22:14:42 +00:00
Daniel Jacobowitz 38caaeec2b * cli/cli-interp.c (cli_interpreter_resume): Update the
cli_uiout's stream to gdb_stdout.
2003-07-03 14:49:26 +00:00
Andrew Cagney dadd712e21 2003-07-03 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE): Add
	predicate.
	* gdbarch.h, gdbarch.c: Re-generate.
	* regcache.c (init_regcache_descr): Use legacy code when either
	REGISTER_BYTE or REGISTER_RAW_SIZE is set.
2003-07-03 14:34:29 +00:00
Daniel Jacobowitz 3a871b371b * gdb.base/store.c (charest): New typedef.
(add_char): Rename to add_charest, update.
	(wack_char): Rename to wack_charest, update types.  Return l + r
	to keep r live across the call.
	(wack_short, wack_int, wack_long, wack_longest, wack_float)
	(wack_double, wack_doublest): Return l + r to keep r live across
	the call.
	* gdb.base/store.exp: Accomodate store.c changes.
2003-07-03 13:55:22 +00:00
gdbadmin 40c5f66968 *** empty log message *** 2003-07-03 00:00:01 +00:00
Daniel Jacobowitz c7f1390e9f * NEWS: Move "set logging" entry into GDB 6.0 section. 2003-07-02 20:51:35 +00:00
Jim Blandy a9dd42f197 * s390-tdep.c (struct frame_extra_info): new member:
'stack_bought_valid'.
(s390_get_frame_info): Set fextra_info->stack_bought_valid if we
initialize fextra_info->stack_bought.
(s390_frameless_function_invocation): Don't trust the value of
fextra_info_ptr->stack_bought unless
fextra_info->stack_bought_valid is set.
2003-07-02 19:20:55 +00:00
Jim Blandy 4bc8c58814 New S390 prologue analyzer.
* s390-tdep.c (struct prologue_value, enum pv_boolean): New types.
(pv_set_to_unknown, pv_set_to_constant, pv_set_to_register,
pv_constant_last, pv_add, pv_add_constant, pv_subtract,
pv_logical_and, pv_is_identical, pv_is_register, pv_is_array_ref,
compute_x_addr, s390_on_stack, s390_store,
s390_get_signal_frame_info): New functions.
(S390_NUM_SPILL_SLOTS): New macro.
(s390_get_frame_info): Rewritten.
(is_arg_reg): Deleted.

Break out the decoding of S/390 instructions into separate
functions, to make it more legible, and easier to check
against the spec.
* s390-tdep.c (is_ri, is_ril, is_rr, is_rre, is_rs, is_rse,
is_rx, is_rxe): New functions.
(op1_aghi, op2_aghi, op1_ahi, op2_ahi, op_ar, op_basr, op1_bras,
op2_bras, op_l, op_la, op1_larl, op2_larl, op_lgr, op1_lghi,
op2_lghi, op1_lhi, op2_lhi, op_lr, op_nr, op_ngr, op_s, op_st,
op_std, op1_stg, op2_stg, op_stm, op1_stmg, op2_stmg, op_svc): New
enums for opcode values.  (Is this an improvement?)
2003-07-02 19:05:56 +00:00
Andrew Cagney fd13a04acf 2003-07-02 Andrew Cagney <cagney@redhat.com>
* i386-tdep.c: Revert change committed as part of trad-frame code
	below.
2003-07-02 17:20:24 +00:00
Daniel Jacobowitz 3f8091c1f6 * breakpoint.c (insert_catchpoint): Make static. 2003-07-02 16:24:00 +00:00
Andreas Jaeger c1da67ba85 * x86-64-tdep.c (x86_64_push_arguments): Align stack to 16-byte
before the call.
	Set %rax only to number of SSE registers used.
2003-07-02 07:45:57 +00:00
gdbadmin 9e238987be *** empty log message *** 2003-07-02 00:00:02 +00:00
Andreas Schwab 8dd5115e3f * ia64-tdep.c (ia64_push_dummy_call): Define as combination of
former ia64_push_arguments and ia64_push_return_address, and use
	regcache functions instead of read/write_register.
	(ia64_gdbarch_init): Set push_dummy_call instead of
	deprecated_push_arguments and deprecated_push_return_address.
2003-07-01 22:32:36 +00:00
Andreas Jaeger a2229c2308 * x86-64-tdep.c (x86_64_push_arguments): Align stack to 16-byte
before the call.
	Set %rax only to number of SSE registers used.
2003-07-01 13:56:13 +00:00
Andrew Cagney 3b3850e852 2003-07-01 Andrew Cagney <cagney@redhat.com>
* trad-frame.h: Update comments, a -1 .addr is reserved.
	(trad_frame_value_p, trad_frame_addr_p): Declare.
	(trad_frame_reg_p): Declare.
	(trad_frame_set_value): Rename trad_frame_register_value.
	(trad_frame_set_unknown): Declare.
	* trad-frame.c (trad_frame_realreg_p): New function.
	(trad_frame_addr_p, trad_frame_value_p): New function.
	(trad_frame_set_unknown): New function.
	(trad_frame_alloc_saved_regs): Initialize .addr to -1, not zero.
	(trad_frame_prev_register): Use trad_frame_realreg_p,
	trad_frame_addr_p and trad_frame_value_p.
	(trad_frame_set_value): Rename trad_frame_register_value.
	* d10v-tdep.c (d10v_frame_unwind_cache): Use trad_frame_addr_p
	and trad_frame_set_value.
2003-07-01 13:25:19 +00:00
Jim Blandy 4d819d0ef5 Patch from IBM (authors unspecified, probably Ulrich Weigand and
Gerhard Tonn) for argument passing on the S/390 and S/390x:
* s390-tdep.c (S390_STACK_FRAME_OVERHEAD): This is always space
for 16 registers, and then 32 more bytes.
(S390_STACK_PARAMETER_ALIGNMENT, S390_NUM_FP_PARAMETER_REGISTERS):
New macros.
(is_double_arg): The s390x doesn't handle DOUBLE_ARGS specially.
Move up in the file, since it's now used by is_simple_arg.
(is_simple_arg): Don't assume registers are four bytes long.
Exclude all double arguments.  Extended floats are not simple
args.
(is_power_of_two): New function.
(pass_by_copy_ref): Call is_power_of_two, and check that the
length fits in a register, rather than listing all the acceptable
sizes.  Extended floats are not passed by reference.
(s390_push_arguments): Don't assume registers are four bytes long.
Reserve an argument register to point to the buffer for structures
returned by value.  Use S390_NUM_FP_PARAMETER_REGISTERS and
S390_STACK_FRAME_OVERHEAD.
2003-07-01 00:05:37 +00:00
gdbadmin a75928a5c5 *** empty log message *** 2003-07-01 00:00:32 +00:00
Andreas Schwab 1ad828f198 * utils.c (internal_vproblem): Use xvasprintf, not xasprintf, to
format error message.
2003-06-30 21:40:05 +00:00
Joel Brobecker 39b00981ac * sparc-tdep.c (stop_after_trap): Remove declaration, not used. 2003-06-30 16:55:31 +00:00
David Carlton 7a20f2c262 Fix indentation of previous commit. 2003-06-30 16:23:29 +00:00
David Carlton b2a7f303a2 2003-06-30 David Carlton <carlton@kealia.com>
Band-aid for PR c++/1245.
	* Makefile.in (cp-support.o): Depend on complaints_h.
	* cp-support.c: Include complaints.h.  Add declaration for
	find_last_component.
	(cp_find_first_component): Separate code into
	cp_find_first_component_aux.
	(cp_find_first_component_aux): Call demangled_name_complaint.
	(demangled_name_complaint): New.

2003-06-30  David Carlton  <carlton@kealia.com>

	* gdb.c++/maint.exp (test_invalid_name): New.
	(test_first_component): Add tests for invalid names.
2003-06-30 16:21:16 +00:00
Andrew Cagney a257b5bbf7 2003-06-30 Andrew Cagney <cagney@redhat.com>
* remote.c (remote_write_bytes): Explicitly compute and then use
	the payload size.  Update comments to reflect.  Fixes problem of
	GDB not sending small packets as found by Fred Fish.
2003-06-30 15:50:52 +00:00
Andrew Cagney 0a2cfde49a 2003-06-30 Andrew Cagney <cagney@redhat.com>
* remote.c (remote_async_wait): Fix -Wformat problem.
2003-06-30 15:03:07 +00:00
Michael Chastain 3c6cb4a1a4 2003-06-29 Michael Chastain <mec@shout.net>
* gdb.c++/inherit.exp (test_print_svi_classes): Accept gdb
	output of '<VTT for class>' for virtual base classes.
2003-06-30 00:12:09 +00:00
gdbadmin 36f443e9a8 *** empty log message *** 2003-06-30 00:00:32 +00:00
Andrew Cagney 3fcb85483c 2003-06-29 Andrew Cagney <cagney@redhat.com>
* remote.c (remote_wait): Call error, and not warning, when the
	packet is corrupt.
	(remote_async_wait): Ditto.
2003-06-29 21:17:22 +00:00
Daniel Jacobowitz 9f9970a3e9 * sparc-tdep.c (sparc_y_regnum): Make external again. 2003-06-29 21:15:24 +00:00
Daniel Jacobowitz f1c2644b92 * gdb.base/completion.exp: Tab-complete "complet" instead of
"compl".
	* gdb.base/complex.exp, gdb.base/complex.c: New files.
2003-06-29 20:32:23 +00:00
Daniel Jacobowitz 180803508c * gdb.base/constvars.exp: Remove most xfails for GCC 3.x.
* gdb.base/volatile.exp: Likewise.
2003-06-29 20:01:59 +00:00
Daniel Jacobowitz 83a8cccaa8 * cli/cli-logging.c (pop_output_files): Add void to function
definition.
2003-06-29 19:41:14 +00:00
Daniel Jacobowitz f56973f819 * gdb.threads/print-threads.exp (test_all_threads): Add kfail for
gdb/1265.
2003-06-29 19:29:42 +00:00
Andrew Cagney d2cf594a90 2003-06-29 Andrew Cagney <cagney@redhat.com>
* frame.c (frame_register_unwind): Use unsigned char when dumping
	the buffer contents.
2003-06-29 13:27:26 +00:00
Daniel Jacobowitz 43d5792ce1 * configure.in: Check whether we need to prototype strerror.
* server.h: Optionally prototype strerror.
	* gdbreplay.c (perror_with_name): Use strerror.
	* linux-low.c (linux_attach_lwp): Use strerror.
	* utils.c (perror_with_name): Use strerror.
	* config.in, configure: Regenerated.
2003-06-29 04:01:39 +00:00
gdbadmin 3f95a617fe *** empty log message *** 2003-06-29 00:00:01 +00:00