aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2012-01-262012-01-26 Pedro Alves <palves@redhat.com>Pedro Alves2-9/+21
* corelow.c (core_has_fake_pid): Delete. (core_close): Delete references to `core_has_fake_pid'. (add_to_thread_list): Adjust to mark the inferior's pid as fake. (core_open): Delete references to `core_has_fake_pid'. (core_pid_to_str): Adjust to check inferior->fake_pid_p instead of the removed global.
2012-01-262012-01-26 Pedro Alves <palves@redhat.com>Pedro Alves2-134/+77
* gdb.base/watchpoint.exp: Replace send_gdb/gdb_expect by gdb_test and gdb_test_multiple.
2012-01-262012-01-26 Pedro Alves <palves@redhat.com>Pedro Alves2-9/+20
Make test messages unique, and more identifiable. * gdb.multi/watchpoint-multi.exp: Change test messages.
2012-01-26Remove language param from name_matcher in struct quick_symbol_functionsJoel Brobecker8-20/+27
The quick_symbol_functions struct contains a field which is pointer a function which takes another function, called name_matcher, as its parameter. This name_matcher currently has 3 arguments, one of them being the language. This parameter is no longer used, and thus deleted. gdb/ChangeLog: * symfile.h (struct quick_symbol_functions) [expand_symtabs_matching]: Remove language parameter from name_matcher. Adjust the comment. * symtab.c (search_symbols_name_matches, expand_partial_symbol_name): Remove language parameter. * ada-lang.c (ada_expand_partial_symbol_name): Likewise. * linespec.c (iterate_name_matcher): Likewise. * dwarf2read.c (dw2_expand_symtabs_matching): Adjust type of name_matcher. Adjust call accordingly. * psymtab.c (expand_symtabs_matching_via_partial): Likewise. (maintenance_check_symtabs): Adjust type of parameter "fun". * psymtab.h (maintenance_check_symtabs): Likewise.
2012-01-26Ada: allow unqualified function names in linespecsJoel Brobecker14-35/+86
This is the meat, where we replace the old la_symbol_name_compare language method with the new ada_get_symbol_name_match_p. It fixes the problem when trying to insert a breakpoint on "+". gdb/ChangeLog: * language.h (symbol_name_match_p_ftype): New typedef. (struct language_defn): Replace field la_symbol_name_compare by la_get_symbol_name_match_p. * ada-lang.c (ada_get_symbol_name_match_p): New function. (ada_language_defn): Use it. * linespec.c (struct symbol_matcher_data): New type. (iterate_name_matcher): Rewrite. (iterate_over_all_matching_symtabs): Pass a pointer to a symbol_matcher_data struct to expand_symtabs_matching instead of just the lookup name. * c-lang.c, d-lang.c, jv-lang.c, m2-lang.c, objc-lang.c, opencl-lang.c, p-lang.c, language.c: Delete field la_symbol_name_compare, and replace by NULL for new field la_get_symbol_name_match_p. * symfile.h (struct quick_symbol_functions): Update comment.
2012-01-26*** empty log message ***gdbadmin1-1/+1
2012-01-25gdb/gdbserver/Jan Kratochvil2-44/+34
* linux-low.c (linux_wait_for_event_1): Rename to ... (linux_wait_for_event): ... here and merge it with former linux_wait_for_event - new variable wait_ptid, use it. (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2012-01-25 * gdb.base/solib-disc.exp: Fix regexps.Tom Tromey2-2/+6
2012-01-25 * breakpoint.c (bpstat_stop_status): Check 'breakpoint_at' beforeTom Tromey2-1/+6
dereferencing.
2012-01-25*** empty log message ***gdbadmin1-1/+1
2012-01-24 PR symtab/12406:Tom Tromey16-61/+714
* solib.c (update_solib_list): Update the program space's added_solibs and deleted_solibs fields. * progspace.h (struct program_space) <added_solibs, deleted_solibs>: New fields. (clear_program_space_solib_cache): Declare. * progspace.c (release_program_space): Call clear_program_space_solib_cache. (clear_program_space_solib_cache): New function. * infrun.c (handle_inferior_event) <TARGET_WAITKIND_LOADED>: Call bpstat_stop_status. Use handle_solib_event. * breakpoint.c: Include gdb_regex.h. (print_solib_event): New function. (bpstat_print): Use print_solib_event. (bpstat_stop_status): Add special case for bp_shlib_event. (handle_solib_event): New function. (bpstat_what): Use handle_solib_event. (struct solib_catchpoint): New. (dtor_catch_solib, insert_catch_solib, remove_catch_solib) (breakpoint_hit_catch_solib, check_status_catch_solib) (print_it_catch_solib, print_one_catch_solib) (print_mention_catch_solib, print_recreate_catch_solib): New functions. (catch_solib_breakpoint_ops): New global. (catch_load_or_unload, catch_load_command_1) (catch_unload_command_1): New functions. (internal_bkpt_check_status): Add special case for bp_shlib_event. (internal_bkpt_print_it): Use print_solib_event. (initialize_breakpoint_ops): Initialize catch_solib_breakpoint_ops. (_initialize_breakpoint): Register "catch load" and "catch unload". * breakpoint.h (handle_solib_event): Declare. * NEWS: Add entry for "catch load" and "catch unload". gdb/doc * gdb.texinfo (Set Catchpoints): Document "catch load" and "catch unload". (Files): Mention new catch commands. (GDB/MI Async Records): Likewise. gdb/testsuite * lib/mi-support.exp (mi_expect_stop): Add special case for solib-event. * gdb.base/catch-load-so.c: New file. * gdb.base/catch-load.exp: New file. * gdb.base/catch-load.c: New file. * gdb.base/break-interp.exp (reach_1): Update regexp.
2012-01-24 * ada-lang.c: Include gdb_vecs.h.Tom Tromey5-6/+38
* charset.c: Include gdb_vecs.h. * tracepoint.h: Include gdb_vecs.h. * gdb_vecs.h: New file.
2012-01-242012-01-24 Pedro Alves <pedro@codesourcery.com>Tom Tromey3-84/+31
* breakpoint.c (breakpoint_hit_catch_fork) (breakpoint_hit_catch_vfork, breakpoint_hit_catch_syscall) (breakpoint_hit_catch_exec): Make use of the `ws' argument. * infrun.c (inferior_has_forked, inferior_has_vforked) (inferior_has_execd, inferior_has_called_syscall): Delete. (handle_syscall_event): Get syscall_number from the execution control state's wait status. (wait_for_inferior): Don't clear syscall_number.
2012-01-242012-01-24 Pedro Alves <palves@redhat.com>Tom Tromey4-27/+78
* breakpoint.c (bpstat_check_location, bpstat_stop_status, pc_at_non_inline_function): Add `ws' parameter, and pass it down. (breakpoint_hit_catch_fork, breakpoint_hit_catch_vfork) (breakpoint_hit_catch_syscall, breakpoint_hit_catch_exec): Add `ws' parameter. (breakpoint_hit_ranged_breakpoint): Add `ws' parameter. Return false for events other than TARGET_SIGNAL_TRAP. (breakpoint_hit_watchpoint, base_breakpoint_breakpoint_hit): Add `ws' parameter. (bkpt_breakpoint_hit): Add `ws' parameter. Return false for events other than TARGET_SIGNAL_TRAP. (tracepoint_breakpoint_hit): Add `ws' parameter. * breakpoint.h (struct breakpoint_ops) <breakpoint_hit>: Add `ws' parameter. (bpstat_stop_status): Same. (pc_at_non_inline_function): Same. * infrun.c (handle_syscall_event, handle_inferior_event): Adjust to pass the current event's waitstatus to bpstat_stop_status and pc_at_non_inline_function.
2012-01-24gdb/Jan Kratochvil3-8/+12
Code cleanup. * cli/cli-cmds.c (source_script_from_stream): Never fclose STREAM. Update the function comment for it. (source_script_with_search): Call make_cleanup_fclose for STREAM. * cli/cli-script.c (script_from_file): Do not call make_cleanup_fclose for STREAM.
2012-01-24gdb/testsuite/Jan Kratochvil2-3/+9
Fix fuzzy results. * gdb.mi/var-cmd.c (do_locals_tests): Initialize variables lsimple, lpsimple and func.
2012-01-242012-01-24 Pedro Alves <palves@redhat.com>Pedro Alves2-17/+29
* breakpoint.c (bpstat_stop_status): Moving clearing print_it outside `bs->stop' block. (bpstat_what): Rework bp_shlib_event handling. (internal_bkpt_check_status): If the breakpoint is a bp_shlib_event, then set bs->stop and bs->print if stop_on_solib_events is set.
2012-01-24ChangeLog:Gary Benson9-102/+23
Delete #if 0'd out code. * stack.c (print_frame_label_vars): Remove. (catch_info): Likewise. (_initialize_stack): Remove "info catch" command. * NEWS: Mention the above. doc/ChangeLog: Delete #if 0'd out code. * gdb.texinfo (Frame Info): Remove "info catch". testsuite/ChangeLog: Delete #if 0'd out code. * gdb.base/default.exp (info catch): Remove. * gdb.base/gdb_history (info catch): Likewise. * gdb.base/help.exp (info catch): Likewise.
2012-01-242012-01-24 Pedro Alves <palves@redhat.com>Pedro Alves2-52/+71
* remote.c (remote_add_inferior): New `fake_pid_p' parameter. Use it. (remote_notice_new_inferior): If the remote end doesn't support the multiprocess extensions, then the PID is fake. (add_current_inferior_and_thread): New. (remote_start_remote): Use it. (extended_remote_attach_1): Adjust. (extended_remote_create_inferior_1): Use add_current_inferior_and_thread.
2012-01-24gdb/Jan Kratochvil6-6/+186
Fix watchpoints to be specific for each inferior. * breakpoint.c (watchpoint_in_thread_scope): Verify also current_program_space. * i386-nat.c (i386_inferior_data_cleanup): New. (i386_inferior_data_get): Replace variable inf_data_local by an inferior_data call. (i386_use_watchpoints): Initialize i386_inferior_data. * linux-nat.c (linux_nat_iterate_watchpoint_lwps): Use INFERIOR_PTID specific iterate_over_lwps. gdb/testsuite/ Fix watchpoints to be specific for each inferior. * gdb.multi/watchpoint-multi.c: New file. * gdb.multi/watchpoint-multi.exp: New file.
2012-01-24gdb/Jan Kratochvil13-68/+896
Fix watchpoints across inferior fork. * amd64-linux-nat.c (update_debug_registers_callback): Update the comment for linux_nat_iterate_watchpoint_lwps. (amd64_linux_dr_set_control, amd64_linux_dr_set_addr): Use linux_nat_iterate_watchpoint_lwps. (amd64_linux_prepare_to_resume): New comment on Linux kernel. * i386-linux-nat.c (update_debug_registers_callback): Update the comment for linux_nat_iterate_watchpoint_lwps. (i386_linux_dr_set_control, i386_linux_dr_set_addr): Use linux_nat_iterate_watchpoint_lwps. (i386_linux_prepare_to_resume): New comment on Linux kernel. * i386-nat.c: Include inferior.h. (dr_mirror): Remove. (i386_inferior_data, struct i386_inferior_data) (i386_inferior_data_get): New. (i386_debug_reg_state): Use i386_inferior_data_get. (i386_cleanup_dregs, i386_update_inferior_debug_regs) (i386_insert_watchpoint, i386_remove_watchpoint) (i386_stopped_data_address, i386_insert_hw_breakpoint) (i386_remove_hw_breakpoint): New variable state, use i386_debug_reg_state instead of DR_MIRROR. * linux-nat.c (delete_lwp): New declaration. (num_lwps): Move here from downwards. (delete_lwp_cleanup): New. (linux_child_follow_fork): Create new child_lp, call linux_nat_new_thread and linux_nat_prepare_to_resume before calling PTRACE_DETACH. (num_lwps): Move upwards. (linux_nat_iterate_watchpoint_lwps): New. * linux-nat.h (linux_nat_iterate_watchpoint_lwps_ftype): New. (linux_nat_iterate_watchpoint_lwps_ftype): New declaration. gdb/testsuite/ Fix watchpoints across inferior fork. * gdb.threads/watchpoint-fork-child.c: New file. * gdb.threads/watchpoint-fork-mt.c: New file. * gdb.threads/watchpoint-fork-parent.c: New file. * gdb.threads/watchpoint-fork-st.c: New file. * gdb.threads/watchpoint-fork.exp: New file. * gdb.threads/watchpoint-fork.h: New file.
2012-01-24GDB 7.4 released.gdbadmin1-0/+4
2012-01-24*** empty log message ***gdbadmin1-1/+1
2012-01-232012-01-23 Pedro Alves <palves@redhat.com>Pedro Alves4-10/+22
* top.c (caution): Rename to ... (confirm): ... this. (show_caution): Rename to ... (show_confirm): ... this. (quit_cover): Adjust. (init_main): Adjust. * top.h (caution): Rename to ... (confirm): ... this. * utils.c (internal_vproblem, defaulted_query): Adjust.
2012-01-23gdb/Pedro Alves4-7/+18
2012-01-23 Pedro Alves <palves@redhat.com> * top.c (caution): Update comment. (execute_command): Don't consider the current value of `caution'. gdb/testsuite/ 2012-01-23 Pedro Alves <palves@redhat.com> * gdb.base/call-signal-resume.exp: Allow output after "return".
2012-01-232012-01-23 Pedro Alves <palves@redhat.com>Pedro Alves2-9/+23
* server.c (main): Avoid yet another case of infinite loop while detaching/killing after a longjmp.
2012-01-23gdb/Jan Kratochvil2-0/+15
* cli/cli-cmds.c (find_and_open_script): Handle failure of fdopen.
2012-01-23 * inf-child.c: Include "gdb_stat.h" instead of <sys/stat.h>.Ulrich Weigand4-9/+21
* linux-tdep.c (linux_info_proc): Avoid ARI coding style warning. * target.c (target_fileio_pwrite): Remove buffer address from debug output. (target_fileio_pread): Likewise.
2012-01-23*** empty log message ***gdbadmin1-1/+1
2012-01-22*** empty log message ***gdbadmin1-1/+1
2012-01-21*** empty log message ***gdbadmin1-1/+1
2012-01-20gdb/gdbserver/Jan Kratochvil2-2/+6
Code cleanup. * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2012-01-202012-01-20 Pedro Alves <palves@redhat.com>Pedro Alves2-1/+5
* gdb.python/py-finish-breakpoint.py: Fix typo.
2012-01-20 * NEWS: Document remote "info proc" and "generate-core-file".Ulrich Weigand2-0/+7
2012-01-20 * gdbarch.sh (find_memory_regions): New callback.Ulrich Weigand7-87/+114
* gdbarch.c, gdbarch.h: Regenerate. * gcore.c (gcore_memory_sections): Try gdbarch find_memory_regions callback before falling back to target method. * linux-nat.c (read_mapping, linux_nat_find_memory_regions): Remove. (linux_target_install_ops): No longer install it. * linux-tdep.c (linux_find_memory_regions): New function. (linux_init_abi): Install it.
2012-01-20 * gdbarch.sh (make_corefile_notes): New architecture callback.Ulrich Weigand8-315/+422
* gdbarch.c: Regenerate. * gdbarch.h: Likewise. * gcore.c (write_gcore_file): Try gdbarch_make_corefile_notes before target_make_corefile_notes. If NULL is returned, the target does not support core file generation. * linux-nat.c: Include "linux-tdep.h". (find_signalled_thread, find_stop_signal): Remove. (linux_nat_do_thread_registers): Likewise. (struct linux_nat_corefile_thread_data): Likewise. (linux_nat_corefile_thread_callback): Likewise. (iterate_over_spus): Likewise. (struct linux_spu_corefile_data): Likewise. (linux_spu_corefile_callback): Likewise. (linux_spu_make_corefile_notes): Likewise. (linux_nat_collect_thread_registers): New function. (linux_nat_make_corefile_notes): Replace contents by call to linux_make_corefile_notes passing linux_nat_collect_thread_registers as native-only callback. * linux-tdep.h: Include "bfd.h". (struct regcache): Add forward declaration. (linux_collect_thread_registers_ftype): New typedef. (linux_make_corefile_notes): Add prototype. * linux-tdep.c: Include "gdbthread.h", "gdbcore.h", "regcache.h", "regset.h", and "elf-bfd.h". (find_signalled_thread, find_stop_signal): New functions. (linux_spu_make_corefile_notes): Likewise. (linux_collect_thread_registers): Likewise. (struct linux_corefile_thread_data): New data structure. (linux_corefile_thread_callback): New funcion. (linux_make_corefile_notes): Likewise. (linux_make_corefile_notes_1): Likewise. (linux_init_abi): Install it.
2012-01-20 * gdbarch.sh (info_proc): New callback.Ulrich Weigand7-248/+397
* gdbarch.c, gdbarch.h: Regenerate. * infcmd.c (info_proc_cmd_1): Try gdbarch info_proc callback before falling back to the target info_proc callback. * linux-nat.c: Do not include "cli/cli-utils.h". (linux_nat_info_proc): Remove. (linux_target_install_ops): No longer install it. * linux-tdep.c: Include "cli/cli-utils.h" and <ctype.h>. (read_mapping): New function. (linux_info_proc): Likewise. (linux_init_abi): Install it.
2012-01-20ChangeLog:Ulrich Weigand9-159/+260
* 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-20ChangeLog:Ulrich Weigand12-2/+195
* 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-202012-01-20 Pedro Alves <palves@redhat.com>Ulrich Weigand8-9/+616
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-202012-01-20 Pedro Alves <palves@redhat.com>Ulrich Weigand4-9/+29
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-202012-01-20 Pedro Alves <palves@redhat.com>Ulrich Weigand4-10/+43
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*** empty log message ***gdbadmin1-1/+1
2012-01-19 * NEWS: Combine the two Python sections.Tom Tromey2-5/+7
2012-01-19gdb/Jan Kratochvil2-4/+8
* target.h (target_close): Update comment on the target's unpush state.
2012-01-192012-01-19 Pedro Alves <palves@redhat.com>Pedro Alves3-11/+18
* 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-192012-01-19 Gary Benson <gbenson@redhat.com>Gary Benson2-2/+7
* mdebugread.c (sort_blocks): Replace integer constants with ones derived from FIRST_LOCAL_BLOCK.
2012-01-19gdb/testsuite/Jan Kratochvil2-1/+4
* .gdbinit: Remove.
2012-01-192012-01-19 Pedro Alves <palves@redhat.com>Pedro Alves3-9/+19
* 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*** empty log message ***gdbadmin1-1/+1