Commit Graph

23885 Commits

Author SHA1 Message Date
Pedro Alves 9d49bdc28a * frame.c (has_stack_frames): Make public.
(get_prev_frame): Don't allow a NULL this_frame anymore.
	* frame.h (has_stack_frames): Declare.
	* varobj.c (find_frame_addr_in_frame_chain): Don't ever pass NULL
	to get_prev_frame, instead start at get_current_frame.
	(varobj_create): Check has_stack_frames before getting any frame;
	eliminate one usage of deprecated_safe_get_selected_frame.
2009-02-05 17:28:21 +00:00
Thiago Jung Bauermann 12453b93bd gdb/
2009-02-05  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* python/python.c (GdbMethods): Move to bottom of file.
	(get_parameter, execute_gdb_command, gdbpy_write,
	gdbpy_flush): Remove forward declarations.
	(eval_python_from_control_command): Fix error checking of function
	PyRun_SimpleString.  Fix error string.
	(python_command): Likewise.
	(execute_gdb_command): Added from_tty argument.

gdb/doc/
2009-02-05  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Basic Python): Document execute's from_tty
	argument.
2009-02-05 16:40:34 +00:00
Tristan Gingold aacd552b10 2009-02-05 Tristan Gingold <gingold@adacore.com>
* gdb.base/sigbpt.exp: Detect which signal is received when a NULL
	pointer is dereferenced and use this signal name in regexp.
	* gdb.base/signull.exp: Ditto.
	* gdb.base/sigbpt.c (main): Catch SIGBUS too.
	* gdb.base/signull.c (main): Ditto.
2009-02-05 13:59:18 +00:00
Thiago Jung Bauermann ae6a3a4c2a 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
* language.h (language_dfn): Add la_get_string member.
	(LA_GET_STRING): New macro.
	(default_get_string): New prototype.
	* language.c (default_get_string): New function.
	(unknown_language_defn, auto_language_defn, local_language_defn): Use
	default_get_string for la_get_string.
	* c-lang.c (c_get_string): New function.
	(c_language_defn, cplus_language_defn, asm_language_defn): Use
	c_get_string for la_get_string.
	(minimal_language_defn): Likewise
	* ada-lang.c (ada_language_defn): Likewise.
	* f-lang.c (f_language_defn): Use default_get_string for
	la_get_string.
	* jv-lang.c (java_language_defn): Likewise.
	* m2-lang.c (m2_language_defn): Likewise.
	* objc-lang.c (objc_language_defn): Likewise.
	* p-lang.c (p_language_defn): Likewise.
	* scm-lang.c (scm_language_defn): Likewise.
	* typeprint.c (type_to_string): New function.
	* value.h (type_to_string): New prototype.
	* valprint.c (val_print_string): Factor out code for reading string
	from the inferior into its own function.  Put 2 spaces after period
	in comments.
	(read_string): New function.
	* valprint.h (read_string): New prototype.
2009-02-05 12:16:25 +00:00
Tom Tromey fa8a61dc87 2009-01-07 Pierre Muller <muller@ics.u-strasbg.fr>
Tom Tromey  <tromey@redhat.com>

	PR breakpoints/8079:
	* breakpoint.c (print_one_breakpoint): Use exp_string field
	to display expression of watchpoints.
	(mention): Likewise.
	(watch_command_1): Remove trailing whitespace from expression.
	* printcmd.c (struct display) <exp_string>: New field.
	(display_command): Set exp_string.
	(free_display): Free exp_string.
	(clear_displays): Use free_display.
	(do_one_display): Print exp_string.
	(display_info): Likewise.
2009-02-05 00:13:43 +00:00
gdbadmin d50297662a *** empty log message *** 2009-02-05 00:00:32 +00:00
Thiago Jung Bauermann 08c637dee2 gdb/
2009-02-04  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Phil Muldoon  <pmuldoon@redhat.com>

	* python/python-internal.h (gdbpy_get_value_from_history): Rename
	prototype to gdbpy_history.
	(gdbpy_is_string): Declare.
	(python_string_to_host_string): Declare.
	* python/python-utils.c (gdbpy_is_string): New function.
	(unicode_to_encoded_string): New function.
	(unicode_to_target_string): Use it.
	(python_string_to_host_string): New function.
	* python/python-value.c (valpy_address): New function.
	(convert_value_from_python): Use gdbpy_is_string.  Change to throw
	Python exception instead of a GDB exception on error.  Properly check
	Python booleans.
	(valpy_getitem): Convert field name to host string.  Handle array
	accesses.  Adapt to new behaviour of convert_value_from_python.
	(valpy_new): Adapt to new behaviour of convert_value_from_python.
	(enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
	VALPY_BITXOR, VALPY_BITOR>: New constants.
	(valpy_binop): Update.  Adapt to new behaviour of
	convert_value_from_python.
	(valpy_invert): New function.
	(valpy_lsh): Likewise.
	(valpy_rsh): Likewise.
	(valpy_and): Likewise.
	(valpy_or): Likewise.
	(valpy_xor): Likewise.
	(valpy_richcompare): Call convert_value_from_python instead of doing
	conversions itself.
	(is_intlike, valpy_int, valpy_long, valpy_float): New functions.
	(gdbpy_get_value_from_history): Rename
	function to gdbpy_history.
	(gdbpy_initialize_values): Don't set tp_new.
	(value_object_type): Add valpy_new.
	(value_object_methods): Add `address' entry.
	(value_object_as_number): Update for new methods.
	* python/python.c (GdbMethods): Rename entry from
	`get_value_from_history' to `history'.

gdb/doc/
2009-02-04  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Basic Python): Document gdb.history.

gdb/testsuite/
2009-02-04  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.python/python-value.exp: Use `gdb.history' instead of
	`gdb.value_from_history'.
	(test_value_numeric_ops): Add test for conversion of enum constant.
	* gdb.python/python-value.c (enum e): New type.
	(evalue): New global.
	(main): Use argv.
2009-02-04 21:55:40 +00:00
Jerome Guitton 20261af84c * gdb.ada/uninitialized_vars: New test program.
* gdb.ada/uninitialized_vars.exp: New testcase.
2009-02-04 18:09:38 +00:00
Jerome Guitton 538e13a60c Fix a type in the last entry. 2009-02-04 17:48:45 +00:00
Jerome Guitton b530497149 * ada-lang.c (ada_template_to_fixed_record_type_1): Check size
of type to guard against a crash.
2009-02-04 17:46:36 +00:00
Jerome Guitton 33d502b41a * value.c (value_from_contents_and_address): Always return
a lval_memory value, even if address is null.
2009-02-04 15:49:30 +00:00
Tristan Gingold 9f08ae4f53 2008-12-05 Tristan Gingold <gingold@adacore.com>
* i386-darwin-tdep.c (darwin_sigtramp_p): New function.
	(i386_darwin_sigcontext_addr): Ditto.
	(amd64_darwin_sigcontext_addr): Ditto.
	(darwin_dwarf_signal_frame_p): Ditto.
	(i386_darwin_init_abi): Handle signal frames, use the const for
	sc_num_regs.
	(x86_darwin_init_abi_64): Ditto.
2009-02-04 15:10:50 +00:00
Tristan Gingold 4bd207efc8 2009-02-04 Tristan Gingold <gingold@adacore.com>
* i386-tdep.c (i386_sigtramp_p): Make it public.
	* i386-tdep.h (i386_sigtramp_p): Declare.
2009-02-04 14:49:41 +00:00
Tristan Gingold 4aa99a8802 (I forgot to commit the ChangeLog file in my last commit).
2009-02-04  Tristan Gingold  <gingold@adacore.com>

	* machoread.c (macho_symfile_read): Read minsymtab also from
	shared libraries.
	(macho_symfile_read): Try to read dwarf2 frame info from main
	object file, but not from OSO files.
	(macho_symfile_offsets): Update section names for latest BFD
	changes.
	* i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
	(x86_darwin_init_abi_64): Ditto.
	* solib-darwin.c: New file.
	* solib-darwin.h: New file.
	* configure.tgt: Add solib.o solib-darwin.o for Darwin.
2009-02-04 14:48:38 +00:00
Jerome Guitton 4eb7c0169a Add a missing Changelog entry:
2009-01-28  Daniel Jacobowitz  <dan@codesourcery.com>
	    Jerome Guitton  <guitton@adacore.com>

	* configure, config.in: Regenerated.
	* configure.ac: Add --with-system-gdbinit.
	* main.c (get_init_files): New.
	(captured_main): Use get_init_files.  Load system gdbinit before
	$HOME/.gdbinit.
	(print_gdb_help): Print location of init files.
2009-02-04 11:41:44 +00:00
Tristan Gingold cf1061c036 2009-02-04 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_symfile_read): Read minsymtab also from
	shared libraries.
	(macho_symfile_read): Try to read dwarf2 frame info from main
	object file, but not from OSO files.
	(macho_symfile_offsets): Update section names for latest BFD
	changes.
	* i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
	(x86_darwin_init_abi_64): Ditto.
	* solib-darwin.c: New file.
	* solib-darwin.h: New file.
	* configure.tgt: Add solib.o solib-darwin.o for Darwin.
2009-02-04 08:47:56 +00:00
Tristan Gingold 7a848be1e4 2009-02-04 Tristan Gingold <gingold@adacore.com>
* solist.h (struct target_so_ops): Comment fallback behavior for
	operation same.
2009-02-04 08:42:11 +00:00
gdbadmin 644f599bfc *** empty log message *** 2009-02-04 00:00:03 +00:00
Tom Tromey b32d97f3d2 * completer.c (add_struct_fields): Check type_name against NULL
before use.
2009-02-03 19:20:02 +00:00
Joel Brobecker 692263b89b * MAINTAINERS: Update Elena's email address. 2009-02-03 18:51:38 +00:00
Joel Brobecker bfa149ac1e * breakpoint (update_watchpoint): Minor comment adjustment. 2009-02-03 01:09:35 +00:00
Tom Tromey 52e44b4398 Fix ChangeLog to point to the correct bug, PR gdb/9594.
gdb/testsuite
	* gdb.cp/cpcompletion.exp: Name the test "pr9594".
	* gdb.cp/pr2489.cc: Rename...
	* gdb.cp/pr9594.cc: ... to this.
2009-02-03 01:09:01 +00:00
Tom Tromey 1c71341a8f gdb
PR gdb/2489:
	* completer.c (count_struct_fields): Count method names.
	(add_struct_fields): Add matching method names.
gdb/testsuite
	* gdb.cp/Makefile.in (EXECUTABLES): Add pr2489.
	* gdb.cp/pr2489.cc: New file.
	* gdb.cp/cpcompletion.exp: New file.
2009-02-03 01:00:40 +00:00
gdbadmin d6c26522f3 *** empty log message *** 2009-02-03 00:00:03 +00:00
Doug Evans 85541719ae * config/tcl.m4 (SC_PATH_TCLCONFIG): Don't exit 0 if tclconfig fails.
(SC_PATH_TKCONFIG): Don't exit 0 if tkconfig fails.
	(SC_LOAD_TCLCONFIG): Quote all uses of TCL_BIN_DIR, it may contain
	"# no Tcl configs found".
	(SC_LOAD_TKCONFIG): Similarily for TK_BIN_DIR.

	* gdb/configure.ac (gdbkt): Check both no_tcl/no_tk first, before
	doing any further tcl/tk configury.  Don't configure gdbtk if
	tcl or tk check fails.
	* gdb/aclocal.m4: Regenerate.
	* gdb/configure: Regenerate.
	* gdb/gdbtk/plugins/aclocal.m4: Regenerate.
	* gdb/gdbtk/plugins/configure: Regenerate.
2009-02-02 23:18:05 +00:00
Tom Tromey a42952252f gdb
PR exp/9059:
	* valops.c (find_overload_match): Follow typedefs before taking
	address of object argument.
gdb/testsuite
	PR exp/9059:
	* gdb.cp/call-c.exp: Add regression test.
	* gdb.cp/call-c.cc (FooHandle): New typedef.
	(main): New variable 'handle'.
2009-02-02 21:50:13 +00:00
gdbadmin fc19f90fc3 *** empty log message *** 2009-02-02 00:00:03 +00:00
Doug Evans f00150c95d * target.h (target_waitstatus_to_string): Declare.
* target.c (target_waitstatus_to_string): New function.  Copied from
	debug_to_wait.  Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
	TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
	TARGET_WAITKIND_NO_HISTORY.
	(debug_to_wait): Call it.
	* infrun.c (wait_for_inferior): If debug_infrun, print result of
	target_wait.
	(fetch_inferior_event): Ditto.
2009-02-01 23:31:03 +00:00
gdbadmin fe674d0b6f *** empty log message *** 2009-02-01 00:00:03 +00:00
gdbadmin 5d27446dac *** empty log message *** 2009-01-31 00:00:33 +00:00
Tom Tromey 5abdf4bdf2 * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h. 2009-01-30 22:14:52 +00:00
Vladimir Prus 592375cda9 PR 8145.
* thread.c (do_captured_list_thread_ids): Report the current
	thread id.
2009-01-30 18:43:05 +00:00
Vladimir Prus 41447f92e2 * breakpoint.c (create_breakpoint, create_breakpoints)
(break_command_really, set_breakpoint): New parameter enabled.
	(create_breakpoint, break_command_really): Make breakpoint
	disabled if so requested.
	* breakpoint.h (set_breakpoint): New parameter enabled.
	* mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
2009-01-30 18:28:01 +00:00
gdbadmin 63b18e9574 *** empty log message *** 2009-01-30 00:00:03 +00:00
Doug Evans 35669430c8 * opcode/i386.h: Add multiple inclusion protection.
(EAX_REG_NUM,ECX_REG_NUM,EDX_REGNUM,EBX_REG_NUM,ESI_REG_NUM)
	(EDI_REG_NUM): New macros.
	(MODRM_MOD_FIELD,MODRM_REG_FIELD,MODRM_RM_FIELD): New macros.
	(SIB_SCALE_FIELD,SIB_INDEX_FIELD,SIB_BASE_FIELD): New macros.
	(REG_PREFIX_P): New macro.

	* amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
	(amd64_displaced_step_fixup): Declare.
	* amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
	(amd64_arch_regmap): Move out of amd64_analyze_stack_align
	and make static global.
	(amd64_arch_regmap_len): New static global.
	(amd64_arch_reg_to_regnum): New function.
	(struct amd64_insn): New struct.
	(struct displaced_step_closure): New struct.
	(onebyte_has_modrm,twobyte_has_modrm): New static globals.
	(rex_prefix_p,skip_prefixes)
	(amd64_insn_length_fprintf,amd64_insn_length_init_dis)
	(amd64_insn_length,amd64_get_unused_input_int_reg)
	(amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
	(amd64_displaced_step_copy_insn)
	(amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
	(amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
	(amd64_displaced_step_fixup): New functions.
	* amd64-linux-tdep.c: #include arch-utils.h.
	(amd64_linux_init_abi): Install displaced stepping support.

	* gdb.arch/amd64-disp-step.S: New file.
	* gdb.arch/amd64-disp-step.exp: New file.
	* gdb.arch/i386-disp-step.S: New file.
	* gdb.arch/i386-disp-step.exp: New file.
2009-01-29 00:29:57 +00:00
gdbadmin 8fecfbc78a *** empty log message *** 2009-01-29 00:00:03 +00:00
Jerome Guitton 098b41a654 2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
Jerome Guitton  <guitton@adacore.com>

	* gdb.texinfo (Startup): Document --with-system-gdbinit.
	(System-wide configuration): New section.
2009-01-28 15:04:30 +00:00
Jerome Guitton 16e7150e45 2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
Jerome Guitton  <guitton@adacore.com>

	* configure, config.in: Regenerated.
	* configure.ac: Add --with-system-gdbinit.
	* main.c (get_init_files): New.
	(captured_main): Use get_init_files.  Load system gdbinit before
	$HOME/.gdbinit.
	(print_gdb_help): Print location of init files.
2009-01-28 15:01:00 +00:00
Pedro Alves 7df3ce4769 * corefile.c (generic_search): Delete disabled code.
* gdbcore.h (generic_search): Delete declaration.
2009-01-28 00:09:49 +00:00
gdbadmin 512f063a2e *** empty log message *** 2009-01-28 00:00:33 +00:00
Pierre Muller 09f00d9a9c * gdb.base/find.exp: Set newline variable
using quotes instead of braces to fix cygwin failures.
2009-01-27 08:22:23 +00:00
gdbadmin eb0d5aa9ea *** empty log message *** 2009-01-27 00:00:33 +00:00
Pedro Alves 77435e4c95 * linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
parent to the child.
	* inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
	* inf-ptrace.c (inf_ptrace_follow_fork): Likewise.  Use
	remove_breakpoints to remove breakpoints from the parent.
2009-01-26 22:34:55 +00:00
Pedro Alves 7488432fc2 Add forgotten PR tags:
PR backtrace/9458, PR backtrace/8864
2009-01-26 19:15:24 +00:00
Pedro Alves 1e275f793e * frame.c (create_new_frame): Update the frame's cached PC before
finding its unwinder.  Use frame_id_build to build the new frame's
	id.
	* stack.c (parse_frame_specification_1): Correct setting ``addrs''
	array values from the ``args'' array values.
2009-01-26 19:09:58 +00:00
Pedro Alves 1deafd4ea5 * gdbtypes.c (alloc_type, alloc_type_instance, create_range_type)
(create_array_type, create_set_type, init_flags_type)
	(copy_type_recursive): Replace pairs of calls to XALLOC and memset
	with a call to XZALLOC or XCALLOC, and pairs of calls to
	obstack_alloc and memset with a call to OBSTACK_ZALLOC.
2009-01-26 18:57:44 +00:00
Pedro Alves 3c16cced40 gdb/
Add "maint set|show internal-error|internal-warning quit|corefile
	ask|yes|no" commands.

	PR gdb/7580:
	* utils.c (internal_problem_ask, internal_problem_yes)
	(internal_problem_no, internal_problem_modes): New.
	(struct internal_problem): Remove FIXME.  Make should_quit and
	should_dump_core types to char *.
	(internal_vproblem, internal_error_problem)
	(internal_warning_problem): Adjust.
	(set_internal_problem_cmd, show_internal_problem_cmd): New dummy
	functions.
	(add_internal_problem_command): New.
	(_initialize_utils): New.

gdb/doc/
	PR gdb/7580:
	* gdb.texinfo (Maintenance Commands): Document "maint set|show
	internal-error|internal-warning quit|corefile ask|yes|no".
2009-01-26 16:24:27 +00:00
Pedro Alves 62709adfbe gdb/gdbserver/
* server.c (gdbserver_usage): Mention --remote-debug.
	(main): Accept '--remote-debug' switch.

gdb/doc/
	* gdb.texinfo (Using the `gdbserver' Program): Document
	--remote-debug.
2009-01-26 16:16:48 +00:00
gdbadmin 65456a07fd *** empty log message *** 2009-01-26 00:00:33 +00:00
Pedro Alves 616d7dd2fe * infcmd.c (program_info): Use paddress instead of casting stop_pc
to unsigned long.
2009-01-25 23:35:51 +00:00