Commit Graph

71916 Commits

Author SHA1 Message Date
Ulrich Weigand 145b16a97a ChangeLog:
* defs.h (enum info_proc_what): Moved here from linux-nat.c
	* infcmd.c: (info_proc_cmd_1): New function.
	(info_proc_cmd): New function, moved here from equivalent routine
	orignally in linux-nat.c.
	(info_proc_cmd_mappings): Likewise.
	(info_proc_cmd_stat): Likewise.
	(info_proc_cmd_status): Likewise.
	(info_proc_cmd_cwd): Likewise.
	(info_proc_cmd_cmdline): Likewise.
	(info_proc_cmd_exe): Likewise.
	(info_proc_cmd_all): Likewise.
	(_initialize_infcmd): Install "info proc" command and subcommands.

	* target.h (struct target_ops): Add to_info_proc.
	(target_info_proc): Add prototype.
	* target.c (target_info_proc): New function.

	* procfs.c (procfs_info_proc): Add prototype.
	(info_proc_cmd): Rename into ...
	(procfs_info_proc): ... this.  Update argument types as appropriate
	for a to_info_proc implementation.  Handle "what" argument.
	(procfs_target): Install procfs_info_proc.
	(_initialize_procfs): No longer install "info proc" command.

	* linux-nat.c: (enum info_proc_what): Remove.
	(linux_nat_info_proc_cmd_1): Rename into ...
	(linux_nat_info_proc): ... this.  Update argument types as appropriate
	for a to_info_proc implementation.
	(linux_nat_info_proc_cmd): Remove.
	(linux_nat_info_proc_cmd_mappings): Likewise.
	(linux_nat_info_proc_cmd_stat): Likewise.
	(linux_nat_info_proc_cmd_status): Likewise.
	(linux_nat_info_proc_cmd_cwd): Likewise.
	(linux_nat_info_proc_cmd_cmdline): Likewise.
	(linux_nat_info_proc_cmd_exe): Likewise.
	(linux_nat_info_proc_cmd_all): Likewise.
	(linux_target_install_ops): Install linux_nat_info_proc.
	(_initialize_linux_nat): No longer install "info proc" command
	and subcommands.

testsuite/ChangeLog:

	* gdb.base/info-proc.exp: Also run on remote targets.  Main
	"info proc" command is now always present; whether target supports
	actual info proc operation is detected when attempting to issue
	the command.
2012-01-20 09:49:01 +00:00
Ulrich Weigand b9e7b9c3de ChangeLog:
* configure.ac [AC_CHECK_FUNCS]: Check for readlink.
	* config.in, configure: Regenerate.

	* target.h (struct target_ops): Add to_fileio_readlink.
	(target_fileio_readlink): Add prototype.
	* target.c (target_fileio_readlink): New function.

	* inf-child.c: Conditionally include <sys/param.h>.
	(inf_child_fileio_readlink): New function.
	(inf_child_target): Install it.

	* remote.c (PACKET_vFile_readlink): New enum value.
	(remote_hostio_readlink): New function.
	(init_remote_ops): Install it.
	(_initialize_remote): Handle vFile:readlink packet type.

doc/ChangeLog:

	* gdb.texinfo (Remote Configuration): Document
	"set remote hostio-readlink-packet" command.
	(General Query Packets): Document vFile:readlink packet.

gdbserver/ChangeLog:

	* hostio.c (handle_readlink): New function.
	(handle_vFile): Call it to handle "vFile:readlink" packets.
2012-01-20 09:47:32 +00:00
Ulrich Weigand 7313baad7c 2012-01-20 Pedro Alves <palves@redhat.com>
Ulrich Weigand  <ulrich.weigand@linaro.org>

	* configure.ac [AC_CHECK_FUNCS]: Check for pread and pwrite.
	* config.in, configure: Regenerate.

	* target.h (struct target_ops): Add to_fileio_open, to_fileio_pwrite,
	to_fileio_pread, to_fileio_close, to_fileio_unlink.
	(target_fileio_open): Add prototype.
	(target_fileio_pwrite): Likewise.
	(target_fileio_pread): Likewise.
	(target_fileio_close): Likewise.
	(target_fileio_unlink): Likewise.
	(target_fileio_read_alloc): Likewise.
	(target_fileio_read_stralloc): Likewise.

	* target.c: Include "gdb/fileio.h".
	(target_read_stralloc): Accept trailing, but not embedded NUL bytes.
	(default_fileio_target): New function.
	(target_fileio_open): Likewise.
	(target_fileio_pwrite): Likewise.
	(target_fileio_pread): Likewise.
	(target_fileio_close): Likewise.
	(target_fileio_unlink): Likewise.
	(target_fileio_close_cleanup): Likewise.
	(target_fileio_read_alloc_1): Likewise.
	(target_fileio_read_alloc): Likewise.
	(target_fileio_read_stralloc): Likewise.

	* inf-child.c: Include "gdb/fileio.h", <sys/types.h>, <sys/stat.h>,
	<fcntl.h>, and <unistd.h>.
	(inf_child_fileio_open_flags_to_host): New function.
	(inf_child_errno_to_fileio_error): Likewise.
	(inf_child_fileio_open): Likewise.
	(inf_child_fileio_pwrite): Likewise.
	(inf_child_fileio_pread): Likewise.
	(inf_child_fileio_close): Likewise.
	(inf_child_fileio_unlink): Likewise.
	(inf_child_target): Install to_fileio routines.

	* remote.c (init_remote_ops): Install to_fileio routines.
2012-01-20 09:45:51 +00:00
Ulrich Weigand 901f991244 2012-01-20 Pedro Alves <palves@redhat.com>
Ulrich Weigand  <ulrich.weigand@linaro.org>

ChangeLog:

	* remote.c (remote_multi_process_p): Only check for multi-process
	protocol feature, do not check for extended protocol.
	(remote_supports_multi_process): Check for extended protocol here.
	(set_general_process): Likewise.
	(extended_remote_kill): Likewise.
	(remote_pid_to_str): Likewise.
	(remote_query_supported): Always query multiprocess mode.

gdbserver/ChangeLog:

	* server.c (handle_v_requests): Only support vAttach and vRun to
	start multiple processes when in extended protocol mode.
2012-01-20 09:44:35 +00:00
Ulrich Weigand e714e1bf77 2012-01-20 Pedro Alves <palves@redhat.com>
Ulrich Weigand  <ulrich.weigand@linaro.org>

	* inferior.h (struct inferior): Add fake_pid_p.
	* inferior.c (exit_inferior_1): Clear fake_pid_p.
	* remote.c (remote_start_remote): Set fake_pid_p if we have to use
	magic_null_ptid since the remote side doesn't provide a real PID.
2012-01-20 09:42:44 +00:00
H.J. Lu 618d666674 Add typename on types used in template
2012-01-22  H.J. Lu  <hongjiu.lu@intel.com>

	* x86_64.cc (gc_process_relocs): Add typename on types used in
	template.
	(scan_relocs): Likewise.
	(relocate_section): Likewise.
	(apply_relocation): Likewise.
2012-01-20 00:43:57 +00:00
gdbadmin 8b70fe3ad6 *** empty log message *** 2012-01-20 00:00:33 +00:00
Alan Modra 3e83742a65 daily update 2012-01-19 23:00:07 +00:00
Tom Tromey 508972892c * NEWS: Combine the two Python sections. 2012-01-19 16:54:03 +00:00
Jan Kratochvil 1afc203311 gdb/
* target.h (target_close): Update comment on the target's unpush state.
2012-01-19 16:36:38 +00:00
Pedro Alves 305436e07a 2012-01-19 Pedro Alves <palves@redhat.com>
* linux-nat.c (linux_nat_close): Call linux_nat_is_async_p and
	linux_nat_async directly instead of going through the target
	vector.
	* target.c (unpush_target): Close target after unpushing it, not
	before.
2012-01-19 16:32:59 +00:00
Tristan Gingold 2fc0fe4faa 2012-01-19 Tristan Gingold <gingold@adacore.com>
* dwarf.c (process_extended_line_op): Add a cast to silent a
	warning.
2012-01-19 13:58:15 +00:00
Gary Benson 4932389582 2012-01-19 Gary Benson <gbenson@redhat.com>
* mdebugread.c (sort_blocks): Replace integer constants with ones
	derived from FIRST_LOCAL_BLOCK.
2012-01-19 12:51:04 +00:00
Jan Kratochvil 26f6125ebd gdb/testsuite/
* .gdbinit: Remove.
2012-01-19 12:44:01 +00:00
Pedro Alves eb5227ce35 2012-01-19 Pedro Alves <palves@redhat.com>
* gdb.java/jprint.exp: Don't rely on inferior output, but instead
	look at the funtions' returns.
	* gdb.java/jprint.java (jvclass.addprint, jprint.print(int))
	(jprint.print(int, int)): Change return type to int.  Adjust.
2012-01-19 12:37:28 +00:00
Tristan Gingold 100fc76795 2012-01-19 Tristan Gingold <gingold@adacore.com>
* pef.c: Add a comment.
	* xsym.c: Likewise.
2012-01-19 11:45:36 +00:00
Tristan Gingold 143a3db098 2012-01-19 Tristan Gingold <gingold@adacore.com>
* dwarf.c (process_extended_line_op): Reindent define_file output.
	Detect define_file opcode length mismatch.
	(display_debug_lines_decoded): Add an entry in file_table for each
	define_file opcode.
	Ignore DW_LNE_set_discriminator and DW_LNE_HP_set_sequence.
	Display extended opcode for unhandle opcode.
2012-01-19 11:34:44 +00:00
gdbadmin 8da108ce40 *** empty log message *** 2012-01-19 00:00:32 +00:00
Alan Modra 868e0b4d84 daily update 2012-01-18 23:00:05 +00:00
Paul Pluzhnikov 1db333787d 2012-01-18 Paul Pluzhnikov <ppluzhnikov@google.com>
Jan Kratochvil  <jan.kratochvil@redhat.com>

	PR gdb/9538
	* symfile.c (find_separate_debug_file): New function.
	(terminate_after_last_dir_separator): Likewise.
	(find_separate_debug_file_by_debuglink): Also try realpath.
	* configure.ac (AC_CHECK_FUNCS): Add lstat.
	* configure: Regenerate.
	* config.in: Regenerate.

testsuite/ChangeLog:

2012-01-18  Paul Pluzhnikov  <ppluzhnikov@google.com>

	PR gdb/9538
	* gdb.base/sepdebug.exp: New test.
2012-01-18 18:58:43 +00:00
Doug Evans f83d8a90ae * Makefile.in (TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_DEFINE): Delete.
(main.o): Remove rule.
	* configure.ac (BINDIR): Define with AC_DEFINE_DIR.
	(--with-sysroot): Rewrite.
	* configure: Regenerate.
	* config.in: Regenerate.
2012-01-18 18:35:43 +00:00
Pedro Alves b9736cf836 2012-01-18 Pedro Alves <palves@redhat.com>
* gdb.ada/mi_task_info.exp (-ada-task-info with no argument):
	Allow output before ^done.
2012-01-18 17:00:17 +00:00
Sergio Durigan Junior 2dbca4d632 2012-01-18 Sergio Durigan Junior <sergiodj@redhat.com>
* parse.c (initialize_expout): New function.
(reallocate_expout): Likewise.
(parse_exp_in_context): Use `initialize_expout' and
`reallocate_expout' when appropriate.
2012-01-18 12:47:35 +00:00
Pedro Alves 0695b514b3 2012-01-18 Pedro Alves <palves@redhat.com>
* record.c (struct record_breakpoint, record_breakpoint_p)
	(record_breakpoints): New.
	(record_insert_breakpoint, record_remove_breakpoint): Manage
	record breakpoints list.  Only remove breakpoints from the
	inferior if they had been inserted there in the first place.
2012-01-18 11:51:55 +00:00
gdbadmin b750fb87a1 *** empty log message *** 2012-01-18 00:00:33 +00:00
Alan Modra 89ee7288fe daily update 2012-01-17 23:00:05 +00:00
Doug Evans 136e1c3078 * linespec.c (decode_line_internal): Don't call symtabs_from_filename
if we know we don't have a file name to look for.
2012-01-17 20:30:22 +00:00
Pedro Alves fc1ab1a0ff 2012-01-17 Pedro Alves <palves@redhat.com>
* tracepoint.c (initialize_tracepoint): Use mmap instead of
	memalign plus mprotect to allocate the scratch buffer.
2012-01-17 17:22:10 +00:00
Pedro Alves c0bf857deb 2012-01-17 Pedro Alves <palves@redhat.com>
* dwarf2-frame.c (dwarf2_frame_cfa): Throw NOT_AVAILABLE_ERROR, if
	the frame's stop reason is UNWIND_UNAVAILABLE.
2012-01-17 14:03:33 +00:00
Alan Modra 032fbb7a3a * write.c (fix_new_internal): Don't mark used parameter as unused. 2012-01-17 00:20:30 +00:00
Alan Modra 3499cebd0d * config/default.exp: Provide tmpdir/ld/collect-ld. 2012-01-17 00:16:54 +00:00
Alan Modra 576477a6ee Update copyright message year. 2012-01-17 00:07:04 +00:00
Jan Kratochvil b486de6062 gdb/
Fix compilation error.
	* m2-exp.y (yyerror): Use ANSI C prototype.
2012-01-17 00:06:47 +00:00
gdbadmin a3f2b44cfd *** empty log message *** 2012-01-17 00:00:33 +00:00
Alan Modra e20cc039b4 PR binutils/10173
* cr16-dis.c (print_arg): Test symtab_size not num_symbols.
2012-01-16 23:51:35 +00:00
Andreas Schwab e143d25c73 * gas/testsuite/gas/m68k/pmove.s, gas/testsuite/gas/m68k/pmove.d: New test.
* gas/testsuite/gas/m68k/all.exp: Run it.

* opcodes/m68k-opc.c (m68k_opcodes): Fix entries for pmove with BADx/BACx
register and move them after pmove with PSR/PCSR register.
2012-01-16 23:19:20 +00:00
Alan Modra 6aa2bb2b1b daily update 2012-01-16 23:00:05 +00:00
Alan Modra 75cd47ede2 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
trailing garbage in the note.
	* elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
2012-01-16 22:30:19 +00:00
Sergio Durigan Junior d04550a6d7 2012-01-16 Sergio Durigan Junior <sergiodj@redhat.com>
* f-exp.y (parse_number): Convert prototype from K&R to ANSI C.
(growbuf_by_size): Likewise.
(yyerror): Likewise.
* m2-exp.y (make_qualname): Remove function (was #if 0'ed).
(modblock): Remove variable (was #if 0'ed).
(parse_number): Convert prototype from K&R to ANSI C.
(yyerror): Likewise.
* objc-exp.y (parse_number): Likewise.
(yyerror): Likewise.
(yylex): Remove #if 0'ed code.
* p-exp.y (uptok): Convert prototype from K&R to ANSI C.
(yyerror): Likewise.
2012-01-16 21:03:36 +00:00
Tom Tromey 4aac40c837 gdb
* NEWS: Add item.
	* symtab.h (compare_filenames_for_search): Declare.
	* symtab.c (compare_filenames_for_search): New function.
	(iterate_over_some_symtabs): Use it.
	* symfile.h (struct quick_symbol_functions)
	<map_symtabs_matching_filename>: Change spec.
	* psymtab.c (partial_map_symtabs_matching_filename): Use
	compare_filenames_for_search.  Update for new spec.
	* dwarf2read.c (dw2_map_symtabs_matching_filename): Use
	compare_filenames_for_search.  Update for new spec.
	* breakpoint.c (clear_command): Use compare_filenames_for_search.
gdb/doc
	* gdb.texinfo (Specify Location): Document relative file name
	handling.
gdb/testsuite
	* gdb.linespec/linespec.exp: Change some tests to use $decimal.
	Add tests for relative directory.
2012-01-16 20:40:53 +00:00
Tom Tromey cafec44190 gdb
PR python/13281:
	* gdbtypes.h (TYPE_FLAG_ENUM): New macro.
	(struct main_type) <flag_flag_enum>: New field.
	* dwarf2read.c (process_enumeration_scope): Detect "flag" enums.
	* NEWS: Add entries.
	* c-valprint.c (c_val_print) <TYPE_CODE_ENUM>: Handle "flag"
	enums.
	* python/lib/gdb/printing.py (_EnumInstance): New class.
	(FlagEnumerationPrinter): Likewise.
gdb/doc
	* gdb.texinfo (gdb.printing): Document FlagEnumerationPrinter.
gdb/testsuite
	* gdb.base/printcmds.c (enum flag_enum): New.
	(three): New global.
	* gdb.base/printcmds.exp (test_print_enums): Add test for flag
	enum printing.
	* gdb.python/py-pp-maint.py (build_pretty_printer): Instantiate
	FlagEnumerationPrinter.
	* gdb.python/py-pp-maint.exp: Add tests for FlagEnumerationPrinter.
	* gdb.python/py-pp-maint.c (enum flag_enum): New.
	(fval): New global.
2012-01-16 19:44:16 +00:00
Sergio Durigan Junior 983af33b26 2012-01-16 Sergio Durigan Junior <sergiodj@redhat.com>
* breakpoint.c (create_sals_from_address_default): New function.
(create_breakpoints_sal_default): Likewise.
(decode_linespec_default): Likewise.
(is_marker_spec): Removed.
(strace_marker_p): New function.
(init_breakpoint_sal): Using `strace_marker_p' instead of
`is_marker_spec'.
(create_breakpoint): Call method `create_sals_from_address' from
breakpoint_ops, replacing code that created SALs conditionally
on the type of the breakpoint.  Call method `create_breakpoints_sal',
replacing code that created breakpoints conditionally on the type
wanted.
(base_breakpoint_create_sals_from_address): New function.
(base_breakpoint_create_breakpoints_sal): Likewise.
(base_breakpoint_decode_linespec): Likewise.
(base_breakpoint_ops): Add methods
`base_breakpoint_create_sals_from_address',
`base_breakpoint_create_breakpoints_sal' and
`base_breakpoint_decode_linespec'.
(bkpt_create_sals_from_address): New function.
(bkpt_create_breakpoints_sal): Likewise.
(bkpt_decode_linespec): Likewise.
(tracepoint_create_sals_from_address): Likewise.
(tracepoint_create_breakpoints_sal): Likewise.
(tracepoint_decode_linespec): Likewise.
(strace_marker_create_sals_from_address): Likewise.
(strace_marker_create_breakpoints_sal): Likewise.
(strace_marker_decode_linespec): Likewise.
(strace_marker_breakpoint_ops): New variable.
(addr_string_to_sals): Remove `marker_spec'.  Call method
`decode_linespec' from breakpoint_ops, replacing code that decoded
an address string into a SAL.  Use `strace_marker_p' instead of
`marker_spec'.
(strace_command): Decide whether we are dealing with a static
tracepoint with marker or not.  Use the appropriate breakpoint_ops.
(initialize_breakpoint_ops): Initialize new fields of breakpoint_ops.
* breakpoint.h (linespec_result, linespec_sals): New forward
declarations.
(breakpoint_ops) <create_sals_from_address>,
<create_breakpoints_sal>, <decode_linespec>: New methods.
2012-01-16 17:44:36 +00:00
Pedro Alves abcc497831 2012-01-16 Pedro Alves <palves@redhat.com>
* lib/gdb.exp (banned_procedures): New variable.
	(banned_variables_traced): Rename to ...
	(banned_traced): ... this.
	(gdb_init): Also trace banned procedures.
	(gdb_finish): Also untrace banned procedures.
2012-01-16 17:31:25 +00:00
Pedro Alves 97ccebe869 2012-01-16 Pedro Alves <palves@redhat.com>
Remove all calls to strace.
2012-01-16 16:21:53 +00:00
Alan Modra ddb1377cc0 PR binutils/13593
* nm.c (OPTION_SIZE_SORT): Define.
	(long_options): Don't set no_sort, sort_numerically or
	sort_by_size directly.
	(main): Instead set the flags here, making them mutually exclusive.
2012-01-16 08:43:20 +00:00
Alan Modra 8a5dcf532e PR ld/13491
* coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
	h->root.type not h->type.
	* coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
2012-01-16 08:30:18 +00:00
gdbadmin bfcfb5c9a1 *** empty log message *** 2012-01-16 00:00:04 +00:00
Alan Modra 70abf05b38 daily update 2012-01-15 23:00:06 +00:00
Alan Modra cdaa438c86 PR ld/12758
* ldlang.c (lang_process): Don't reopen all files, just those
	newly added by plugin.
2012-01-15 01:57:15 +00:00
gdbadmin 4442237884 *** empty log message *** 2012-01-15 00:00:03 +00:00