Commit Graph

24871 Commits

Author SHA1 Message Date
Pedro Alves
b8fa0bfa75 2009-08-14 Pedro Alves <pedro@codesourcery.com>
gdb/
	* top.c (any_thread_of): Delete.
	(kill_or_detach): Use any_thread_of_process.
	* top.c (print_inferior_quit_action): New.
	(quit_confirm): Rewrite to print info about all inferiors.
	* target.c (dispose_inferior): New.
	(target_preopen): Use it.

2009-08-14  Pedro Alves  <pedro@codesourcery.com>

	gdb/testsuite/
	* gdb.threads/killed.exp, gdb.threads/manythreads.exp,
	gdb.threads/staticthreads.exp: Adjust to "quit" output changes.
2009-08-14 14:28:15 +00:00
Pedro Alves
759ef83693 * ui-file.h (ui_file_xstrdup): Mention that the length argument
may be NULL.
	* ui-file.c (ui_file_xstrdup): Don't dereference LENGTH if it is
	NULL.
	* aix-thread.c (aix_thread_extra_thread_info): Pass NULL as length
	parameter to ui_file_xstrdup.
	* arm-tdep.c (_initialize_arm_tdep): Ditto.
	* infrun.c (print_target_wait_results): Ditto.
	* language.c (add_language): Ditto.
	* linespec.c (cplusplus_error): Ditto.
	* remote.c (escape_buffer): Ditto.
	* typeprint.c (type_to_string): Ditto.
	* utils.c (error_stream): Ditto.
	* varobj.c (value_get_print_value): Ditto.
	* xtensa-tdep.c (xtensa_verify_config): Replace `dummy' local with
	`length' local.  Pass it to ui_file_xstrdup, and avoid an strlen
	call.
	* gdbarch.sh (verify_gdbarch): Ditto.
	* gdbarch.c: Regenerate.
	* cli/cli-setshow.c (do_setshow_command): Pass NULL as length
	parameter to ui_file_xstrdup.
	* python/python-frame.c (frapy_str): Ditto.
	* python/python-type.c (typy_str): Use the length local instead of
	calling strlen.
	* python/python-value.c (valpy_str): Pass NULL as length parameter
	to ui_file_xstrdup.
2009-08-14 00:32:33 +00:00
gdbadmin
c5bc725163 *** empty log message *** 2009-08-14 00:00:03 +00:00
Doug Evans
6e0a4fbcdf * utils.c (gnu_debuglink_crc32): Store crc32_table as unsigned int
instead of unsigned long.
2009-08-13 22:35:29 +00:00
Tom Tromey
4e7a5ef5a8 * varobj.c (update_dynamic_varobj_children): Don't use
value_copy.
	* value.h: (preserve_one_value): Declare.
	(value_prepend_to_list, value_remove_from_list): Remove.
	* value.c (preserve_one_value): No longer static.
	(preserve_values): Call preserve_python_values.
	(value_prepend_to_list): Remove.
	(value_remove_from_list): Remove.
	* python/python.h (values_in_python): Don't declare.
	(preserve_python_values): Declare.
	* python/python-value.c (values_in_python): Change type.  Move
	lower.  Now static.
	(struct value_object): Add struct tag.
	<next, prev>: New fields.
	(valpy_dealloc): Update.
	(note_value): New function.
	(valpy_new): Use value_incref, note_value.
	(preserve_python_values): New function.
	(valpy_positive): Don't use value_copy.
	(value_to_value_object): Use value_incref, note_value.
	(convert_value_from_python): Update comment.
2009-08-13 18:39:20 +00:00
Pedro Alves
ecd0ada520 * remote.c (remote_pid_to_str): If printing a process id and we
don't know what the remote pid could be, output "Remote target";
	otherwise, use normal_pid_to_str.
2009-08-13 18:27:56 +00:00
Tom Tromey
078bc676bd * language.h (longest_raw_hex_string): Remove unused declaration. 2009-08-13 17:06:21 +00:00
Pedro Alves
b84aa90aa5 2009-08-13 Pedro Alves <pedro@codesourcery.com>
PR gdb/8869:

	* language.c (language, type, range, case_sensitive): Make const.
	(show_language_command): Don't call deprecated_show_value_hack.
	Special case "auto".
	(set_language_command): An unrecognized language is now an
	internal error instead of a user error.  Don't call set_lang_str.
	(show_type_command): Don't call deprecated_show_value_hack.
	Special case "auto".  Use warning.
	(set_type_command): An unrecognized type is now an internal error
	instead of a user error.  Output type check mismatch with language
	here.  Don't call set_type_str.
	(show_range_command): Don't call deprecated_show_value_hack.
	Special case "auto".  Use warning.
	(set_range_command): An unrecognized range check is now an
	internal error instead of a warning.  Output range check mismatch
	with language here.  Don't call set_range_str.
	(show_case_command): Don't call deprecated_show_value_hack.
	Special case "auto".  Use warning.
	(set_case_command): Don't call set_case_str.  An unrecognized case
	check is now an internal error instead of a warning.  Output range
	check mismatch with language here.  Don't call set_case_str.
	(set_type_range_case): Don't call set_type_str, set_range_str or
	set_case_str here.
	(set_lang_str, set_type_str, set_range_str, set_case_str): Delete.
	(add_language): Install or reinstall the "set language" command
	here, and make it an enum command.  Build the enumeration and the
	help string from the current list of known languages.
	(_initialize_language): Don't install "set language" here.  Make
	"set check type", "set check range" and "set case-sensitive" enum
	commands.  Register the "auto" "local" and "unknown" languages in
	that order.

2009-08-13  Pedro Alves  <pedro@codesourcery.com>

	* gdb.base/default.exp: Adjust "set language test": it's now an
	enum command.  Larger help string moved to "help set language".
	* gdb.base/help.exp: Adjust "help set language" expected output,
	now lists all known languages.
2009-08-13 14:58:27 +00:00
Pedro Alves
5efd5804f7 Revert 2009-08-07 changes for PR gdb/8869:
* language.c (set_language_command): Strip whitespace.
	(set_type_command): Likewise.
	(set_range_command): Likewise.

	* language.c (language_completer): New function.
	(range_or_type_completer): New function.
	(case_completer): New function.
	(_initialize_language): Set completers.
	* cli/cli-decode.c (add_setshow_string_cmd): Return the "set"
	command.
	(add_setshow_string_noescape_cmd): Likewise.
	(add_setshow_integer_cmd): Likewise.
	(add_setshow_uinteger_cmd): Likewise.
	(add_setshow_zinteger_cmd): Likewise.
	(add_setshow_zuinteger_cmd): Likewise.
	* command.h (add_setshow_string_cmd,
	add_setshow_string_noescape_cmd, add_setshow_uinteger_cmd,
	add_setshow_zinteger_cmd, add_setshow_zuinteger_cmd): Update.
2009-08-13 14:56:19 +00:00
gdbadmin
46c554ccf2 *** empty log message *** 2009-08-13 00:00:33 +00:00
Michael Snyder
cea39f658d 2009-08-12 Michael Snyder <msnyder@vmware.com>
* remote.c (remote_add_inferior): Remove unused local.
	(remote_add_thread): Ditto.
	(read_ptid): Ditto.
	(remote_current_thread): Ditto.
	(remote_stop_ns): Ditto.
	(remote_parse_stop_reply): Ditto.
	(remote_get_pending_stop_replies): Ditto.
	(remote_wait_ns): Ditto.
	(remote_wait_as): Ditto.
	(send_g_packet): Ditto.
	(remote_fetch_registers): Ditto.
	(store_register_using_P): Ditto.
	(remote_store_registers): Ditto.
	(remote_remove_breakpoint): Ditto.
	(remote_write_qxfer): Ditto.
	(remote_read_qxfer): Ditto.
2009-08-12 23:00:27 +00:00
gdbadmin
4a9bf9e953 *** empty log message *** 2009-08-12 00:00:33 +00:00
Tom Tromey
4a22739830 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Make a cleanup.
(dwarf2_loc_desc_needs_frame): Likewise.
	* dwarf2expr.h (make_cleanup_free_dwarf_expr_context): Declare.
	* dwarf2expr.c (free_dwarf_expr_context_cleanup): New function.
	(make_cleanup_free_dwarf_expr_context): Likewise.
	* dwarf2-frame.c (execute_stack_op): Make a cleanup.
2009-08-11 20:36:49 +00:00
Nathan Froyd
0d8f9b2ced * gdb.arch/altivec-abi.exp (altivec_abi_tests): Turn on printing of
all frame arguments.
	* gdb.arch/altivec-regs.exp: Likewise.
2009-08-11 19:21:37 +00:00
gdbadmin
0fa5cf2232 *** empty log message *** 2009-08-11 00:00:04 +00:00
Jan Kratochvil
4f6f9936b6 gdb/
* objfiles.c (gdb_bfd_unref): Use the bfd_usrdata accessor.
	* solib.c (symbol_add_stub): Likewise.
	* symfile.c (symfile_bfd_open): Assert BFD_USRDATA is NULL.
2009-08-10 22:09:22 +00:00
Paul Pluzhnikov
3aad21cf47 2009-08-10 Paul Pluzhnikov <ppluzhnikov@google.com>
* objfiles.c (qsort_cmp): Remove assert.
	(preferred_obj_section): New function.
	(update_section_map): Filter duplicates.
2009-08-10 20:14:14 +00:00
Tristan Gingold
023e4e81ac 2009-08-10 Tristan Gingold <gingold@adacore.com>
* solib-darwin.c (find_program_interpreter): Simplify the code by
	looking up for the load_dylinker command instead of reading the
	corresponding (but deprecated) section.
	(darwin_solib_create_inferior_hook): Adjust: do not free the
	interpreter path.
2009-08-10 09:35:24 +00:00
Tristan Gingold
48f09bc00d 2009-08-10 Tristan Gingold <gingold@adacore.com>
* i386-darwin-tdep.c (i386_m128_p): New function.
	(i386_darwin_arg_type_alignment): Ditto.
	(i386_darwin_push_dummy_call): Ditto.
	(i386_darwin_init_abi): Define Darwin specific push_dummy_call.
	Adjust long_double size.  Adjust pc offset in setjump buffer.
2009-08-10 09:32:55 +00:00
Hui Zhu
952b2d6368 2009-08-10 Hui Zhu <teawater@gmail.com>
Add Linux AMD64 process record support.

	* amd64-linux-tdep.c (amd64_linux_record_tdep): New variable.
	This struct has the argument for the function
	"record_linux_system_call".
	(amd64_linux_syscall_record): New function. Parse the
	system call instruction and call function
	"record_linux_system_call" to record execute log.
	(i386_linux_init_abi): Initialize "amd64_linux_record_tdep".
	Set "amd64_linux_syscall_record" to "i386_syscall_record".
2009-08-10 03:06:34 +00:00
Hui Zhu
2c543fc432 2009-08-10 Hui Zhu <teawater@gmail.com>
Add process record Linux system call 64 bits support.

        * linux-record.h (linux_record_tdep): Add size_pointer,
        size_size_t, size_iovec and arg6.  Change the values of
	size_int, size_long and size_ulong to
	gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
	gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT,
	gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT.
	* i386-linux-tdep.c (i386_linux_init_abi): Ditto.
	(i386_linux_intx80_sysenter_record): Add a check for system
	call number.
        * linux-record.c (record_linux_system_call): Make this
        function support 64 bits.
2009-08-10 03:04:45 +00:00
Hui Zhu
cf648174b0 2009-08-10 Hui Zhu <teawater@gmail.com>
Add AMD64 process record instruction set support.

	* i386-tdep.h (gdbarch_tdep): Add record_regmap for registers
	because the AMD64's registers order in GDB is not same with
	I386 instructions.
	Add i386_syscall_record to be the syscall function handle
	interface.
	(record_i386_regnum): Number for record_regmap.
	* i386-tdep.c (OT_QUAD): For 64 bits.
	(i386_record_s): Add rex_x, rex_b, rip_offset and
	popl_esp_hack for AMD64 instruction set. And regmap for
	record_regmap.
	(i386_record_lea_modrm_addr): Support AMD64 instruction set
	64 bits lea.
	(i386_record_lea_modrm): Ditto.
	(i386_record_push): New function.  Record the execution log
	of push.
	(I386_RECORD_ARCH_LIST_ADD_REG): New macro to record the
	register.
	(i386_process_record): Support AMD64 instruction set.
	* amd64-tdep.c (amd64_record_regmap): For record_regmap.
	(amd64_init_abi): Set amd64_record_regmap to record_regmap.
2009-08-10 03:02:39 +00:00
gdbadmin
b229017acf *** empty log message *** 2009-08-10 00:00:33 +00:00
gdbadmin
08ab23f3fc *** empty log message *** 2009-08-09 00:00:33 +00:00
Pedro Alves
891e75843a * bfd-target.c (struct target_bfd_data): New.
(target_bfd_xfer_partial): Adjust to get at the section table from
	the new structure.
	(target_bfd_get_section_table): Ditto.
	(target_bfd_xclose): Ditto.  Get the bfd pointer from the
	target_bfd_data structure, from the section table.
	(target_bfd_reopen): Store a struct target_bfd_data in the
	target_ops to_data field, instead of a target_section_table.
2009-08-08 16:32:37 +00:00
Hui Zhu
280d8011ec 2009-08-08 Aleksandar Ristovski <aristovski@qnx.com>
Hui Zhu  <teawater@gmail.com>

	* record.c (record_store_registers): Remove unused variable.
2009-08-08 01:57:44 +00:00
gdbadmin
93da6da6f9 *** empty log message *** 2009-08-08 00:00:34 +00:00
Tom Tromey
bda180e011 gdb
* language.c (set_language_command): Strip whitespace.
	(set_type_command): Likewise.
	(set_range_command): Likewise.
gdb/testsuite
	* gdb.base/setshow.exp: Add tests for changes to set language, set
	check range, and set check type.
2009-08-07 23:28:13 +00:00
Tom Tromey
6cc0b2563e PR gdb/8869:
* language.c (language_completer): New function.
	(range_or_type_completer): New function.
	(case_completer): New function.
	(_initialize_language): Set completers.
	* cli/cli-decode.c (add_setshow_string_cmd): Return the "set"
	command.
	(add_setshow_string_noescape_cmd): Likewise.
	(add_setshow_integer_cmd): Likewise.
	(add_setshow_uinteger_cmd): Likewise.
	(add_setshow_zinteger_cmd): Likewise.
	(add_setshow_zuinteger_cmd): Likewise.
	* command.h (add_setshow_string_cmd,
	add_setshow_string_noescape_cmd, add_setshow_uinteger_cmd,
	add_setshow_zinteger_cmd, add_setshow_zuinteger_cmd): Update.
2009-08-07 20:44:15 +00:00
gdbadmin
88cd6f5e2a *** empty log message *** 2009-08-07 00:00:33 +00:00
Paul Pluzhnikov
e5af178fbf 2009-08-06 Paul Pluzhnikov <ppluzhnikov@google.com>
gold/10400
	* dwarf2-frame.c (qsort_fde_cmp): Use stable sort.
2009-08-06 23:25:49 +00:00
Paul Pluzhnikov
b01c84103b 2009-08-06 Paul Pluzhnikov <ppluzhnikov@google.com>
* dwarf2-frame.c (struct dwarf2_cie): Remove 'next'.
	(struct dwarf2_cie_table): New.
	(struct dwarf2_fde): Remove 'next'.
	(struct dwarf2_fde_table): New.
	(struct comp_unit): Remove 'cie'.
	(bsearch_cie_cmp, bsearch_fde_cmp): New function.
	(find_cie, dwarf2_frame_find_fde): Use bsearch.
	(add_cie, add_fde): Use array instead of linked list.
	(decode_frame_entry, decode_frame_entry_1): New parameters.
	(qsort_fde_cmp): New function.
	(dwarf2_build_frame_info): Adjust.
2009-08-06 23:19:47 +00:00
Nick Roberts
d837706a7c (Server Prefix): Explain that server prefix suppresses
confirmation request.
2009-08-06 23:08:16 +00:00
Nick Roberts
43089a6e06 *** empty log message *** 2009-08-06 23:06:54 +00:00
Don Lee
5f814c3b3f * score-tdep.c: Support a new Sunplus CT S+core variant, S+core 3.
* score-tdep.h: Ditto.
	* NEWS: Ditto.
	* configure.tgt: Test do we have a simulator.
	* MAINTAINERS: Add myself under target score
2009-08-06 10:28:38 +00:00
Nick Roberts
a502cf95fe (defaulted_query): Don't ask for confirmation if server
prefix is used.
2009-08-06 08:19:58 +00:00
Nick Roberts
78ad01c15f *** empty log message *** 2009-08-06 08:11:22 +00:00
gdbadmin
8dfc33311a *** empty log message *** 2009-08-06 00:00:03 +00:00
Eli Zaretskii
99e008fef7 * gdb.texinfo (Separate Debug Files, Remote Protocol): Clarified
CRC definitions.
2009-08-05 17:47:09 +00:00
Tom Tromey
768f092942 * spu-tdep.h (SPUADDR_SPU): Cast result to int. 2009-08-05 15:11:45 +00:00
gdbadmin
e1d0c9e0d7 *** empty log message *** 2009-08-05 00:00:35 +00:00
Thiago Jung Bauermann
6b3ae8188c 2009-08-04 Thiago Jung Bauermann <thiago.bauermann@gmail.com>
gdb/
	* linux-tdep.c (check_is_pie_binary,
	_initialize_linux_tdep): New functions.

gdb/testsuite/
	* gdb.base/pie-support.exp: New file.
	* gdb.base/pie-support.c: New file.
2009-08-04 20:41:13 +00:00
Paul Pluzhnikov
e3c69974ac 2009-08-04 Paul Pluzhnikov <ppluzhnikov@google.com>
* objfiles.h (OBJF_KEEPBFD): Delete.
	(gdb_bfd_unref): New prototype.
	* objfiles.c (gdb_bfd_unref): New function.
	(free_objfile): Call gdb_bfd_unref.
	* solib.c (free_so): Likewise.
	(symbol_add_stub): Set refcount.
2009-08-04 18:46:05 +00:00
Michael Snyder
afd0cd3fc1 2009-08-04 Hui Zhu <teawater@gmail.com>
Michael Snyder  <msnyder@vmware.com>

	* record.c (record_mem_entry): New field 'mem_entry_not_accessible'.
	(record_arch_list_add_mem): Initialize 'mem_entry_not_accessible'.
	(record_wait): Set 'mem_entry_not_accessible' flag if target
	memory not readable.  Don't try to change target memory if
	'mem_entry_not_accessible' is set.
2009-08-04 18:19:52 +00:00
gdbadmin
1b6bf71993 *** empty log message *** 2009-08-04 00:00:03 +00:00
Jan Kratochvil
1ffa32eed6 gdb/
Fix memory corruption on reread of file through a symbolic link.
	* symfile.c (find_separate_debug_file): Initialize CANON_NAME earlier.
	Allocate DEBUGFILE with length based on CANON_NAME.  Free CANON_NAME on
	all the return paths.
2009-08-03 17:00:34 +00:00
Vladimir Prus
48cb2d8581 Implement -break-commands
* breakpoint.c (get_breakpoint, breakpoint_set_commands): New.
	(commands_command): Use breakpoint_set_commands.
	* breakpoint.h (get_breakpoint, breakpoint_set_commands): Declare.

	* mi/mi-cmds.h (mi_cmd_break_commands): New.
	* mi/mi-cmds.c: Register -break-commands.
	* mi/mi-cmd-break.c (mi_cmd_break_commands, mi_read_next_line)
	(mi_command_line_array, mi_command_line_array_cnt)
	(mi_command_line_array_ptr): New.
2009-08-03 12:39:01 +00:00
Vladimir Prus
3c1179ff51 Refactor reading of commands
* defs.h (read_command_lines_1): Declare.
	* cli/cli-script.c (read_next_line): Only return string,
	do not process.
	(process_next_line): New, extracted from read_next_line.
	(recurse_read_control_structure): Take a function pointer to the
	read function.
	(get_command_line) Pass the read_next_line as reader function
	into recurse_read_control_structure.
	(read_command_lines_1): New, extracted from...
	(read_command_lines): ...here.
2009-08-03 12:26:37 +00:00
gdbadmin
0329406f62 *** empty log message *** 2009-08-03 00:00:34 +00:00
gdbadmin
43c6951f03 *** empty log message *** 2009-08-02 00:00:05 +00:00