summaryrefslogtreecommitdiff
path: root/gdb
Commit message (Collapse)AuthorAgeFilesLines
* gdb/qiyao2013-08-094-1/+31
| | | | | | | | | | | * stack.c (read_frame_arg): Set 'entryval_error' to NULL if 'entryval' is set. gdb/testsuite/ * gdb.trace/collection.exp (gdb_collect_args_test): Set "only" and "both" to 'print entry-values' before selecting trace frame.
* gcore: expand tilde in filename.Pedro Alves2013-08-082-1/+11
| | | | | | | | | | | | | | | | | Before this patch, this fails: (gdb) generate-core-file ~/core Failed to open '~/core' for output. After the patch: (gdb) generate-core-file ~/core Saved corefile ~/core gdb/ 2013-08-08 Azat Khuzhin <a3at.mail@gmail.com> (tiny change) * gcore.c (create_gcore_bfd): Use tilde_expand.
* gdb/qiyao2013-08-086-4/+59
| | | | | | | | | | | | | | | | * frame.h (read_frame_local): Declare. * mi/mi-cmd-stack.c (list_args_or_locals): Call read_frame_local. * stack.c (read_frame_local): New. gdb/testsuite/ * gdb.trace/mi-trace-unavailable.exp: Don't set "print entry-values" to "no". (test_trace_unavailable): Set various values to "print entry-values" to test that the output of '-stack-list-locals' is not affected, and then set set "print entry-values" to "no".
* gdb/qiyao2013-08-082-4/+8
| | | | | * mi/mi-cmd-stack.c: Update comments to function list_args_or_locals.
* * gdb.python/py-value-cc.cc: Renamed from py-value.cc.Doug Evans2013-08-074-6/+34
| | | | | | * gdb.python/py-value-cc.exp: Update. * gdb.python/py-value.exp: Use different names for .o files for C and C++. Only perform C++ tests if !skip_cplus_tests.
* fix PR symtab/15028Tom Tromey2013-08-072-9/+38
| | | | | | | | | | | | | | | | | | | | | | | This fixes some derivation.exp regressions with "dwz -m". The bug here is that the imported PU is given language_minimal. However, it ought to be C++. The "pretend language" machinery exists to solve this problem, but it wasn't handled in process_psymtab_comp_unit. So, this patch adds it there. Built and regtested, both normally and using "dwz -m", on x86-64 Fedora 18. PR symtab/15028: * dwarf2read.c (struct process_psymtab_comp_unit_data): New. (process_psymtab_comp_unit_reader): Use it. (process_psymtab_comp_unit): Update. Add "pretend_language" argument. (dwarf2_build_psymtabs_hard): Update. (scan_partial_symbols): Pass CU's language to process_psymtab_comp_unit.
* remove unused qf methodTom Tromey2013-08-074-97/+9
| | | | | | | | | | | | | | | | After the previous patch in the series, nothing uses the "quick" method find_symbol_file. This patch removes it. Tested by rebuilding. * dwarf2read.c (dw2_get_primary_filename_reader): Remove. (dwarf2_gdb_index_functions): Update. * psymtab.c (find_symbol_file_from_partial): Remove. (psym_functions): Update. * symfile.h (struct quick_symbol_functions) <find_symbol_file>: Remove.
* use language of the main symbolTom Tromey2013-08-076-32/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With "dwz -m", "main" appears in both the PU and the importing CU when running anon-struct.exp. However, the PU does not have a file name. So, find_main_filename returns the empty string, making deduce_language_from_filename return language_unknown. This patch fixes this problem by changing gdb to use the ordinary symbol-lookup functions to find "main"'s symbol. Then, it examines the symbol's language. I think this is cleaner than the current approach. For one thing it avoids trying to guess the language based on the source file name, instead deferring to the presumably more reliable debuginfo. Another possible fix would have been to change how the file name is found via the "qf" methods. However, I think the approach given is preferable for the reason outlined above. This required a minor test suite change, as now a symtab is expanded during the search for "main". Built and regtested (both ways) on x86-64 Fedora 18. * symfile.c (set_initial_language): Look up "main" symbol and use its language. * symtab.c (find_main_filename): Remove. * symtab.h (find_main_filename): Remove. * gdb.base/maint.exp: Allow zero symtabs to be expanded.
* fix recursively_compute_inclusions and add dwz test caseTom Tromey2013-08-074-4/+129
| | | | | | | | | | | | | | | | | | | Doug pointed out a while ago that in the final dwz -m patch, nothing ever set symtab::user. This patch fixes this oversight and adds a test case showing why it is important. Built and regtested (both ways) on x86-64 Fedora 18. The new test unconditionally tests the partial unit machinery, which I think is an added plus. * dwarf2read.c (recursively_compute_inclusions): Add "immediate_parent" argument. Set symtab's "user" field if not set. (compute_symtab_includes): Update. * gdb.dwarf2/dwz.exp: New file.
* also filter label symbolsTom Tromey2013-08-072-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug here is that, with dwz -m, a function (and a label) appear in both a PU and a CU when running cplabel.exp. So, a breakpoint gets two locations: (gdb) break foo::bar:to_the_top Breakpoint 2 at 0x400503: foo::bar:to_the_top. (2 locations) What is especially wacky is that both locations are at the same place: (gdb) info b Num Type Disp Enb Address What 1 breakpoint keep y <MULTIPLE> 1.1 y 0x000000000040051c foo::bar:get_out_of_here 1.2 y 0x000000000040051c foo::bar:get_out_of_here This happens due to the weird way we run "dwz -m". It's unclear to me that this would ever happen for real code. While I think this borders on "diminishing returns" territory, the fix is pretty straightforward: use the existing address-filtering function in linespec to also filter when looking at labels. Built and regtested (both ways) on x86-64 Fedora 18. * linespec.c (convert_linespec_to_sals): Use maybe_add_address when adding label symbols.
* 2013-08-07 Raunaq Bathija <raunaq12@in.ibm.com>Ulrich Weigand2013-08-073-2/+10
| | | | | | | Ulrich Weigand <uweigand@de.ibm.com> * configure.tgt (powerpc64-*-aix*): Match powerpc64 running aix. * configure.host (powerpc64-*-aix*): Likewise.
* 2013-08-07 Raunaq Bathija <raunaq12@in.ibm.com>Ulrich Weigand2013-08-076-4/+34
| | | | | | | | | | | | Ulrich Weigand <uweigand@de.ibm.com> * gdb_ptrace.h: Use ptrace64 instead of ptrace if HAVE_PTRACE64 is defined. * rs6000-nat.c: Check for __ld_info64_ if compiling 64 BIT gdb. (rs6000_ptrace32): Call ptrace64 instead of ptrace if present. (rs6000_ptrace64): Call ptace64 instead of ptracex if present. * configure.ac: Check for ptrace64. * configure, config.in: Regenerate.
* 2013-08-07 Raunaq Bathija <raunaq12@in.ibm.com>Ulrich Weigand2013-08-072-20/+49
| | | | | | | | | | | | | Ulrich Weigand <uweigand@de.ibm.com> * aixthread.c: Call ptrace64 instead of ptracex if defined. Call ptrace64 instead of ptrace if defined. Add macro addr_ptr to take care of ptrace address argument. (pdc_read_regs): Likewise. (pdc_write_regs): Likewise. (aix_thread_resume): Likewise. (fetch_regs_kernel_thread): Likewise. (store_regs_kernel_thread): Likewise.
* 2013-08-07 Anton Blanchard <anton@samba.org>anton2013-08-072-0/+5
| | | | * MAINTAINERS: Add myself to Write After Approval.
* more add_target removalsTom Tromey2013-08-057-6/+21
| | | | | | | | | | | | | | | | | | | | | | This removes a few more erroneous calls to add_target. These calls end up installing the target in a user-visible way; but these targets are all auto-activated and, I think, should never be explicitly requested. I have no way to test these. * aix-thread.c (_initialize_aix_thread): Use complete_target_initialization. * bsd-uthread.c (_initialize_bsd_uthread): Use complete_target_initialization. * dec-thread.c (_initialize_dec_thread): Use complete_target_initialization. * ravenscar-thread.c (_initialize_ravenscar): Use complete_target_initialization. * sol-thread.c (_initialize_sol_thread): Use complete_target_initialization. * spu-multiarch.c (_initialize_spu_multiarch): Use complete_target_initialization.
* remove msymbol_objfileTom Tromey2013-08-0520-132/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is another patch in my ongoing series to "split" objfile to share more read-only data across inferiors. See http://sourceware.org/gdb/wiki/ObjfileSplitting When symbols are finally shared, there will be no back-link from the symbol to its containing objfile, because there may be more than one such objfile. So, all such back-links must be removed. One hidden back-link is the msymbol_objfile function. Since (eventually) a symbol may appear in more than one objfile, trying to look up the objfile given just a symbol cannot work. This patch removes msymbol_objfile in favor of using a bound minimal symbol. It introduces a new function to make this conversion simpler in some spots. The bonus of this patch is that using msymbol_objfile is slower than simply looking up the owning objfile in the first place. Built and regtested on x86-64 Fedora 18. * ada-exp.y (write_var_or_type): Use bound_minimal_symbol. * ada-lang.c (ada_lookup_simple_minsym): Return bound_minimal_symbol. * ada-lang.h (ada_lookup_simple_minsym): Update. * c-exp.y (variable): Use lookup_bound_minimal_symbol. * f-exp.y (variable): Use lookup_bound_minimal_symbol. * go-exp.y (variable): Use lookup_bound_minimal_symbol. * jv-exp.y (push_expression_name): Use lookup_bound_minimal_symbol. * m2-exp.y (variable): Use lookup_bound_minimal_symbol. * minsyms.c (msymbol_objfile): Remove. (lookup_minimal_symbol_internal): New function, from lookup_minimal_symbol. (lookup_minimal_symbol): Rewrite using lookup_minimal_symbol_internal. (lookup_bound_minimal_symbol): New function. * minsyms.h (msymbol_objfile): Remove. (lookup_bound_minimal_symbol): Declare. * p-exp.y (variable): Use lookup_bound_minimal_symbol. * parse.c (write_exp_msymbol): Change parameter to a bound_minimal_symbol. (write_dollar_variable): Use lookup_bound_minimal_symbol. * parser-defs.h (write_exp_msymbol): Update. * printcmd.c (address_info): Use lookup_bound_minimal_symbol. * symfile.c (simple_read_overlay_table): Use lookup_bound_minimal_symbol. * symtab.c (skip_prologue_sal): Don't use msymbol_objfile. (search_symbols): Likewise. (print_msymbol_info): Take a bound_minimal_symbol argument. (symtab_symbol_info, rbreak_command): Update. * symtab.h (struct symbol_search) <msymbol>: Change type to bound_minimal_symbol. * valops.c (find_function_in_inferior): Use lookup_bound_minimal_symbol. * value.c (value_fn_field): Use lookup_bound_minimal_symbol.
* doc: gdbserver allows for subsequent and not for multiple simultaneous ↵sagovic2013-08-051-1/+1
| | | | | | | | | | | | connections. doc/ 2013-08-05 Sanimir Agovic <sanimir.agovic@intel.com> * gdb.texinfo (TCP port allocation lifecycle): Gdbserver by default allows for subsequent and not for additional (multiple simultaneous) connections.
* gdb/Jan Kratochvil2013-08-052-32/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code cleanup. * remote.c (cleanup_sigint_signal_handler): Rename the declaration to ... (async_cleanup_sigint_signal_handler): ... this. (initialize_sigint_signal_handler): Remove declaration. (handle_remote_sigint): Rename the declaration to ... (async_handle_remote_sigint): ... this. (handle_remote_sigint_twice): Rename the declaration to ... (async_handle_remote_sigint_twice): ... this. (async_remote_interrupt, async_remote_interrupt_twice) (remote_interrupt): Remove the declarations. (remote_interrupt_twice): Rename the declaration ... (sync_remote_interrupt_twice): ... this. (sigint_remote_twice_token): Rename the variable to ... (async_sigint_remote_twice_token): ... this. (sigint_remote_token): Rename the variable to ... (async_sigint_remote_token): ... this. (initialize_sigint_signal_handler): Rename the function to ... (async_initialize_sigint_signal_handler): ... this. Update the name inside. (handle_remote_sigint): Rename the function to ... (async_handle_remote_sigint): ... this. Update the names inside. (handle_remote_sigint_twice): Rename the function to ... (async_handle_remote_sigint_twice): ... this. Update the names inside. (cleanup_sigint_signal_handler): Rename the function to ... (async_cleanup_sigint_signal_handler): ... this. (remote_interrupt): Rename the function to ... (sync_remote_interrupt): this. Update the names inside. (remote_interrupt_twice): Rename the function to ... (sync_remote_interrupt_twice): this. Update the names inside. (remote_terminal_inferior, remote_terminal_ours, remote_wait_as) (_initialize_remote): Update the names inside.
* fix PR symtab/15719Tom Tromey2013-08-028-13/+44
| | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes PR symtab/15719. The bug is that "watch -location" crashes on a certain expression. The problem is that fetch_subexp_value is catching an exception. For ordinary watchpoints this is ok; but for location watchpoints, it is better for the exception to propagate. Built and regtested on x86-64 Fedora 18. New test case included. PR symtab/15719: * breakpoint.c (update_watchpoint, watchpoint_check) (watch_command_1): Update. * eval.c (fetch_subexp_value): Add "preserve_errors" parameter. * ppc-linux-nat.c (check_condition): Update. * value.h (fetch_subexp_value): Update. * gdb.base/watchpoint.c (struct foo5): New. (nullptr): New global. * gdb.base/watchpoint.exp (test_watch_location): Add test.
* Remove duplicate call to add_file_handler.aburgess2013-08-022-1/+5
| | | | | | | | | | | | http://sourceware.org/ml/gdb-patches/2013-08/msg00067.html This call to add_file_handler is a duplicate of one that is in gdb_setup_readline that is always executed. gdb/ChangeLog * mi/mi-interp.c (mi_interpreter_resume): Remove call to add_file_handler.
* PR symtab/15691Doug Evans2013-08-027-14/+176
| | | | | | | | | | | | | | | * dwarf2read.c (struct dwarf2_per_cu_data): New member tu_read. (fill_in_sig_entry_from_dwo_entry): Reorganize asserts. Add assert of sig_entry->dwo_unit == NULL. (lookup_dwo_signatured_type): Don't assign TU to a DWO if the TU had already been read. (read_signatured_type): Set per_cu.tu_read. testsuite/ * gdb.dwarf2/fission-mix.exp: New file. * gdb.dwarf2/fission-mix.h: New file. * gdb.dwarf2/fission-mix.c: New file. * gdb.dwarf2/fission-mix2.c: New file.
* PR symtab/15695Doug Evans2013-08-015-2/+72
| | | | | | | | | * valops.c (value_struct_elt): Add missing call to check_typedef. (value_find_oload_method_list): Ditto. testsuite/ * gdb.base/func-ptr.exp: New file. * gdb.base/func-ptr.c: New file.
* * symtab.c (do_free_search_symbols_cleanup): Change arg to,Doug Evans2013-08-013-61/+100
| | | | | | | | | | | | | | effectively, struct symbol_search **. (make_cleanup_free_search_symbols): Change arg to struct symbol_search **. All callers updated. (compare_search_syms): Compare symtab file name and block as well. (search_symbols_equal): New function. (sort_search_symbols_remove_dups): Renamed from sort_search_symbols. New args new_head, new_tail. Result is now void. Remove dups after sorting the symbols. (search_symbols): Sort all found symbols once, after all have been found, and remove duplicates. Simplify cleanup tracking of result. * symtab.h (make_cleanup_free_search_symbols): Update prototype.
* Further workarounds for binutils/15021.Doug Evans2013-08-014-49/+88
| | | | | | | | | | | | | * dwarf2read.c (recursively_compute_inclusions): Change type of result parameter to VEC (symtab_ptr) **. New parameter all_type_symtabs. Watch for duplicate symtabs coming from type units. (compute_symtab_includes): Update call to recursively_compute_inclusions. Build vector of included symtabs instead of per_cus. * symtab.h (symtab_ptr): New typedef. (DEF_VEC_P (symtab_ptr)): New VEC type. * linespec.c (symtab_p): Delete. All uses updated to use symtab_ptr instead.
* Remove error_pre_print and quit_pre_print.aburgess2013-08-015-23/+9
| | | | | | | | | | | | | http://sourceware.org/ml/gdb-patches/2013-07/msg00844.html gdb/ChangeLog * cli/cli-script.c (script_from_file): Remove use of error_pre_print. * main.c (captured_main): Remove use of error_pre_print and quit_pre_print. * utils.c (error_pre_print, quit_pre_print): Remove. * utils.h (error_pre_print, quit_pre_print): Likewise.
* gdb/qiyao2013-08-012-10/+75
| | | | | | * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Parse argv with mi_getopt. (mi_cmd_stack_list_variables): Likewise.
* gdb/testsuite/qiyao2013-08-013-0/+110
| | | | | * gdb.python/py-sync-interp.c: New. * gdb.python/py-sync-interp.exp: New.
* Remove deprecated_throw_reason.aburgess2013-07-313-27/+5
| | | | | | | | | http://sourceware.org/ml/gdb-patches/2013-07/msg00779.html gdb/ChangeLog * exceptions.c (deprecated_throw_reason): Remove. * exceptions.h (deprecated_throw_reason): Remove.
* Remove deprecated_throw_reason from mips_error.aburgess2013-07-312-9/+14
| | | | | | | | | | http://sourceware.org/ml/gdb-patches/2013-07/msg00777.html gdb/ChangeLog * remote-mips.c (mips_error): Replace use of deprecated_throw_reason with throw_verror. Use the error message passed to mips_error as the error message for throw_verror.
* Replace most uses of deprecated_throw_reason with quit.aburgess2013-07-316-7/+15
| | | | | | | | | | | | | http://sourceware.org/ml/gdb-patches/2013-07/msg00778.html gdb/ChangeLog * monitor.c (monitor_interrupt_query): Replace use of deprecated_throw_reason with quit. * nto-procfs.c (interrupt_query): Likewise. * remote-fileio.c (remote_fileio_sig_exit): Likewise. * remote-mips.c (mips_kill): Likewise. * remote.c (interrupt_query): Likewise.
* Remove deprecated_throw_reason from internal_verror.aburgess2013-07-312-1/+6
| | | | | | | | | http://sourceware.org/ml/gdb-patches/2013-07/msg00776.html gdb/ChangeLog * utils.c (internal_verror): Replace use of deprecated_throw_reason with call to fatal.
* gdb/qiyao2013-07-314-0/+47
| | | | | | | | | * tracepoint.c (trace_dump_command): Select the current frame. gdb/testsuite/ * gdb.trace/backtrace.exp (gdb_backtrace_tdp_4): Test command 'tdump' on stack frame 0 and 1 respectively.
* gdb/testsuite/qiyao2013-07-312-20/+29
| | | | | | | PR gdb/13443 * gdb.trace/backtrace.exp (gdb_backtrace_tdp_3): Add parameter 'traceframe'. Wrap test with with_test_prefix. (top level): Update.
* gdb/testsuite/qiyao2013-07-312-13/+19
| | | | | | | * gdb.trace/backtrace.exp: Don't invoke 'get_exit' and 'gdb_start'. Invoke 'prepare_for_testing' instead of 'gdb_compile'. Use gdb_test_no_output to issue commands 'tstart' and 'tstop'.
* * dwarf2read.c (process_queue): Add type signature to debug output.Doug Evans2013-07-312-11/+17
|
* Don't raise an error for optimized out sub-fields.aburgess2013-07-304-5/+16
| | | | | | | | | | | | | | | http://sourceware.org/ml/gdb-patches/2013-07/msg00317.html gdb/ChangeLog * value.c (value_fetch_lazy): Mark optimized out values as such rather than raising an error. gdb/testsuite/ChangeLog * gdb.dwarf2/pieces-optimized-out.exp: Expect "<optimized out>" when printing an optimized out value. Expect an error when using an optimized out value in an expression.
* value_fetch_lazy, ensure parent is not lazy and check parent for validity.aburgess2013-07-306-1/+660
| | | | | | | | | | | | | | | | http://sourceware.org/ml/gdb-patches/2013-07/msg00316.html gdb/ChangeLog * value.c (value_fetch_lazy): Ensure parent value is not lazy before checking which bits of the parent, not the child, value are valid. gdb/testsuite/ChangeLog * gdb.dwarf2/pieces-optimized-out.exp: New file. * gdb.dwarf2/pieces-optimized-out.c: New file. * gdb.dwarf2/pieces-optimized-out.S: New file.
* 2013-07-30 Muhammad Bilal <mbilal@codesorcery.com>mbilal2013-07-304-3/+56
| | | | | | | | | | | | | PR gdb/15715 * top.c: Include "filenames.h". (set_history_filename): New function. (init_main): Install it as set hook of the "set history filename" command. 2013-07-30 Muhammad Bilal <mbilal@codesourcery.com> PR gdb/15715 * gdb.base/setshow.exp: Test that relative paths passed to 'set history filename' are converted to absolute paths.
* cleanup: constify "struct attribute" function parametersagovic2013-07-302-25/+43
| | | | | | | | | | | | | | | | | | | | | | gdb/ 2013-07-30 Sanimir Agovic <sanimir.agovic@intel.com> * dwarf2read.c (dwarf2_get_ref_die_offset): Constify struct attribute parameter. (dwarf2_const_value_data): Constify struct attribute parameter. (dwarf2_const_value): Constify struct attribute parameter. (dwarf2_const_value_attr): Constify struct attribute parameter. (lookup_die_type): Constify struct attribute parameter. (dwarf2_get_attr_constant_value): Constify struct attribute parameter. (follow_die_ref_or_sig): Constify struct attribute parameter. (follow_die_ref): Constify struct attribute parameter. (follow_die_sig): Constify struct attribute parameter. (get_DW_AT_signature_type): Constify struct attribute parameter. (get_type_unit_group): Constify struct attribute parameter. (fill_in_loclist_baton): Constify struct attribute parameter. (dwarf2_symbol_mark_computed): Constify struct attribute parameter. (type_unit_group): Constify struct attribute parameter.
* cleanup: constify argument passed to dwarf form predicatessagovic2013-07-302-8/+15
| | | | | | | | | | 2013-07-30 Sanimir Agovic <sanimir.agovic@intel.com> gdb/ * dwarf2read.c (attr_form_is_block): Make argument const. (attr_form_is_section_offset): Make argument const. (attr_form_is_constant): Make argument const. (attr_form_is_ref): Make argument const.
* cleanup: rename is_ref_attr to attr_form_is_refsagovic2013-07-302-32/+39
| | | | | | | | | 2013-07-30 Sanimir Agovic <sanimir.agovic@intel.com> gdb/ * dwarf2read.c (attr_is_ref): Rename to attr_form_is_ref. All uses updated. (attr_form_is_ref): Moved below attr_form_is_constant.
* * main.c (captured_command_loop): Tweak comment.Doug Evans2013-07-292-1/+3
|
* * target.c (target_async_permitted_1): Fix comment.Doug Evans2013-07-292-1/+3
|
* * symtab.c (iterate_over_some_symtabs): Add comment.Doug Evans2013-07-292-1/+5
|
* * symtab.c (iterate_over_some_symtabs): Fix indentation.Doug Evans2013-07-292-25/+29
|
* gdb/gdbserver/qiyao2013-07-276-1/+402
| | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (SFILES): Add common/mips-linux-watch.c. (mips-linux-watch.o): New rule. (mips_linux_watch_h): New variable. * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to srv_tgtobj. * linux-mips-low.c: Include mips-linux-watch.h. (struct arch_process_info, struct arch_lwp_info): New. (update_watch_registers_callback): New function. (mips_linux_new_process, mips_linux_new_thread) New functions. (mips_linux_prepare_to_resume, mips_insert_point): New functions. (mips_remove_point, mips_stopped_by_watchpoint): New functions. (rsp_bp_type_to_target_hw_bp_type): New function. (mips_stopped_data_address): New function. (the_low_target): Add watchpoint support functions. gdb/ * NEWS: Mention that GDBserver now supports hardware watchpoints on the MIPS GNU/Linux target.
* gdb/qiyao2013-07-276-408/+513
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (HFILES_NO_SRCDIR): Add common/mips-linux-watch.h. (mips-linux-watch.o): New rule. * common/mips-linux-watch.c: New. * common/mips-linux-watch.h: New. * config/mips/linux.mh (NATDEPFILES): Add mips-linux-watch.o * mips-linux-nat.c: Include mips-linux-watch.h. (W_BIT, R_BIT, I_BIT, W_MASK, R_MASK, I_MASK, IRW_MASK): Move to common/mips-linux-watch.h. (MAX_DEBUG_REGISTER): Likewise. (enum pt_watch_style): Likewise. (struct mips32_watch_regs): Likewise. (struct mips64_watch_regs): Likewise. (struct pt_watch_regs): Likewise. (struct mips_watchpoint): Likewise. (mips_linux_watch_get_irw_mask): Move to common/mips-linux-watch.c. (get_reg_mask, mips_linux_watch_get_num_valid): Likewise. (mips_linux_watch_get_watchlo): Likewise. (mips_linux_watch_set_watchlo): Likewise. (mips_linux_watch_get_watchhi): Likewise. (mips_linux_watch_set_watchhi): Likewise. (mips_linux_read_watch_registers): Likewise. (mips_linux_watch_type_to_irw): Likewise. (mips_linux_stopped_data_address, fill_mask): Likewise. (mips_linux_watch_try_one_watch): Likewise. (mips_linux_watch_populate_regs): Likewise.
* gdb/qiyao2013-07-272-87/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mips-linux-nat.c (get_irw_mask): Rename to ... (mips_linux_watch_get_irw_mask): ... this. Rename parameter 'set' to 'n'. Update function comment. All callers changed. (get_reg_mask): Rename parameter 'set' to 'n'. Update function comment. All callers changed. (get_num_valid): Rename to ... (mips_linux_watch_get_num_valid): ... this. Rename parameter 'set' to 'n'. Update function comment. All callers changed. (get_watchlo): Rename to ... (mips_linux_watch_get_watchlo): ... this. Rename parameter 'set' to 'n'. Update function comment. All callers changed. (set_watchlo): Rename to ... (mips_linux_watch_set_watchlo): ... this. Rename parameter 'set' to 'n'. Update function comment. All callers changed. (get_watchhi): Rename to ... (mips_linux_watch_get_watchhi): ... this. Update function comment. All callers changed. (set_watchhi): Rename to ... (mips_linux_watch_set_watchhi): ... this. Update function comment. All callers changed. (mips_linux_read_watch_registers): Update function comment. Add new parameters 'lwpid', 'watch_readback', and 'watch_readback_valid'. Update. (type_to_irw): Rename to ... (mips_linux_watch_type_to_irw): ... this. Update function comment. All callers changed. (fill_mask): Update function comment. (try_one_watch): Rename to ... (mips_linux_watch_try_one_watch): ... this. Change the type of parameter 'irw' from 'unsigned' to 'uint32_t'. (populate_regs_from_watches): Rename to ... (mips_linux_watch_populate_regs): ... this. Add parameter 'current_watches'. All callers changed.
* gdb/qiyao2013-07-272-16/+31
| | | | | | | | | | | | | * mips-linux-nat.c (MAX_DEBUG_REGISTER): Move it earlier in the code. (PTRACE_SET_WATCH_REGS, enum pt_watch_style): Remove. (struct mips32_watch_regs, struct mips64_watch_regs): Remove. (struct pt_watch_regs): Likewise. [!PTRACE_GET_WATCH_REGS] (PTRACE_SET_WATCH_REGS): New macro. [!PTRACE_GET_WATCH_REGS] (enum pt_watch_style): New. [!PTRACE_GET_WATCH_REGS] (struct mips32_watch_regs): New. [!PTRACE_GET_WATCH_REGS] (struct mips64_watch_regs): New. [!PTRACE_GET_WATCH_REGS] (struct pt_watch_regs): New.
* gdb/qiyao2013-07-275-17/+43
| | | | | | | | | | | * breakpoint.h: Include break-common.h. (enum target_hw_bp_type): Move to ... * common/break-common.h: ... here. New. gdb/gdbserver/ * i386-low.c: Include break-common.h. (enum target_hw_bp_type): Remove.