Commit Graph

30531 Commits

Author SHA1 Message Date
Doug Evans 957df313b7 * Makefile.in (clean): Remove Fission .dwo and .dwp files.
* gdb.ada/Makefile.in (clean): Ditto.
	* gdb.arch/Makefile.in (clean): Ditto.
	* gdb.asm/Makefile.in (clean): Ditto.
	* gdb.base/Makefile.in (clean): Ditto.
	* gdb.cell/Makefile.in (clean): Ditto.
	* gdb.cp/Makefile.in (clean): Ditto.
	* gdb.disasm/Makefile.in (clean): Ditto.
	* gdb.dwarf2/Makefile.in (clean): Ditto.
	* gdb.fortran/Makefile.in (clean): Ditto.
	* gdb.go/Makefile.in (clean): Ditto.
	* gdb.hp/Makefile.in (clean): Ditto.
	* gdb.hp/gdb.aCC/Makefile.in (clean): Ditto.
	* gdb.hp/gdb.base-hp/Makefile.in (clean): Ditto.
	* gdb.hp/gdb.compat/Makefile.in (clean): Ditto.
	* gdb.hp/gdb.defects/Makefile.in (clean): Ditto.
	* gdb.hp/gdb.objdbg/Makefile.in (clean): Ditto.
	* gdb.java/Makefile.in (clean): Ditto.
	* gdb.linespec/Makefile.in (clean): Ditto.
	* gdb.mi/Makefile.in (clean): Ditto.
	* gdb.modula2/Makefile.in (clean): Ditto.
	* gdb.multi/Makefile.in (clean): Ditto.
	* gdb.objc/Makefile.in (clean): Ditto.
	* gdb.opencl/Makefile.in (clean): Ditto.
	* gdb.opt/Makefile.in (clean): Ditto.
	* gdb.pascal/Makefile.in (clean): Ditto.
	* gdb.python/Makefile.in (clean): Ditto.
	* gdb.reverse/Makefile.in (clean): Ditto.
	* gdb.server/Makefile.in (clean): Ditto.
	* gdb.stabs/Makefile.in (clean): Ditto.
	* gdb.threads/Makefile.in (clean): Ditto.
	* gdb.trace/Makefile.in (clean): Ditto.
	* gdb.xml/Makefile.in (clean): Ditto.
2012-05-17 19:03:59 +00:00
Joel Brobecker d3581e618a procfs.c: Remove unused functions and make many functions static
gdb/ChangeLog:

        * procfs.c (procfs_find_new_threads, procfs_pid_to_str,
        proc_warn, proc_error, proc_get_status, proc_flags,
        proc_why, proc_what, proc_nsysarg, proc_sysargs,
        proc_set_run_on_last_close, proc_unset_run_on_last_close,
        proc_unset_inherit_on_fork, proc_set_async, proc_unset_async,
        proc_stop_process, proc_wait_for_stop, proc_run_process,
        proc_set_traced_signals, proc_set_traced_faults,
        proc_set_traced_sysentry, proc_set_traced_sysexit,
        proc_set_held_signals, proc_get_held_signals,
        proc_get_traced_signals, proc_get_traced_faults,
        proc_get_traced_sysentry, proc_get_traced_sysexit,
        proc_clear_current_fault, proc_set_current_signal,
        proc_clear_current_signal, proc_get_gregs, proc_get_fpregs,
        proc_set_gregs, proc_set_fpregs, proc_kill, proc_parent_pid,
        proc_get_nthreads, proc_get_nthreads, proc_get_nthreads,
        proc_get_current_thread, proc_get_current_thread,
        proc_get_current_thread, proc_update_threads,
        proc_update_threads, proc_update_threads, proc_update_threads,
        proc_iterate_over_threads, procfs_find_new_threads,
        procfs_pid_to_str): Make static.  Remove advance declaration.
        (proc_cursig): Make static.  Conditionalized defintion on
        PROCFS_DONT_PIOCSSIG_CURSIG being defined.
        (proc_syscall, proc_set_kill_on_last_close,
        proc_unset_kill_on_last_close, proc_set_inherit_on_fork,
        proc_get_pending_signals, proc_get_signal_actions,
        proc_trace_signal, proc_ignore_signal): Delete.
2012-05-17 17:27:07 +00:00
gdbadmin 5a58b47477 *** empty log message *** 2012-05-17 00:00:33 +00:00
Sergio Durigan Junior 81b9b86eb8 2012-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
* coffread.c (cs_section_address): Passing proper argument for
	`bfd_get_section_vma'.
	* dwarf2read.c (dwarf2_locate_sections): Likewise, for
	`bfd_get_section_flags'.
	* remote.c (remote_trace_set_readonly_regions): Likewise, for
	`bfd_get_section_vma'.
2012-05-16 22:10:49 +00:00
Tom Tromey abc9d0dc6e PR macros/13205:
* macrotab.h: (macro_define_special): Declare.
	(enum macro_special_kind): New.
	(struct macro_definition) <argc, replacement>: Update comments.
	* macrotab.c (new_macro_definition): Unconditionally set 'argc'.
	(macro_define_object_internal): New function.
	(macro_define_object): Use it.
	(macro_define_special): New function.
	(fixup_definition): New function.
	(macro_lookup_definition, foreach_macro_in_scope)
	(foreach_macro): Use fixup_definition.
	* macroexp.h (macro_stringify): Declare.
	* macroexp.c (free_buffer_return_text): New function.
	(stringify): Constify "arg".
	(macro_stringify): New function.
	* dwarf2read.c (macro_start_file): Call macro_define_special.
testsuite
	* gdb.base/macscp1.c (macscp_expr): Add comment.
	* gdb.base/macscp.exp: Test __FILE__ and __LINE__.
2012-05-16 20:31:10 +00:00
Joel Brobecker 4647ab1b6c Fix one of my ChangeLog entries.
I copy/pasted the wrong text... This fixes it.
2012-05-16 17:57:58 +00:00
Maciej W. Rozycki 6a3a010ba6 gdb/
* breakpoint.h (bp_location): Add related_address member.
	* inferior.h (get_return_value): Take a pointer to struct value
	instead of struct type for the function requested.
	* value.h (using_struct_return): Likewise.
	* gdbarch.sh (return_value): Take a pointer to struct value
	instead of struct type for the function requested.
	* breakpoint.c (set_breakpoint_location_function): Initialize
	related_address for bp_gnu_ifunc_resolver breakpoints.
	* elfread.c (elf_gnu_ifunc_resolver_return_stop): Pass the
	requested function's address to gdbarch_return_value.
	* eval.c (evaluate_subexp_standard): Pass the requested
	function's address to using_struct_return.
	* infcall.c (call_function_by_hand): Pass the requested
	function's address to using_struct_return and
	gdbarch_return_value.
	* infcmd.c (get_return_value): Take a pointer to struct value
	instead of struct type for the function requested.
	(print_return_value): Update accordingly.
	(finish_command_continuation): Likewise.
	* stack.c (return_command): Pass the requested function's
	address to using_struct_return and gdbarch_return_value.
	* value.c (using_struct_return): Take a pointer to struct value
	instead of struct type for the function requested.  Pass the
	requested function's address to gdbarch_return_value.
	* python/py-finishbreakpoint.c (finish_breakpoint_object):
	New function_value member, replacing function_type.
	(bpfinishpy_dealloc): Update accordingly.
	(bpfinishpy_pre_stop_hook): Likewise.
	(bpfinishpy_init): Likewise.  Record the requested function's
	address.
	* mips-tdep.c (mips_fval_reg): New enum.
	(mips_o32_push_dummy_call): For MIPS16 FP doubles do not swap
	words put in GP registers.
	(mips_o64_push_dummy_call): Update a comment.
	(mips_o32_return_value): Take a pointer to struct value instead
	of struct type for the function requested and use it to check if
	using the MIPS16 calling convention.  Return the designated
	general purpose registers for floating-point values returned in
	MIPS16 mode.
	(mips_o64_return_value): Likewise.
	* ppc-tdep.h (ppc_sysv_abi_return_value): Update prototype.
	(ppc_sysv_abi_broken_return_value): Likewise.
	(ppc64_sysv_abi_return_value): Likewise.
	* alpha-tdep.c (alpha_return_value): Take a pointer to struct
	value instead of struct type for the function requested.
	* amd64-tdep.c (amd64_return_value): Likewise.
	* amd64-windows-tdep.c (amd64_windows_return_value): Likewise.
	* arm-tdep.c (arm_return_value): Likewise.
	* avr-tdep.c (avr_return_value): Likewise.
	* bfin-tdep.c (bfin_return_value): Likewise.
	* cris-tdep.c (cris_return_value): Likewise.
	* frv-tdep.c (frv_return_value): Likewise.
	* h8300-tdep.c (h8300_return_value): Likewise.
	(h8300h_return_value): Likewise.
	* hppa-tdep.c (hppa32_return_value): Likewise.
	(hppa64_return_value): Likewise.
	* i386-tdep.c (i386_return_value): Likewise.
	* ia64-tdep.c (ia64_return_value): Likewise.
	* iq2000-tdep.c (iq2000_return_value): Likewise.
	* lm32-tdep.c (lm32_return_value): Likewise.
	* m32c-tdep.c (m32c_return_value): Likewise.
	* m32r-tdep.c (m32r_return_value): Likewise.
	* m68hc11-tdep.c (m68hc11_return_value): Likewise.
	* m68k-tdep.c (m68k_return_value): Likewise.
	(m68k_svr4_return_value): Likewise.
	* m88k-tdep.c (m88k_return_value): Likewise.
	* mep-tdep.c (mep_return_value): Likewise.
	* microblaze-tdep.c (microblaze_return_value): Likewise.
	* mn10300-tdep.c (mn10300_return_value): Likewise.
	* moxie-tdep.c (moxie_return_value): Likewise.
	* mt-tdep.c (mt_return_value): Likewise.
	* ppc-linux-tdep.c (ppc_linux_return_value): Likewise.
	* ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Likewise.
	(ppc_sysv_abi_broken_return_value): Likewise.
	(ppc64_sysv_abi_return_value): Likewise.
	* ppcnbsd-tdep.c (ppcnbsd_return_value): Likewise.
	* rl78-tdep.c (rl78_return_value): Likewise.
	* rs6000-aix-tdep.c (rs6000_return_value): Likewise.
	* rx-tdep.c (rx_return_value): Likewise.
	* s390-tdep.c (s390_return_value): Likewise.
	* score-tdep.c (score_return_value): Likewise.
	* sh-tdep.c (sh_return_value_nofpu): Likewise.
	(sh_return_value_fpu): Likewise.
	* sh64-tdep.c (sh64_return_value): Likewise.
	* sparc-tdep.c (sparc32_return_value): Likewise.
	* sparc64-tdep.c (sparc64_return_value): Likewise.
	* spu-tdep.c (spu_return_value): Likewise.
	* tic6x-tdep.c (tic6x_return_value): Likewise.
	* v850-tdep.c (v850_return_value): Likewise.
	* vax-tdep.c (vax_return_value): Likewise.
	* xstormy16-tdep.c (xstormy16_return_value): Likewise.
	* xtensa-tdep.c (xtensa_return_value): Likewise.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.

	gdb/testsuite/
	* gdb.base/return-nodebug.exp: Also test float and double types.
2012-05-16 14:35:09 +00:00
gdbadmin 5c437eac45 *** empty log message *** 2012-05-16 00:00:03 +00:00
Tom Tromey 29ca12b317 * python/python.c (gdbpy_find_pc_line): Use gdb_py_ulongest. 2012-05-15 20:26:10 +00:00
Joel Brobecker 588ae58cd2 init_breakpoint_sal: Add quotes around part of command in error message
gdb/ChangeLog:

        * breakpoint.c (init_breakpoint_sal): Add quotes around part
        of command in two error message.
2012-05-15 16:42:43 +00:00
Joel Brobecker 855a6e6874 Remove trailing spaces in breakpoint.c:init_breakpoint_sal
gdb/ChangeLog:

        * breakpoint.c (init_breakpoint_sal): Remove trailing spaces.
2012-05-15 14:48:19 +00:00
Joel Brobecker d634f2de8f Minor style fixes in breakpoint.c:find_condition_and_thread
Mostly removing trailing spaces at end of lines, and also adding
an empty line after the function's documentation.

gdb/ChangeLog:

        * breakpoint.c (find_condition_and_thread): Minor reformatting.
2012-05-15 14:33:31 +00:00
Jan Kratochvil 54115cd45b gdb/testsuite/
* gdb.base/dprintf.exp: Remove now redundant breakpoint for main.
2012-05-15 13:36:18 +00:00
Jan Kratochvil 01429c8e86 gdb/testsuite/
PR testsuite/12649
	* gdb.base/dprintf.exp: Replace gdb_run_cmd by runto main.
2012-05-15 13:08:58 +00:00
Jan Kratochvil 9cc815f56d gdb/
* NEWS (show auto-load scripts-directory): Add forgotten command.
2012-05-15 04:12:17 +00:00
Jan Kratochvil 6a609e58cb gdb/
* spu-tdep.c (spu_catch_start): Update create_breakpoint caller
	parameters.
2012-05-15 04:08:47 +00:00
gdbadmin f890246990 *** empty log message *** 2012-05-15 00:00:02 +00:00
Sergio Durigan Junior 0c5f383f80 gdb/testsuite/ChangeLog:
2012-05-14  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.base/stap-probe.exp (stap_test): Remove calls to
	`rerun_to_main'.
	(stap_test_no_debuginfo): Likewise.
2012-05-14 20:33:16 +00:00
H.J. Lu ac1438b5c5 Call initialize_tdesc_x32/initialize_tdesc_x32_avx
* amd64-tdep.c: Include features/i386/x32.c and
	features/i386/x32-avx.c.
	(_initialize_amd64_tdep): Call initialize_tdesc_x32 and
	initialize_tdesc_x32_avx.
2012-05-14 18:56:40 +00:00
Stan Shebs e7e0cddfb0 2012-05-14 Stan Shebs <stan@codesourcery.com>
Add dynamic printf.
	* breakpoint.h (enum bptype): New type bp_dprintf.
	(struct breakpoint): New field extra_string.
	(struct breakpoint_ops): Add arg to create_breakpoints_sal.
	(create_breakpoint): Add extra_string arg.
	* breakpoint.c (dprintf_breakpoint_ops): New.
	(is_breakpoint): Add bp_dprintf.
	(bpstat_what): Add dprintf case.
	(bptype_string): Ditto.
	(print_one_breakpoint_location): Ditto.
	(init_bp_location): Ditto.
	(bkpt_print_mention): Ditto.
	(dprintf_style_enums): New array.
	(dprintf_style): New global.
	(dprintf_function): New global.
	(dprintf_channel): New global.
	(update_dprintf_command_list): New function.
	(update_dprintf_commands): New function.
	(init_breakpoint_sal): Add extra_string argument, handle it.
	(create_breakpoint_sal): Add extra_string argument.
	(create_breakpoints_sal): Add extra_string argument, update callers.
	(find_condition_and_thread): Add extra argument.
	(create_breakpoint): Add extra_string argument, record it.
	(dprintf_command): New function.
	(break_command_1): Add arg to create_breakpoint call.
	(handle_gnu_v3_exceptions): Ditto.
	(trace_command): Ditto.
	(ftrace_command): Ditto.
	(strace_command): Ditto.
	(bkpt_print_mention): Add dprintf case.
	(create_breakpoint_sal_default): Add extra_string argument.
	(_initialize_breakpoint): Add new commands.
	* mi/mi-cmd-break.c (mi_cmd_break_insert): Add arg to call.
	* python/py-breakpoint.c (bppy_init): Ditto.
	* python/py-finishbreakpoint.c (bpfinishpy_init): Ditto.

	* gdb.texinfo (Dynamic Printf): New subsection.

	* gdb.base/dprintf.c: New file.
	* gdb.base/dprintf.exp: New file.
2012-05-14 15:38:41 +00:00
Maciej W. Rozycki 8ae38c14cc * mips-tdep.c (mips_push_dummy_code): Correct description typo. 2012-05-14 09:32:03 +00:00
Siva Chandra Reddy 9f676e6662 2012-05-14 Siva Chandra Reddy <sivachandra@google.com>
* python/python.c (gdbpy_find_pc_line): Use ULONGEST instead of
	unsigned long long.
2012-05-14 03:06:47 +00:00
Hui Zhu c772f8e733 2012-05-11 Hui Zhu <hui_zhu@mentor.com>
* gdb.trace/Makefile.in (PROGS): Add disconnected-tracing.
	* gdb.trace/disconnected-tracing.c: New file.
	* gdb.trace/disconnected-tracing.exp: New file.
2012-05-14 02:20:54 +00:00
gdbadmin c52bd484bf *** empty log message *** 2012-05-14 00:00:33 +00:00
Siva Chandra Reddy 7efc75aaf9 2012-05-13 Siva Chandra Reddy <sivachandra@google.com>
Add a new function gdb.find_pc_line to the Python API.
	* NEWS (Python Scripting): Add entry about the new function.
	* python/python.c (gdbpy_find_pc_line): New function which
	implements gdb.find_pc_line.
	(GdbMethods): Add entry for the new function.

	doc/
	* gdb.texinfo (Basic Python): Add description about the function
	gdb.find_pc_line

	testsuite/
	* gdb.python/python.c: Add a new breakpoint comment.
	* gdb.python/python.exp: Add tests to test gdb.find_pc_line.
2012-05-13 11:33:44 +00:00
gdbadmin 186ff95663 *** empty log message *** 2012-05-13 00:00:03 +00:00
Jan Kratochvil f307c045ad gdb/doc/
* gdb.texinfo (Separate Debug Files): Use plural form for global
	debugging information directory.
2012-05-12 14:20:31 +00:00
Pedro Alves 70af379773 2012-05-12 Pedro Alves <palves@redhat.com>
* amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Call
	initialize_tdesc_x32_linux and initialize_tdesc_x32_avx_linux.
2012-05-12 08:54:03 +00:00
Eli Zaretskii 06da564ebe src/inferior.c: Include completer.h
(initialize_inferiors): Set completer of add-inferior to filename_completer.
2012-05-12 06:35:08 +00:00
gdbadmin 38434abc4c *** empty log message *** 2012-05-12 00:00:03 +00:00
H.J. Lu 0288cee270 Check gdbarch_ptr_bit for x32 core dump
* amd64-linux-tdep.c (amd64_linux_core_read_description): Check
	gdbarch_ptr_bit for x32 core dump.
2012-05-11 22:33:28 +00:00
H.J. Lu f6537a2c13 Include 32-linux.c and x32-avx-linux.c
* amd64-linux-tdep.c: Include features/i386/x32-linux.c
	and features/i386/x32-avx-linux.c.
2012-05-11 22:31:27 +00:00
Stan Shebs 85d4a67695 2012-05-11 Stan Shebs <stan@codesourcery.com>
Kwok Cheung Yeung  <kcy@codesourcery.com>

	* NEWS: Describe new info os commands.
	* common/linux-osdata.c (PID_T, TIME_T): Define.
	(MAX_PID_T_STRLEN): New.
	(linux_common_core_of_thread): Add comment.  Change to use PID_T and
	MAX_PID_T_STRLEN.
	(command_from_pid): Add comment.  Change to use PID_T.
	(commandline_from_pid):  Change to use PID_T.
	(user_from_pid): Add comment.
	(get_process_owner): Add comment. Change to use PID_T and
	MAX_PID_T_STRLEN.
	(get_number_of_cpu_cores): Add comment.
	(get_cores_used_by_process): Add comment.  Change to use PID_T and
	MAX_PID_T_STRLEN.
	(linux_xfer_osdata_processes): Change to use PID_T and
	MAX_PID_T_STRLEN.
	(compare_processes): New function.
	(linux_xfer_osdata_processgroups): New function.
	(linux_xfer_osdata_threads): Change to use PID_T.
	(linux_xfer_osdata_fds): New function.
	(format_socket_state, print_sockets): New functions.
	(union socket_addr): New union.
	(linux_xfer_osdata_isockets): New function.
	(time_from_time_t, group_from_gid): New functions.
	(linux_xfer_osdata_shm): New function.
	(linux_xfer_osdata_sem): New function.
	(linux_xfer_osdata_msg): New function.
	(linux_xfer_osdata_modules): New function.
	(osdata_table): Add new entries.
	* common/buffer.c (buffer_xml_printf): Add support for long and
	long long format specifiers.

	* gdb.texinfo (Operating System Auxiliary Information): Document new
	'info os' subcommands.

	* gdb.base/info-os.exp: New file.
	* gdb.base/info-os.c: New file.
2012-05-11 22:24:24 +00:00
H.J. Lu f24afd6d9f Declare tdesc_x32_linux/tdesc_x32_avx_linux
* amd64-linux-tdep.h (tdesc_x32_linux): New.
	(tdesc_x32_avx_linux): Likewise.
2012-05-11 22:02:29 +00:00
Jan Kratochvil c1668e4eee gdb/doc/
* gdb.texinfo (Auto-loading, Init File in the Current Directory)
	(libthread_db.so.1 file, objfile-gdb.gdb file, objfile-gdb.py file)
	(dotdebug_gdb_scripts section): Add reference
	to 'Auto-loading safe path'.
2012-05-11 18:23:11 +00:00
Jan Kratochvil 7349ff92c2 gdb/
Implement multi-component --with-auto-load-dir.
	* NEWS (set auto-load scripts-directory, --with-auto-load-dir): New
	entries.
	(--with-auto-load-safe-path): Update the default value description.
	* auto-load.c (auto_load_dir, set_auto_load_dir, show_auto_load_dir):
	New.
	(auto_load_objfile_script): Add DEBUG_AUTO_LOAD output.  Remove
	GDB_DATADIR NULL check.  Replace GDB_DATADIR/auto-load by
	AUTO_LOAD_DIR.  Support $ddir and multiple components in it.
	(_initialize_auto_load): Initialize also auto_load_dir.  Install new
	"set auto-load scripts-directory".
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (--with-auto-load-dir): New configure option.
	(--auto-load-safe-path): Change the default to --with-auto-load-dir.

gdb/doc/
	Implement multi-component --with-auto-load-dir.
	* gdb.texinfo (Auto-loading): New references
	for 'set auto-load scripts-directory'
	and 'show auto-load scripts-directory'.
	(Auto-loading safe path): Describe the new default.  Move $ddir
	substituation reference to 'objfile-gdb.py file'.
	(objfile-gdb.py file): Describe script-name alias.  Change real-name to
	script-name.  Describe new 'set auto-load scripts-directory'
	and 'show auto-load scripts-directory'.
2012-05-11 18:20:26 +00:00
Jan Kratochvil 6dea1fbd79 gdb/
Provide $ddir substitution for --with-auto-load-safe-path.
	* NEWS (--with-auto-load-safe-path, --without-auto-load-safe-path): New
	entries.
	* auto-load.c: Include observer.h.
	(auto_load_safe_path_vec_update): Call substitute_path_component for
	each component.  New variable ddir_subst.
	(auto_load_gdb_datadir_changed): New function.
	(set_auto_load_safe_path): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to
	AUTO_LOAD_SAFE_PATH.  New comment.
	(_initialize_auto_load): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to
	AUTO_LOAD_SAFE_PATH.  Install auto_load_gdb_datadir_changed.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (--auto-load-safe-path): Rename
	DEFAULT_AUTO_LOAD_SAFE_PATH to AUTO_LOAD_SAFE_PATH.  Default to
	GDB_DATADIR/auto-load.
	* defs.h (substitute_path_component): New declaration.
	* top.c: Include observer.h.
	(set_gdb_datadir): New function.
	(init_main): Install it for "set data-directory".
	* utils.c (substitute_path_component): New function.

gdb/doc/
	Provide $ddir substitution for --with-auto-load-safe-path.
	* gdb.texinfo (Auto-loading): Replace /usr/local by $ddir/auto-load.
	(Auto-loading safe path): Likewise.  Mention the default value,
	$ddir substitution, --with-auto-load-safe-path and
	--without-auto-load-safe-path.
	* observer.texi (gdb_datadir_changed): New.
2012-05-11 18:13:26 +00:00
Jan Kratochvil b09aca3aa7 gdb/
Make auto-load handle multiple components of DEBUG_FILE_DIRECTORY.
	* auto-load.c (auto_load_objfile_script): Remove check for NULL
	DEBUG_FILE_DIRECTORY.  Handle multiple components of
	DEBUG_FILE_DIRECTORY.
2012-05-11 18:06:28 +00:00
Pedro Alves bde24c0a34 2012-05-11 Yao Qi <yao@codesourcery.com>
Pedro Alves  <palves@redhat.com>

	* linux-low.c (enum stopping_threads_kind): New.
	(stopping_threads): Change type to `enum stopping_threads_kind'.
	(handle_extended_wait): If stopping and suspending threads, leave
	the new_lwp suspended too.
	(linux_wait_for_event): Adjust.
	(stop_all_lwps): Set `stopping_threads' to
	STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
	whether we're suspending threads or just stopping them.  Assert no
	recursion happens.
2012-05-11 13:34:34 +00:00
gdbadmin 5eb53b33d8 *** empty log message *** 2012-05-11 00:00:03 +00:00
Tom Tromey 95554aad6c * dwarf2read.c (recursively_write_psymbols): New function.
(write_psymtabs_to_index): Use it.

	* dwarf2read.c (struct dwarf2_queue_item) <pretend_language>: New
	field.
	(load_cu, dw2_do_instantiate_symtab, process_psymtab_comp_unit)
	(load_partial_comp_unit): Update.
	(queue_comp_unit): Add argument 'pretend_language'.
	(process_queue): Update.
	(psymtab_to_symtab_1): Skip dependencies that have a user.
	(load_partial_comp_unit_reader): Give meaning to the 'data'
	argument.
	(load_full_comp_unit): Add 'pretend_language' argument.
	(process_full_comp_unit): Add 'pretend_language' argument.  Set
	language on CU.
	(process_imported_unit_die, read_file_scope, read_type_unit_scope):
	Update.
	(maybe_queue_comp_unit): Add 'pretend_language' argument.
	(follow_die_offset, follow_die_sig, read_signatured_type_reader):
	Update.
	(prepare_one_comp_unit): Add 'pretend_language' argument.

	* dwarf2read.c: (dwarf2_per_cu_ptr): New typedef.
	(struct dwarf2_per_objfile) <just_read_cus>: New field.
	(struct dwarf2_per_cu_data) <imported_symtabs>: New field.
	(dw2_do_instantiate_symtab): Check whether symtab was read in
	before queueing.
	(dw2_instantiate_symtab): Add assertion.  Call
	process_cu_includes.
	(process_psymtab_comp_unit): Compute 'dependencies' for psymtab.
	(partial_symtab_p): New typedef.
	(set_partial_user): New function.
	(dwarf2_build_psymtabs_hard): Use set_partial_user.
	(scan_partial_symbols): Add imported CU to imported_symtabs.
	(dwarf2_psymtab_to_symtab): Call process_cu_includes.
	(psymtab_to_symtab_1): Do nothing if psymtab is readin.
	(get_symtab, recursively_compute_inclusions)
	(compute_symtab_includes, process_cu_includes)
	(process_imported_unit_die): New functions.
	(process_die) <DW_TAG_imported_unit>: New case.
	(dwarf2_per_objfile_free): Free 'imported_symtabs'.

	* dwarf2read.c (struct dwarf2_per_cu_data) <psymtab>: Update
	comment.
	(struct partial_die_info) <locdesc>: Remove.
	<d>: New field.
	(process_psymtab_comp_unit): Add 'read_partial' argument.
	Update.
	(process_type_comp_unit, dwarf2_build_psymtabs_hard): Update.
	(scan_partial_symbols): Handle DW_TAG_imported_unit.
	(add_partial_symbol): Update.
	(process_die): Handle DW_TAG_partial_unit.
	(read_file_scope): Update comment.
	(load_partial_dies): Handle DW_TAG_imported_unit.
	(read_partial_die): Handle DW_TAG_partial_unit, DW_AT_import.
	(determine_prefix, dwarf2_name): Handle DW_TAG_partial_unit.
2012-05-10 20:17:51 +00:00
Tom Tromey e871fbb936 * cc-with-dwz.sh: New file. 2012-05-10 20:07:02 +00:00
Tom Tromey b5b04b5b7a * symtab.h (struct symtab) <includes, user>: New fields.
* block.h (struct block_iterator) <d, idx, which>: New fields.
	* block.c (initialize_block_iterator, find_iterator_symtab)
	(block_iterator_step, block_iter_name_step)
	(block_iter_match_step): New functions.
	(block_iterator_first, block_iterator_next)
	(block_iter_name_first, block_iter_name_next)
	(block_iter_match_first, block_iter_match_next): Rewrite.
	(get_block_symtab): New function.
2012-05-10 20:04:00 +00:00
Tom Tromey 84a146c9d3 * jv-lang.c (get_java_class_symtab): Use allocate_global_block,
set_block_symtab.
	* jit.c (finalize_symtab): Use allocate_global_block,
	set_block_symtab.
	* buildsym.c (finish_block_internal): New function, from old
	finish_block.
	(finish_block): Rewrite.
	(end_symtab): Use finish_block_internal, set_block_symtab.
	* block.h (struct global_block): New.
	(allocate_global_block, set_block_symtab): Declare.
	* block.c (allocate_global_block, set_block_symtab): New
	functions.
2012-05-10 19:59:12 +00:00
Tom Tromey 9439a077be * psymtab.c (partial_map_expand_apply): Add assertion.
(partial_map_symtabs_matching_filename): Skip included psymtabs.
	(psymtab_to_symtab): Find unshared psymtab.
	(dump_psymtab): Print including psymtabs.
	(recursively_search_psymtabs): New function.
	(expand_symtabs_matching_via_partial): Use it.
	* psympriv.h (struct partial_symtab) <user, searched_flag>: New
	fields.
	(enum psymtab_search_status): New.
2012-05-10 19:54:45 +00:00
Tom Tromey 8157b174fd * tracepoint.c (scope_info): Update.
* symtab.c (lookup_block_symbol, iterate_over_symbols)
	(find_pc_sect_symtab, search_symbols)
	(default_make_symbol_completion_list_break_on)
	(make_file_symbol_completion_list): Update.
	* symmisc.c (dump_symtab_1): Update.
	* stack.c (print_frame_args, iterate_over_block_locals)
	(print_frame_labels, iterate_over_block_arg_vars): Update.
	* python/py-block.c (block_object) <dict>: Remove.
	<block>: New field.
	<iter>: Change type.
	(blpy_iter): Update.
	(blpy_block_syms_iternext): Update.
	* psymtab.c (map_block): Use block iterators.
	* objfiles.c (objfile_relocate1): Use ALL_DICT_SYMBOLS.
	* mi/mi-cmd-stack.c (list_args_or_locals): Update.
	* mdebugread.c (parse_symbol, mylookup_symbol): Update.
	* infrun.c (check_exception_resume): Update.
	* cp-support.c (make_symbol_overload_list_block): Update.
	* coffread.c (patch_opaque_types): Update.
	* buildsym.c (finish_block, end_symtab): Use ALL_DICT_SYMBOLS.
	* block.h (struct block_iterator): New.
	(block_iterator_first, block_iterator_next, block_iter_name_first)
	(block_iter_name_next, block_iter_match_first)
	(block_iter_match_next): Declare.
	(ALL_BLOCK_SYMBOLS): Redefine.
	* block.c (block_iterator_first, block_iterator_next)
	(block_iter_name_first, block_iter_name_next)
	(block_iter_match_first, block_iter_match_next): New functions.
	* ada-lang.c (ada_add_block_symbols)
	(ada_make_symbol_completion_list): Use block iterator.
2012-05-10 19:50:09 +00:00
Tom Tromey a2ca7a527e * psymtab.c (PSYMTAB_TO_SYMTAB): Remove.
(find_pc_sect_symtab_from_partial, lookup_symbol_aux_psymtabs)
	(lookup_partial_symbol, find_last_source_symtab_from_partial)
	(read_psymtabs_with_filename, map_matching_symbols_psymtab)
	(expand_symtabs_matching_via_partial, maintenance_check_symtabs):
	Update.
2012-05-10 19:44:52 +00:00
Joel Brobecker 64ea88dcd7 Add print 'file'::var testcase with two libs defining the same global variable
gdb/testsuite/ChangeLog:

	* gdb.base/print-file-var-lib1.c, gdb.base/print-file-var-lib2.c,
	gdb.base/print-file-var-main.c, gdb.base/print-file-var.exp:
	New files.

gdb/ChangeLog:

        * config/djgpp/fnchange.lst: Add entries for print-file-var-lib1.c,
        print-file-var-lib2.c, print-file-var-main.c and
        print-file-var.exp (located in gdb/testsuite/gdb.base).
2012-05-10 16:25:19 +00:00
Joel Brobecker afba63f109 New testcase: gdb.base/ctxobj.exp
gdb/testsuite/ChangeLog:

        * gdb.base/ctxobj-f.c, gdb.base/ctxobj-m.c, gdb.base/ctxobj-v.c,
        gdb.base/ctxobj.exp: New files.
2012-05-10 16:24:58 +00:00
Joel Brobecker 99a547d679 Search global symbols from the expression's block objfile first.
gdb/ChangeLog:

        * findvar.c (default_read_var_value): For LOC_UNRESOLVED symbols,
        try locating the symbol in the symbol's own objfile first, before
        extending the search to all objfiles.
        * symtab.c (lookup_symbol_aux_objfile): New function, extracted
        out of lookup_symbol_aux_symtabs.
        (lookup_symbol_aux_symtabs): Add new parameter "exclude_objfile".
        Replace extracted-out code by call to lookup_symbol_aux_objfile.
        Do not search EXCLUDE_OBJFILE.
        (lookup_static_symbol_aux): Update call to lookup_symbol_aux_symtabs.
        (lookup_symbol_global): Search for matches in the block's objfile
        first, before searching all other objfiles.
2012-05-10 16:24:40 +00:00
Tristan Gingold 0ece64fd6f 2012-05-10 Tristan Gingold <gingold@adacore.com>
* printcmd.c (set_command): Add pre/post inc/dec.
2012-05-10 14:10:38 +00:00
gdbadmin 968bf8f19d *** empty log message *** 2012-05-10 00:00:33 +00:00
Frank Ch. Eigler 3d16a105a6 2012-05-09 Frank Ch. Eigler <fche@redhat.com>
* gdb.1: Document -ex option.
2012-05-09 21:06:13 +00:00
Tom Tromey 9d198b1e46 * gdb.trace/strace.exp: Add 'quiet' to compiler flags. 2012-05-09 20:24:08 +00:00
Jan Kratochvil d9242c1736 gdb/doc/
* gdb.texinfo (Separate Debug Files, Auto-loading safe path): Replace
	directory separator by path separator.
2012-05-09 19:29:25 +00:00
Jan Kratochvil 1ccacbcdec gdb/doc/
* gdb.texinfo (Auto-loading): Wrap too long lines in @smallexample.
	Twice.
2012-05-09 18:15:58 +00:00
Maciej W. Rozycki 9bfee71961 * lib/gdb.exp (gdb_test_multiple): Correct formatting. 2012-05-09 14:29:49 +00:00
Joel Brobecker 2efbc0f722 Remove AT_SYMBOL
Now that this method is no longer used by any architecture,
we can remove its support.

gdb/ChangeLog:

        * infcall.c (call_function_by_hand): Remove AT_SYMBOL handling.
        * inferior.h (AT_SYMBOL): Delete.
2012-05-09 14:29:13 +00:00
Joel Brobecker 2c76a0c7f1 mips: Switch inferior function calls to ON_STACK method.
This patch switches the mips code to use the ON_STACK method
for function calls instead of AT_SYMBOL, which we want to remove.

gdb/ChangeLog:

        * mips-tdep.c (mips_push_dummy_code): New function.
        (mips_gdbarch_init): Set the gdbarch call_dummy_location to
        ON_STACK and install mips_push_dummy_code as our gdbarch
        push_dummy_code routine.
2012-05-09 14:29:02 +00:00
Pedro Alves 9401a810a5 2012-05-09 Pedro Alves <palves@redhat.com>
* target.c (set_maintenance_target_async_permitted): Rename to ...
	(set_target_async_command): ... this.
	(show_maintenance_target_async_permitted): Rename to ...
	(show_target_async_command): ... this.
	(initialize_targets): Adjust.
2012-05-09 11:47:14 +00:00
Doug Evans 3929b32137 * go-exp.y (classify_name): Add missing assignment of fields of
yylval.ssym.
2012-05-09 05:10:26 +00:00
gdbadmin 2366d76201 *** empty log message *** 2012-05-09 00:00:03 +00:00
Eli Zaretskii c41535fdc4 Display the ">" prompt in interactive mode while reading canned
commands, even when the current interpreter is MI.

 interps.c (interp_set_temp): New function.
 interps.h (interp_set_temp): Add prototype.
 cli/cli-script.c (restore_interp): New cleanup function.
 (read_command_lines): Temporarily override the current interpreter
 with CLI and arrange for restoring the original one.
2012-05-08 18:49:42 +00:00
Joel Sherrill c0749c4da2 2012-05-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* microblaze-rom.c (_initialize_picobug_rom): Add prototype.
2012-05-08 14:07:09 +00:00
Maciej W. Rozycki 3a7341d8b6 * gdb.mi/mi-var-display.exp: Check for the existence of $fp
before using it.
2012-05-08 07:22:19 +00:00
Sergio Durigan Junior d733398780 2012-05-07 Sergio Durigan Junior <sergiodj@redhat.com>
* probe.c (parse_probes): Move conditional to check for
	debuginfo files from here...
	* stap-probe.c (stap_get_probes): ... to here.
2012-05-08 01:35:35 +00:00
gdbadmin 403f1486a3 *** empty log message *** 2012-05-08 00:00:03 +00:00
Mark Kettenis 649e6d9245 H.J. Lu <hongjiu.lu@intel.com>
* amd64-tdep.c (amd64_analyze_prologue): Additionally check for
`movl %esp, %ebp' for the X32 ABI.
2012-05-07 21:02:43 +00:00
Tom Tromey f39c6ffde7 * dwarf2read.c (dwarf_tag_name): Return const char *. Use
get_DW_TAG_name.
	(dwarf_attr_name): Return const char *.  Use get_DW_AT_name.
	(dwarf_form_name): Return const char *.  Use get_DW_FORM_name.
	(dwarf_stack_op_name): Remove.
	(dwarf_cfi_name): Return const char *.  Use get_DW_ATE_name.
	(decode_locdesc): Use get_DW_OP_name.
	* dwarf2loc.c (unimplemented): Use get_DW_OP_name.
	(dwarf2_compile_expr_to_ax): Likewise.
	(disassemble_dwarf_expression): Likewise.
	* dwarf2expr.h: (dwarf_stack_op_name): Remove.
2012-05-07 15:18:38 +00:00
Chung-Lin Tang 1e1f659128 2012-05-07 Chung-Lin Tang <cltang@codesourcery.com>
* sh-linux-tdep.c: Include trad-frame.h and tramp-frame.h.
	(sh_linux_sigtramp_cache): New function.
	(sh_linux_sigreturn_init): New function.
	(sh_linux_rt_sigreturn_init): New function.
	(SH_MOVW,SH_TRAP,SH_OR_R0_R0): New symbols for instruction
	patterns.
	(SH_NR_SIGRETURN,SH_NR_RT_SIGRETURN): New symbols for sigreturn
	syscall codes.
	(sh_linux_sigreturn_tramp_frame): New tramp_frame definition.
	(sh_linux_rt_sigreturn_tramp_frame): Likewise.
	(sh_linux_init_abi): Add init calls to register new tramp_frame
	definitions under 32-bit SH, update comments.
2012-05-07 13:17:29 +00:00
Pedro Alves daac165e45 Add PR number to ChangeLog entry.
2012-05-07  Pedro Alves  <palves@redhat.com>

	PR gdb/10952

	* amd64-linux-tdep.c: Include glibc-tdep.h.
	(amd64_linux_init_abi): Install glibc_skip_solib_resolver as
	gdbarch_skip_solib_resolver callback.
2012-05-07 10:59:25 +00:00
Pedro Alves 545c08b4a9 2012-05-07 Pedro Alves <palves@redhat.com>
* amd64-linux-tdep.c: Include glibc-tdep.h.
	(amd64_linux_init_abi): Install glibc_skip_solib_resolver as
	gdbarch_skip_solib_resolver callback.
2012-05-07 10:47:22 +00:00
gdbadmin f136fa2d22 *** empty log message *** 2012-05-07 00:00:03 +00:00
Jan Kratochvil af2c151515 gdb/
* auto-load.c (set_auto_load_safe_path): Reset AUTO_LOAD_SAFE_PATH
	back to DEFAULT_AUTO_LOAD_SAFE_PATH if it is being set to "".
	(show_auto_load_safe_path): Check any-directory by comparison with "/".
	(add_auto_load_safe_path): Change the error message.
	(_initialize_auto_load): Change the "safe-path" help text.
	* configure: Regenerate
	* configure.ac (--without-auto-load-safe-path): Set
	WITH_AUTO_LOAD_SAFE_PATH to /.

gdb/doc/
	* gdb.texinfo (Auto-loading safe path): Make 'directories'
	for 'set auto-load safe-path' optional.  Mention if it is omitted.
	Change disabling security protection condition to "/", twice.
2012-05-06 15:31:04 +00:00
gdbadmin 6c143e28e5 *** empty log message *** 2012-05-06 00:00:33 +00:00
Sergio Durigan Junior 1067f99890 2012-05-05 Sergio Durigan Junior <sergiodj@redhat.com>
* stap-probe.h: Do not include unecessary `probe.h'.
2012-05-05 05:36:23 +00:00
Alan Modra 45dfa85a1e Replace all uses of bfd_abs_section, bfd_com_section, bfd_und_section
and bfd_ind_section with their _ptr variants, or use corresponding
bfd_is_* macros.
2012-05-05 03:05:32 +00:00
gdbadmin 989a86aed7 *** empty log message *** 2012-05-05 00:00:03 +00:00
Joel Brobecker 762ebb75ae Fix typo in last gdb/ChangeLog entry. 2012-05-04 18:43:12 +00:00
Joel Brobecker cf09399456 MAINTAINERS: Add Chris Faylor in `Past Maintainers' section.
gdb/ChangeLog:

	* MAINTAINER (Past Maintainers): Add Chris Faylor.
2012-05-04 18:41:34 +00:00
Joel Brobecker d40dc7a8d8 Segment register reading on Windows targets.
This patch makes sure that the value of segment registers are
read properly as 16bit values on Windows.

gdb/ChangeLog:

        * windows-nat.h (segment_register_p_ftype): New typedef.
        (windows_set_segment_register_p): Add declaration.
        * windows-nat.c (segment_register_p): New static global.
        (windows_set_segment_register_p): New function.
        (do_windows_fetch_inferior_registers): Add special handling
        for segment registers.
        * amd64-windows-nat.c: #include "amd64-tdep.h".
        (amd64_windows_segment_register_p): New function.
        (_initialize_amd64_windows_nat): Call windows_set_segment_register_p.
        * i386-windows-nat.c: #include "i386-tdep.h".
        (i386_windows_segment_register_p): New function.
        (_initialize_i386_windows_nat): Call windows_set_segment_register_p.
2012-05-04 18:36:30 +00:00
Tristan Gingold 52b3699b0b 2012-05-04 Tristan Gingold <gingold@adacore.com>
* printcmd.c (set_command): Emit a warning if the expression is not
	an assignment.

testsuite/
2012-05-04  Tristan Gingold  <gingold@adacore.com>

	* gdb.base/set-noassign.exp: New test.
2012-05-04 07:58:00 +00:00
gdbadmin a1b80f44af *** empty log message *** 2012-05-04 00:00:33 +00:00
Joel Brobecker 94c7423913 not-procfs.c: Make procfs_find_new_threads and procfs_pid_to_str static.
gdb/ChangeLog:

        * nto-procfs.c (procfs_find_new_threads, procfs_pid_to_str):
        Make static.
2012-05-03 22:07:58 +00:00
Sergio Durigan Junior fcf57f192d 2012-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
* stap-probe.c (stap_is_operator): Change declaration.
	(stap_get_opcode): Change return value.
	(stap_parse_argument_1): Update calls to `stap_get_opcode' and
	`stap_parse_argument_1'.
2012-05-03 20:04:06 +00:00
Pedro Alves 27d2932ecf 2012-05-03 Pedro Alves <pedro@codesourcery.com>
* infrun.c (displaced_step_fixup): Add "displaced:" prefix to
	debug log.
2012-05-03 14:59:41 +00:00
Siva Chandra Reddy a20ee7a4a9 2012-05-03 Siva Chandra Reddy <sivachandra@google.com>
Add two new methods global_block and static_block to gdb.Symtab
	objects.
	* NEWS (Python scripting): Add entry about the new methods.
	* python/py-symtab.c (stpy_global_block): New function which
	implements the gdb.Symtab.global_block() method.
	(stpy_static_block): New function which implements the
	gdb.Symtab.static_block() method.
	(symtab_object_methods): Add entries for the two new methods.

	* testsuite/gdb.python/py-symbol.exp: Add tests to test the new
	methods gdb.Symtab.global_block() and gdb.Symtab.static_block().
	* tessuite/gdb.python/py-symbol.c: Add new struct to help test
	gdb.Symtab.static_block().

	* doc/gdb.texinfo (Symbol Tables In Python): Add documentation
	about the new methods global_block and static_block on
	gdb.Symtab objects.
2012-05-03 07:07:26 +00:00
Doug Evans bf2f0858b1 * gdb.dwarf2/pr13961.S: Add file and source location, but leave
commented out.
2012-05-03 06:49:05 +00:00
Doug Evans 943cb7566b * dwarf2read.c (dw2_find_symbol_file): Don't crash if there are no files. 2012-05-03 05:27:36 +00:00
Yao Qi 2d4e03767f gdb/testsuite:
* gdb.base/catch-syscall.exp: Skip it before compilation if target
	doesn't support.
	* gdb.base/foll-exec.exp, gdb.base/foll-fork.exp: Likewise.
	* gdb.base/foll-vfork.exp, gdb.multi/bkpt-multi-exec.exp: Likewise.
2012-05-03 02:05:15 +00:00
Yao Qi 6d0bb9f3db gdb/testsuite:
* gdb.mi/mi-solib.exp: Setup kfail for gdb/13860.
2012-05-03 01:52:31 +00:00
Yao Qi f4644a3fe0 gdb:
* i386-tdep.c (i386_fetch_pointer_argument): Remove extra
	space.
	(i386_process_record): Ditto.
2012-05-03 01:42:49 +00:00
Joel Brobecker ef61f1802b Make infcall.c:unwind_on_signal_p static.
gdb/ChangeLog:

	* infcall.c (unwind_on_signal_p): Make static.
2012-05-03 00:10:07 +00:00
gdbadmin 4e4852cecf *** empty log message *** 2012-05-03 00:00:33 +00:00
Joel Brobecker 02f1df11e4 Fix -Wmissing-prototypes errors in sol-thread.c
gdb/ChangeLog:

        * sol-thread.c (solaris_pid_to_str): Make static.
        (_initialize_sol_thread): Add prototype.
2012-05-02 23:18:36 +00:00
Joel Brobecker 390235306b Delete unused procfs_pid_to_str extern in sol-thread.c
gdb/ChangeLog:

        * sol-thread.c (procfs_pid_to_str): Delete extern declaration.
2012-05-02 23:06:58 +00:00
Christopher Faylor c6b0c5016c * MAINTAINERS: Remove myself. 2012-05-02 22:12:05 +00:00
Jan Kratochvil 1ef7171746 gdb/
Fix --without-auto-load-safe-path for MS-Windows host platform.
	* auto-load.c (filename_is_in_dir): Return 1 for DIR_LEN 0.
2012-05-02 20:00:36 +00:00
Siva Chandra Reddy 56af09aac9 2012-05-02 Siva Chandra Reddy <sivachandra@google.com>
* doc/gdb.texinfo (Blocks In Python): Add a note saying that
	future improvements to GDB and its infrastructure can move
	symbols across blocks within a symbol table.
2012-05-02 17:27:50 +00:00
Eli Zaretskii b31b86a798 gdb_curses.h: Undefine KEY_EVENT before including curses
headers.  Move "#undef MOUSE_MOVED" before any curses header
 inclusion.
2012-05-02 17:13:39 +00:00