Commit Graph

14640 Commits

Author SHA1 Message Date
Emi Suzuki dde0281261 * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
watchpoints.
2009-01-08 03:58:06 +00:00
Doug Evans 69bcc6bc50 * top.c (gdb_prompt_string): Delete, unused. 2009-01-07 22:04:47 +00:00
Pedro Alves fa3a767ffc gdb/
2009-01-07  Pedro Alves  <pedro@codesourcery.com>

	Delete ONE_PROCESS_WRITETEXT leftovers.

	* breakpoint.c (insert_bp_location): Delete process_warning
	argument.  Adjust.
	(insert_breakpoint_locations): Adjust.
	(reattach_breakpoints): Adjust.
	* infrun.c (normal_stop): Drop "It might be running in another
	process" notice.

gdb/doc/
2009-01-07  Pedro Alves  <pedro@codesourcery.com>

	* gdb.texinfo (Error in Breakpoints): Delete mention of "The same
	program may be running in another process" errors.
	* gdbint.texinfo (Native Conditionals): Delete
	ONE_PROCESS_WRITETEXT description.
2009-01-07 21:42:50 +00:00
Stan Shebs 7b93f36dcb * config/pa/linux.mh (XDEPFILES): Remove. 2009-01-07 21:21:11 +00:00
Doug Evans 0380c18b13 * cli/cli-cmds.c (set_debug): Fix cut-n-paste error. 2009-01-07 20:38:16 +00:00
Jan Kratochvil 60023297c3 gdb/
* f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
	spacing, a regression from 2008-04-22.

gdb/testsuite/
	* gdb.fortran/derived-type.exp: New variables int4 and real4.  Match
	now the output exactly, using less wildcards.  Expect also the output
	of gfortran-4.3.  Update for the f-valprint.c modification from
	2008-04-22.
	* gdb.fortran/subarray.exp: Expect also the output of gfortran-4.3.
	Remove gdb_test test names where matching the command.
2009-01-07 12:39:13 +00:00
Joel Brobecker ea8992ce76 * utils.c (gdb_print_host_address): Adjust implementation to
reuse host_address_to_string. Move comment explaining the conversion
        from host address to string from here...
        (host_address_to_string): ... to there.
2009-01-07 12:11:07 +00:00
Emi Suzuki 301d2c47d9 * MAINTAINERS: Add myself for write after approval privileges. 2009-01-07 09:28:31 +00:00
Tom Tromey 170ce85276 * value.c (set_internalvar): Use value_free, not xfree. 2009-01-07 00:45:54 +00:00
Jim Blandy bf1d7d9ce0 Check return values of functions declared with warn_unused_result
attribute in GLIBC 2.8.
* cli/cli-cmds.c (pwd_command): Check return value from getcwd.
* inflow.c (check_syscall): New function.
(new_tty): Use check_syscall to check return values from open and dup.
* linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
* main.c (captured_main): Call cwd after setting up gdb_stderr;
check for errors from getcwd.
* mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
* ui-file.c (stdio_file_write): Ignore return value from fwrite.
(stdio_file_fputs): Same.
* utils.c (internal_vproblem): abort if last-ditch error message
write fails.
2009-01-06 18:31:59 +00:00
Jim Blandy fdb7262ae4 * top.c (gdb_init): Don't set the current directory here; that's
already been done in captured_main.
2009-01-06 18:28:04 +00:00
Sandra Loosemore 84603566b7 2009-01-06 Sandra Loosemore <sandra@codesourcery.com>
gdb/
	* ser-tcp.c: Adjust includes.
	(tcp_set_cmdlist, tcp_show_cmdlist): Declare.
	(tcp_auto_retry, tcp_retry_limit): Declare.
	(TIMEOUT): Remove, in favor of tcp_retry_limit.
	(POLL_INTERVAL): Increase to 5, in favor of backoff logic.
	(wait_for_connect): New function.
	(net_open): Use it.  Add auto-retry logic.
	(set_tcp_cmd, show_tcp_cmd): New functions.
	(_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
	and "set/show tcp connect-timeout" commands.
	* NEWS: Document new commands.

	gdb/doc/
	* gdb.texinfo (Remote Configuration): Document new
	"set/show tcp auto-retry" and "set/show tcp connect-timeout"
	commands.
2009-01-06 17:07:08 +00:00
Tom Tromey 5171e6b382 * python/python-internal.h (Py_ssize_t): Define as int. 2009-01-05 20:48:51 +00:00
Jim Blandy a367a1f22e * MAINTAINERS: Fix my e-mail address as steering committee member. 2009-01-05 17:36:06 +00:00
Joel Brobecker 4d78a12089 Move a 2009 Entry from ChangeLog-2008 to ChangeLog. 2009-01-03 06:02:29 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Joel Brobecker c9fc347d38 * top.c (print_gdb_version): Update copyright year. 2009-01-03 05:18:00 +00:00
Joel Brobecker a85d99b462 * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008. 2009-01-03 05:15:51 +00:00
Joel Brobecker 67de2a4c95 Rotate the ChangeLog as per the Start of New Year Procedure. 2009-01-03 05:10:18 +00:00
Pedro Alves ccc57cf9e6 2009-01-01 Pedro Alves <pedro@codesourcery.com>
PR breakpoints/9681:
	* exceptions.h (enum errors): New error type, MEMORY_ERROR.
	* corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
	* breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
	retrow all other exceptions.

2009-01-01  Pedro Alves  <pedro@codesourcery.com>

	PR breakpoints/9681:
	* gdb.base/watchpoint.exp: Add regression test.
2009-01-01 22:02:03 +00:00
Pedro Alves 3a031f650c 2008-12-31 Pedro Alves <pedro@codesourcery.com>
PR gdb/8812:
	* infrun.c (handle_command): Don't print a header or notify the
	target about signal changes if we didn't change any signal.

2008-12-31  Pedro Alves  <pedro@codesourcery.com>

	PR gdb/8812:
	* gdb.base/signal.exp: Change kfail to fail, and update PR number.
2008-12-31 01:34:10 +00:00
Joel Brobecker cfe9eade2e * valops.c (find_method_list): Minor reformatting in comment. 2008-12-29 06:02:06 +00:00
Pedro Alves 09e6485fa9 2008-12-29 Pedro Alves <pedro@codesourcery.com>
PR gdb/7536:
	* valprint.c (input_radix_1): New static global.
	(set_input_radix): Use it instead of "input_radix".
	(set_input_radix_1): Always leave input_radix_1 set to
	input_radix.
	(output_radix_1): New static global.
	(set_output_radix): Use it instead of "output_radix".
	(set_output_radix_1): Always leave output_radix_1 set to
	output_radix.
	(_initialize_valprint): Use "input_radix_1" instead of
	"input_radix" with the "input-radix" command.  Use
	"output_radix_1" instead of "output_radix" with the "output-radix"
	command.

2008-12-29  Pedro Alves  <pedro@codesourcery.com>

	PR gdb/7536:
	* gdb.base/radix.exp: Add tests to ensure invalid input radices
	and unsupported output radices are really rejected.
2008-12-29 02:18:48 +00:00
Pedro Alves 7a7d33537f * linux-fork.c (linux_fork_detach): New.
* linux-fork.h (linux_fork_detach): Declare.
	* linux-nat.c (linux_child_follow_fork): When following the fork
	child, add the child inferior before possibly detaching from the
	parent.  Don't reinstall ourselves.
	(linux_nat_detach): Call linux_fork_detach if there are other
	forks to debug.
	* linux-thread-db.c (thread_db_detach): Don't call
	target_mourn_inferior.  Instead inline the necessary bits.
	* inf-ptrace.c (inf_ptrace_detach): Don't unpush the target if
	there are other inferiors to debug.
2008-12-28 16:14:57 +00:00
Jan Kratochvil 262452ec45 Fix TYPE_HIGH_BOUND for TYPE_CODE_RANGE using arbitrary TYPE_NFIELDS in
preparation for supporting DW_AT_byte_stride.
	* ada-lang.c (packed_array_type, ada_index_type): Use TYPE_INDEX_TYPE.
	(ada_array_bound_from_type): Move `index_type' declaration to the
	function start.  New variable `retval'.  Return the bounds for
	TYPE_CODE_RANGE using TYPE_LOW_BOUND and TYPE_HIGH_BOUND.  Abort on
	invalid index type codes.
	* ada-typeprint.c (print_range): Set `upper_bound' for TYPE_CODE_RANGE
	now using TYPE_HIGH_BOUND.
	* ada-valprint.c (val_print_packed_array_elements): Use `index_type'.
	* eval.c (evaluate_subexp_standard): Use TYPE_INDEX_TYPE.
	* gdbtypes.c (create_range_type): Use TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
	refer to the number of fields only through TYPE_NFIELDS.
	(create_array_type): Use TYPE_INDEX_TYPE.
	(check_typedef): Use TYPE_INDEX_TYPE, TYPE_LOW_BOUND, TYPE_HIGH_BOUND.
	* gdbtypes.h (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED)
	(TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): Use TYPE_INDEX_TYPE.
	(TYPE_ARRAY_UPPER_BOUND_VALUE, TYPE_ARRAY_LOWER_BOUND_VALUE): Use
	TYPE_INDEX_TYPE, TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
	* hppa-tdep.c (hppa_alignof <TYPE_CODE_ARRAY>): Use TYPE_INDEX_TYPE.
	* mdebugread.c (parse_type): Use TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
	* valarith.c (value_bit_index): Use TYPE_INDEX_TYPE.
2008-12-28 14:14:19 +00:00
Sandra Loosemore ca2d49e822 2008-12-26 Sandra Loosemore <sandra@codesourcery.com>
gdb/
	* breakpoint.c (update_watchpoint): Refactor to avoid compiler
	warning.
2008-12-26 19:11:53 +00:00
Tom Tromey aad95b57c5 * stack.c (print_block_frame_locals): Print spaces, not tabs.
Update for call to print_variable_and_value.
	(print_frame_arg_vars): Update.
	* value.h (print_variable_and_value): Rename from
	print_variable_value.  Add 'name' and 'indent' parameters.
	* printcmd.c (print_variable_and_value): Rename from
	print_variable_value.  Add 'name' and 'indent' parameters.  Use
	common_val_print.
	* f-valprint.c (info_common_command): Update.
2008-12-22 23:11:56 +00:00
Tom Tromey 1446eb676f * python/python-value.c (valpy_length): Remove #if. 2008-12-22 19:45:58 +00:00
Tom Tromey f2f35b75ff 2008-12-22 Paul Pluzhnikov <ppluzhnikov@google.com>
* python/python-internal.h (PyEval_ReleaseLock): New define.
2008-12-22 16:25:17 +00:00
Tom Tromey ba163c7e44 gdb
* c-exp.y (ident_tokens): New global.
	(struct token) <cxx_only>: New field.
	(tokentab3): Update.
	(tokentab2): Update.
	(yylex): Use ident_tokens.
gdb/testsuite
	* gdb.cp/punctuator.exp: New file.
2008-12-22 14:21:01 +00:00
Tom Tromey 9a61c7a6d7 2008-12-22 Adam Denton <adenton@yahoo.com>
PR gdb/8307:
	* environ.c (free_environ): Free e->vector.
2008-12-22 14:06:27 +00:00
Jan Kratochvil 6f4de6c97d gdb/
Fix memory double-free.
	* completer.c (line_completion_function): Clear LIST after called xfree.
gdb/testsuite/
	* gdb.base/completion.exp (Completing non-existing component): New test.
2008-12-22 13:19:30 +00:00
Joel Brobecker 567e1b4ec8 * breakpoint.c (update_watchpoint): Adjust and extend the description
of this function.  Fix one error message accordingly.
2008-12-22 04:37:37 +00:00
Jan Kratochvil db2ad4c3f7 gdb/
Fix hw watchpoints created before the inferior was started.
	* breakpoint.c (update_watchpoint): Convert the bp_watchpoint and
	bp_hardware_watchpoint types according to the current runtime state.
gdb/testsuite/
	* gdb.base/watchpoint-hw.exp, gdb.base/watchpoint-hw.c: New.
2008-12-21 15:01:32 +00:00
Pedro Alves 0d14fc6327 * linux-nat.c (linux_child_follow_fork): If following the child,
and not detaching the parent, also add the child fork to the fork
	list.
	* linux-fork.c (linux_fork_context): Remove dead error call.
	Assert that the incoming newfp argument is not null.  Do not add a
	new fork for inferior_ptid.  Assert that there is one already.
2008-12-18 21:35:23 +00:00
Tristan Gingold d26b535418 2008-12-16 Tristan Gingold <gingold@adacore.com>
* inflow.c: Remove old_sigio, handle_sigio, old_fcntl_flags,
	set_sigio_trap, clear_sigio_trap definitions.
	* inferior.h: Remove set_sigio_trap and clear_sigio_trap declarations.
	* inf-ptrace.c (inf_ptrace_wait): Remove call to set_sigio_trap
	and clear_sigio_trap.
	* inf-ttrace.c (inf_ttrace_wait): Ditto.
	* linux-nat.c (linux_nat_wait): Ditto.
	* spu-linux-nat.c (spu_child_wait): Ditto.
	* rs6000-nat.c (rs6000_wait): Ditto.
	* target.c: Remove target_activity_function and target_activity_fd.
	* target.h: Remove target_activity_function and target_activity_fd
	declarations.
2008-12-16 11:15:58 +00:00
Paul Pluzhnikov 7b1f21e5c4 2008-12-15 Paul Pluzhnikov <ppluzhnikov@google.com>
* dbxread.c (read_ofile_symtab): Sign-extend 32-bit N_LSYM and
	N_PSYM STABS values for 64-bit GDB.
2008-12-16 05:06:05 +00:00
Tristan Gingold 9f3fe11c95 2008-12-15 Tristan Gingold <gingold@adacore.com>
* dwarf2expr.c (execute_stack_op): Handle DW_OP_swap.
2008-12-15 11:32:08 +00:00
Jerome Guitton f5938064bf * ada-lang.c (ada_value_slice_ptr): Rename to...
(ada_value_slice_from_ptr): ... this. Return a lazy value instead
	of a reference.	Update comment.
	(ada_value_struct_elt): Ditto if arg is a pointer or a reference.
	Update comment as well.
	(ada_evaluate_subexp): Update use of ada_value_slice_ptr.
2008-12-15 10:40:28 +00:00
Kevin Buettner ed09d7da47 * gnu-v3-abi.c (vtable_ptrdiff_type): New function.
(gnuv3_decode_method_ptr, gnuv3_print_method_ptr)
	(gnuv3_method_ptr_to_value): Use a better approximation for
	`ptrdiff_t' instead of `long'.

	* m32c-tdep.c (m32c_gdbarch_init): Call set_gdbarch_vbit_in_delta().
	(m32c_push_dummy_call): Dereference pointer type.
2008-12-13 00:39:53 +00:00
Tom Tromey fad6eecd5d gdb
PR cli/2563:
	* cli/cli-decode.c (delete_cmd): Add hook-related out parameters.
	(add_cmd): Update.  Install hooks into new command.
	(add_alias_cmd): Update.
gdb/testsuite
	* gdb.base/commands.exp (redefine_hook_test): New proc.
	Call it.
2008-12-12 17:58:48 +00:00
Tom Tromey 17c8aaf507 gdb
* macroexp.c (get_pp_number): Require digit after leading ".".
	Correctly handle suffixes.
gdb/testsuite
	* gdb.base/macscp.exp: New regression test.
2008-12-12 17:03:37 +00:00
Tom Tromey cc704ebecf * macrocmd.c (macro_define_command): Skip whitespace after
macro name.
	(print_one_macro): Print space after macro name.
2008-12-12 16:58:46 +00:00
Pedro Alves 48844aa658 * infrun.c (handle_inferior_event): Correctly tag non-executing
threads in multi-process.
	(normal_stop): Correctly tag stopped threads in multi-process.
2008-12-12 14:20:48 +00:00
Pedro Alves 48aa3c2705 * remote.c (extended_remote_mourn_1): Always call
generic_mourn_inferior.
2008-12-12 13:45:43 +00:00
Pedro Alves 5f3563ea7a * remote.c (remote_detach_1): Don't delete the inferior here.
(process_stop_reply): Ditto.
	(extended_remote_kill): Ditto.
2008-12-12 01:08:29 +00:00
Pedro Alves ca19bf2309 * remote.c (read_ptid): If we don't know about any inferior yet,
use the pid of magic_null_ptid.
	(remote_start_remote): In the non-stop mode case, don't set
	inferior_ptid to magic_null_ptid here.
2008-12-12 00:12:03 +00:00
Pedro Alves 37d9480010 * infcmd.c (step_1): Use step_once in the synchronous case too.
(step_1_continuation): Wrap line.
	(step_once): Adjust comment.  Only install the continuation in
	async mode.
2008-12-11 20:34:18 +00:00
Pedro Alves fb66883a82 * infrun.c (handle_inferior_event): On a TARGET_WAITKIND_EXITED or
TARGET_WAITKIND_SIGNALLED, switch inferior_ptid to the event ptid.
	* linux_thread_db.c (thread_db_wait): On a TARGET_WAITKIND_EXITED
	or TARGET_WAITKIND_SIGNALLED, return the ptid the beneath target
	returned.
	* inf-ptrace.c (inf_ptrace_wait): Return inferior_ptid instead of
	minus_one_ptid if the inferior disappeared.
	* rs6000-nat.c (rs6000_wait): Likewise.
	* spu-linux-nat.c (spu_child_wait): Likewise.
2008-12-11 19:19:12 +00:00
Tom Tromey 7c8adf682b gdb
PR macros/2564:
	* c-exp.y (macro_original_text, expansion_obstack,
	expression_macro_scope): New globals.
	(scan_macro_expansion): New function.
	(scanning_macro_expansion): Likewise.
	(finished_macro_expansion): Likewise.
	(scan_macro_cleanup): Likewise.
	(c_parse): Find macro scope.  Initialize obstack.
	* c-lang.h (scan_macro_expansion, scanning_macro_expansion,
	finished_macro_expansion, expression_macro_lookup_func,
	expression_macro_lookup_baton): Remove.
	* c-lang.c (scan_macro_expansion, scanning_macro_expansion,
	finished_macro_expansion, expression_macro_lookup_func,
	expression_macro_lookup_baton): Remove.
	(macro_original_text, macro_expanded_text,
	c_preprocess_and_parse): Remove.
	(c_language_defn, cplus_language_defn, asm_language_defn,
	minimal_language_defn): Use c_parse.
gdb/testsuite
	* gdb.base/macscp.exp: Print "address.addr".
	* gdb.base/macscp1.c (struct outer): New struct.
	(address): New global.
2008-12-11 18:30:28 +00:00