summaryrefslogtreecommitdiff
path: root/gdb
Commit message (Collapse)AuthorAgeFilesLines
* 2013-06-04 Gary Benson <gbenson@redhat.com>Gary Benson2013-06-048-49/+773
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * breakpoint.h (handle_solib_event): Moved function declaration to solib.h. * breakpoint.c (handle_solib_event): Moved function to solib.c. (bpstat_stop_status): Pass new argument to handle_solib_event. * solib.h (update_solib_breakpoints): New function declaration. (handle_solib_event): Moved function declaration from breakpoint.h. * solib.c (update_solib_breakpoints): New function. (handle_solib_event): Moved function from breakpoint.c. Updated to call solib_ops->handle_event if not NULL. * solist.h (target_so_ops): New fields "update_breakpoints" and "handle_event". * infrun.c (set_stop_on_solib_events): New function. (_initialize_infrun): Use the above for "set stop-on-solib-events". (handle_inferior_event): Pass new argument to handle_solib_event. * solib-svr4.c (probe.h): New include. (svr4_free_library_list): New forward declaration. (probe_action): New enum. (probe_info): New struct. (probe_info): New static variable. (NUM_PROBES): New definition. (svr4_info): New fields "using_xfer", "probes_table" and "solib_list". (free_probes_table): New function. (free_solib_list): New function. (svr4_pspace_data_cleanup): Free probes table and solib list. (svr4_copy_library_list): New function. (svr4_current_sos_via_xfer_libraries): New parameter "annex". (svr4_read_so_list): New parameter "prev_lm". (svr4_current_sos_direct): Renamed from "svr4_current_sos". (svr4_current_sos): New function. (probe_and_action): New struct. (hash_probe_and_action): New function. (equal_probe_and_action): Likewise. (register_solib_event_probe): Likewise. (solib_event_probe_at): Likewise. (solib_event_probe_action): Likewise. (solist_update_full): Likewise. (solist_update_incremental): Likewise. (disable_probes_interface_cleanup): Likewise. (svr4_handle_solib_event): Likewise. (svr4_update_solib_event_breakpoint): Likewise. (svr4_update_solib_event_breakpoints): Likewise. (svr4_create_solib_event_breakpoints): Likewise. (enable_break): Free probes table before creating breakpoints. Use svr4_create_solib_event_breakpoints to create breakpoints. (svr4_solib_create_inferior_hook): Free the solib list. (_initialize_svr4_solib): Initialise svr4_so_ops.handle_solib_event and svr4_so_ops.update_breakpoints.
* 2013-06-04 Gary Benson <gbenson@redhat.com>Gary Benson2013-06-044-0/+53
| | | | | | | | | | | | | | | | * target.h (target_ops): New field "to_augmented_libraries_svr4_read". (target_augmented_libraries_svr4_read): New macro. * target.c (update_current_target): Handle to_augmented_libraries_svr4_read. * remote.c (remote_state): New field "augmented_libraries_svr4_read". (remote_augmented_libraries_svr4_read_feature): New function. (remote_protocol_features): Add entry for "augmented-libraries-svr4-read". (remote_augmented_libraries_svr4_read): New function. (init_remote_ops): Initialize remote_ops.to_augmented_libraries_svr4_read.
* 2013-06-04 Gary Benson <gbenson@redhat.com>Gary Benson2013-06-042-1/+52
| | | | | | | | | * gdb.texinfo (General Query Packets/qSupported): Added "qXfer:libraries-svr4:read" and "augmented-libraries-svr4-read". to the table of currently defined stub features. Added a more detailed entry for "augmented-libraries-svr4-read". (General Query Packets/qXfer:libraries-svr4:read): Documented the augmented form of this packet.
* 2013-06-04 Gary Benson <gbenson@redhat.com>Gary Benson2013-06-042-0/+12
| | | | * NEWS: Update.
* 2013-06-04 Gary Benson <gbenson@redhat.com>Gary Benson2013-06-043-100/+131
| | | | | | | | | * server.c (handle_query): Add "augmented-libraries-svr4-read+" to qSupported response when appropriate. (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read with nonzero-length annex. * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle arguments supplied in annex.
* 2013-06-04 Gary Benson <gbenson@redhat.com>Gary Benson2013-06-043-9/+83
| | | | | | | | | | | | | | | | | | | * objfiles.h (inhibit_section_map_updates): New function declaration. (resume_section_map_updates): Likewise. (resume_section_map_updates_cleanup): Likewise. * objfiles.c (objfile_pspace_info): Removed field "objfiles_changed_p". New fields "new_objfiles_available", "section_map_dirty" and "inhibit_updates". (allocate_objfile): Set new_objfiles_available. (free_objfile): Set section_map_dirty. (objfile_relocate1): Likewise. (in_plt_section): Likewise. (find_pc_section): Update the conditions under which the section map will be updated. (inhibit_section_map_updates): New function. (resume_section_map_updates): Likewise. (resume_section_map_updates_cleanup): Likewise.
* 2013-06-04 Gary Benson <gbenson@redhat.com>Gary Benson2013-06-043-9/+54
| | | | | | | | * probe.h (get_probe_argument_count): New declaration. (evaluate_probe_argument): Likewise. * probe.c (get_probe_argument_count): New function. (evaluate_probe_argument): Likewise. (probe_safe_evaluate_at_pc): Use the above new functions.
* * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.Alan Modra2013-06-045-74/+129
| | | | | | | | | | | | | | | | | * rs6000-tdep.c (read_insn): Add frame param, don't assume big-endian. (ppc_insns_match_pattern): Add frame param. Avoid multiple target mem reads on optional insns. * ppc-linux-tdep.c (ppc_skip_trampoline_code): Update ppc_insns_match_pattern calls. * ppc64-tdep.c (ppc64_standard_linkage2, ppc64_standard_linkage3): Add match for power7 thread safety insns, and new order of std 2,40(1) insn. Correct code shown for _dl_runtime_resolve invocation in comment, and update rest of comment. (PPC64_STANDARD_LINKAGE1_LEN, PPC64_STANDARD_LINKAGE2_LEN, PPC64_STANDARD_LINKAGE3_LEN): Delete. (ppc64_standard_linkage2_target): Update insn offsets. (ppc64_skip_trampoline_code): Use a single insn buffer. Match newer stubs first. Update calls.
* gdb/Yao Qi2013-06-042-1/+7
| | | | | * solib.c (solib_find): Don't need dir separator if path has drive spec.
* *** empty log message ***gdbadmin2013-06-041-1/+1
|
* Revert "fix cleanup handling in macho_symfile_read"Joel Brobecker2013-06-032-2/+8
| | | | | | | | | | | | This patch indirectly causes a SEGV by creating a dangling pointer. Reverting this patch while working on a clearer memory management method for this part of the code. gdb/Changelog: Revert: * machoread.c (macho_symfile_read): Assign first cleanup to 'back_to'.
* gdb/Yao Qi2013-06-036-51/+50
| | | | | | | | | | | | | | | | | * mi/mi-cmd-var.c (mi_no_values, mi_simple_values): Move to mi-parse.c. Make them static. (mi_all_values): Likewise. (mi_parse_values_option): Move to mi-parse.c. Rename it to mi_parse_print_values. Make it external. * mi/mi-cmds.h (mi_no_values, mi_simple_values, mi_all_values): Remove the declarations. * mi/mi-parse.c (mi_parse_print_values): Moved from mi-cmd-var.c. * mi/mi-parse.h (mi_parse_print_values): Declare. * mi/mi-cmd-stack.c: Include mi-parse.h. (parse_print_values): Remove (mi_cmd_stack_list_locals): Call mi_parse_print_values instead of parse_print_values. (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Likewise.
* *** empty log message ***gdbadmin2013-06-031-1/+1
|
* *** empty log message ***gdbadmin2013-06-021-1/+1
|
* *** empty log message ***gdbadmin2013-06-011-1/+1
|
* * linux-x86-low.c (ps_get_thread_area): Properly extend address toDoug Evans2013-05-312-1/+7
| | | | 64 bits in 64-cross-32 environment.
* gdb/Yao Qi2013-05-312-36/+47
| | | | | | | * tracepoint.c (all_tracepoint_actions_and_cleanup): Declare. (encode_actions): Move code to ... (all_tracepoint_actions_and_cleanup): ... here. New. (trace_dump_command): Likewise.
* *** empty log message ***gdbadmin2013-05-311-1/+1
|
* maintenance_expand_symtabs leaks a cleanupTom Tromey2013-05-302-0/+6
| | | | | | | It turns out that maintenance_expand_symtabs was missing a call to do_cleanups. I found this using the cleanup checker. * symmisc.c (maintenance_expand_symtabs): Call do_cleanups.
* fix up xml-support.cTom Tromey2013-05-303-36/+25
| | | | | | | | | | | | | | | | | | | | | | xml-support.c has a function that returns a cleanup via an out parameter. This changes this function to be a normal cleanup constructor -- returning the cleanup directly and returning the other result via an out parameter. This is sort of a hack, but it lets the checker work here. I also noticed that gdb_xml_create_parser_and_cleanup does not need to be exported any more. * xml-support.c (gdb_xml_create_parser_and_cleanup): Rename from gdb_xml_create_parser_and_cleanup_1. Return a cleanup. Remove 'old_chain' argument. Add 'parser_result' argument. (gdb_xml_create_parser_and_cleanup): Remove old version. (gdb_xml_parse_quick): Update. (xml_process_xincludes): Update. * xml-support.h (gdb_xml_create_parser_and_cleanup): Don't declare.
* fix compile_rx_or_errorTom Tromey2013-05-303-7/+16
| | | | | | | | | | | | | | compile_rx_or_error looks like a constructor, but it can return NULL. This patch changes it to remove the NULL return, making it work like any other cleanup constructor. This is a stylistic patch but I think it is also better for code to follow the normal conventions. * probe.c (collect_probes): Check arguments for NULL before calling compile_rx_or_error. * utils.c (compile_rx_or_error): Require 'rx' to be non-NULL. Remove NULL return.
* some fixes to infrun.cTom Tromey2013-05-302-4/+8
| | | | | | | | | | This fixes some of the problems in infrun.c that the checker reported. I filed the remaining problems as bugs. This patch is purely stylistic. * infrun.c (adjust_pc_after_break): Introduce an outer null cleanup.
* fix mi-cmd-var.cTom Tromey2013-05-302-4/+7
| | | | | | | This is a stylistic change in mi-cmd-var.c that adds outer cleanups where needed by the checker. * mi/mi-cmd-var.c (varobj_update_one): Add an outer null cleanup.
* fix cli-script.cTom Tromey2013-05-302-12/+12
| | | | | | | | | | | | | read_command_lines_1 had some (IMNSHO) spaghetti-ish code for cleanup handling. This makes the code much simpler to understand, by introducing an outer cleanup. This is another case where a stylistic change for the checker is also nice for the reader. * cli/cli-script.c (read_command_lines_1): Use a null cleanup for 'old_chain'. Do not check 'head' before processing cleanups.
* fix mi-cmd-stack.cTom Tromey2013-05-302-4/+6
| | | | | | | | | | | | | mi-cmd-stack.d had a conditional cleanup, "cleanup_tuple" that confused the checker. However, there was no need for this, since it was only used via do_cleanups at the end of the function, just before another call to do_cleanups. So, while this is a stylistic patch for the checker, I also consider it a generic improvement for readers of the code. * mi/mi-cmd-stack.c (list_arg_or_local): Remove "cleanup_tuple".
* fix dbxread.cTom Tromey2013-05-302-5/+11
| | | | | | | | This is a stylistic change to make some code in dbxread.c analyzable by the checker. * dbxread.c (dbx_read_symtab): Declare 'back_to' in a more inner scope. Unconditionally call do_cleanups.
* fix source.cTom Tromey2013-05-302-0/+8
| | | | | | find_and_open_source can leak a cleanup. * source.c (find_and_open_source): Call do_cleanups.
* fix linux-thread-db.cTom Tromey2013-05-302-4/+9
| | | | | | | | This is a stylistic change to make it so the checker can analyze a function in linux-thread-db.c. * linux-thread-db.c (thread_db_load_search): Unconditionally call do_cleanups.
* fix in solib-aix.cTom Tromey2013-05-302-2/+7
| | | | | | | | | solib_aix_bfd_open has an early "return" that doesn't run cleanups. This fixes the problem by dropping the null_cleanup and using a later cleanup as the master cleanup for the function. * solib-aix.c (solib_aix_bfd_open): Don't use a null cleanup for 'cleanup'; instead use a later one.
* use explicit returns to avoid checker confusionTom Tromey2013-05-304-3/+13
| | | | | | | | | | | | | | | | | | | The checker does not understand the idiom if (except.reason < 0) { do_cleanups (whatever); GDB_PY_HANDLE_EXCEPTION (except); } because it doesn't realize that the nested 'if' actually has the same condition. This fixes instances of this to be more explicit. * python/py-breakpoint.c (bppy_get_commands): Use explicit, unconditional return. * python/py-frame.c (frapy_read_var): Likewise. * python/python.c (gdbpy_decode_line): Likewise.
* fix cp-namespace.cTom Tromey2013-05-302-1/+9
| | | | | | | | cp_lookup_symbol_imports_or_template could return without running cleanups. * cp-namespace.c (cp_lookup_symbol_imports_or_template): Call do_cleanups on all return paths.
* fix top.cTom Tromey2013-05-302-0/+5
| | | | | | execute_command can leak a cleanup along one return path. * top.c (execute_command): Discard 'cleanup_if_error' cleanups.
* fix one bug in stabsread.cTom Tromey2013-05-302-1/+9
| | | | | | | Some code in stabsread.c can return without running cleanups. * stabsread.c (read_struct_type): Call do_cleanups along all return paths.
* * mips-linux-tdep.c: Adjust formatting throughout.Maciej W. Rozycki2013-05-302-59/+60
|
* fix mipsread.cTom Tromey2013-05-302-5/+25
| | | | | | | Some code in mipsread.c could leak cleanups along some return paths. * mipsread.c (read_alphacoff_dynamic_symtab): Call do_cleanups along all return paths.
* fix one bug in symfile.cTom Tromey2013-05-302-2/+13
| | | | | | | find_separate_debug_file could leak a cleanup along some return paths. * symfile.c (find_separate_debug_file): Call do_cleanups along all return paths.
* fix symtab.cTom Tromey2013-05-302-1/+6
| | | | | | | | search_symbols had some bad code resulting in a cleanup being both discarded and run. * symtab.c (search_symbols): Introduce a null cleanup for 'retval_chain'.
* fix py-value.cTom Tromey2013-05-302-2/+13
| | | | | | | | Some code in py-value.c could exit a loop without running some cleanups made in the loop. * python/py-value.c (valpy_binop): Call do_cleanups before exiting loop.
* fix py-prettyprint.cTom Tromey2013-05-302-2/+5
| | | | | | | | print_children, in py-prettyprint.c, could call do_cleanups twice on the same cleanup. * python/py-prettyprint.c (print_children): Remove extra do_cleanups call.
* fix py-frame.cTom Tromey2013-05-302-1/+11
| | | | | | | A couple return paths in frapy_read_var were missing do_cleanups calls. * python/py-frame.c (frapy_read_var): Call do_cleanups along all return paths.
* fix py-breakpoint.cTom Tromey2013-05-302-1/+10
| | | | | | | One return path in bppy_get_commands was missing a do_cleanups call. * python/py-breakpoint.c (bppy_get_commands): Call do_cleanups along all return paths.
* simplify cli-logging.c for analysisTom Tromey2013-05-302-4/+10
| | | | | | | | | This is another stylistic patch. It changes cli-logging.c to be analyzable by the checker, again following the method of adding an outer cleanup and unconditionally calling do_cleanups. * cli/cli-logging.c (set_logging_redirect): Unconditionally call do_cleanups.
* fix varobj.cTom Tromey2013-05-302-3/+6
| | | | | | | | | c_value_of_root is missing a call to do_cleanups at one return. This fixes the problem by removing that return and letting control fall through. * varobj.c (c_value_of_root): Call do_cleanups along all return paths.
* make a cleanup unconditionally in tracepoint.cTom Tromey2013-05-302-4/+9
| | | | | | | | | This is another cosmetic patch. It introduces an "outer" cleanup in trace_dump_command and arranges to unconditionally call do_cleanups. This lets the checker analyze the function. * tracepoint.c (trace_dump_command): Unconditionally call do_cleanups.
* fix two buglets in breakpoint.cTom Tromey2013-05-302-4/+10
| | | | | | | | | | First, output_thread_groups leaks a cleanup along one return path. Second, parse_cmd_to_aexpr could return without running its cleanups, if there was an exception in a TRY_CATCH. * breakpoint.c (output_thread_groups, parse_cmd_to_aexpr): Call do_cleanups earlier.
* fix cleanup handling in macho_symfile_readTom Tromey2013-05-302-2/+7
| | | | | | | macho_symfile_read leaks a cleanup by assigning to 'back_to' too late. * machoread.c (macho_symfile_read): Assign first cleanup to 'back_to'.
* fix cleanup handling in m32r_loadTom Tromey2013-05-302-0/+5
| | | | | | m32r_load is missing a call to do_cleanups along one return path. * m32r-rom.c (m32r_load): Call do_cleanups at all returns.
* fix list_available_thread_groupsTom Tromey2013-05-302-1/+8
| | | | | | | list_available_thread_groups, in mi-main.c, leaks a cleanup. This changes it to call do_cleanups. * mi/mi-main.c (list_available_thread_groups): Call do_cleanups.
* cleanup fixes for inf-ptrace.cTom Tromey2013-05-302-8/+12
| | | | | | | | | | | This is one of the stylistic patches. The code here in inf-ptrace.c is not incorrect, but it is in a style that the cleanup checker cannot handle. This patch changes it to a simpler style, following the usual method of introducing an unconditional "outer" cleanup. * inf-ptrace.c (inf_ptrace_create_inferior): Unconditionally call discard_cleanups. (inf_ptrace_attach): Likewise.
* cleanup fixes for remote-mips.cTom Tromey2013-05-302-4/+22
| | | | | | | | | remote-mips.c has a few 'return's where cleanups are not run. * remote-mips.c (mips_exit_debug): Call do_cleanups on all return paths. (mips_initialize): Likewise. (common_open): Call do_cleanups.