summaryrefslogtreecommitdiff
path: root/gdb/remote.c
Commit message (Collapse)AuthorAgeFilesLines
* * cli/cli-interp.c (struct captured_execute_command_args):Tom Tromey2011-04-041-29/+13
| | | | | | | | | | | | | | | | | | | Remove. (do_captured_execute_command): Remove. (safe_execute_command): Use TRY_CATCH. * cli/cli-script.c (struct wrapped_read_command_file_args): Remove. (wrapped_read_command_file): Remove. (script_from_file): Use TRY_CATCH. * exceptions.c (catch_exception): Remove. * exceptions.h (catch_exception): Remove. (deprecated_throw_reason): Update comment. * mi/mi-main.c (captured_mi_execute_command): Change 'data' argument to 'context'. (mi_execute_command): Use TRY_CATCH. * remote.c (struct start_remote_args): Remove. (remote_start_remote): Update; change arguments. (remote_open_1): Use TRY_CATCH.
* ARI fixes: Add missing internationalization markups throughoutPierre Muller2011-03-181-2/+2
| | | | | | | | C source files. * darwin-nat-info.c: Ditto. * record.c: Ditto. * remote.c: Ditto. * mi/mi-main.c: Ditto.
* Fix ARI warnings about new lines at the end of messages, whichPierre Muller2011-03-161-1/+1
| | | | | | | | | | | | | | | | | are unneeded as there is a new line added at the end of the message automatically. * darwin-nat.c (darwin_stop_inferior): Ditto. * dec-thread.c (dec_thread_get_ada_task_ptid): Ditto. * dfp.c (decimal_to_number): Ditto. * exec.c (print_section_info): Ditto. * i386-darwin-nat.c (darwin_set_sstep): Ditto. * osdata.c (get_osdata): Ditto. * record.c (bfdcore_write): Ditto. * remote-mips.c (mips_readchar): Ditto. * remote.c (read_ptid): Ditto. * ser-mingw.c (ser_windows_raw): Ditto. * tracepoint.c (add_local_symbols): Ditto. * windows-nat.c (fake_create_process): Ditto.
* Fix ARI warning about functions without parameters that do notPierre Muller2011-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | use (void). * breakpoint.c (all_tracepoints): Replace () by (void). * f-exp.y (match_string_literal): Ditto. (yylex): Ditto. * m2-exp.y (yylex): Ditto. * mep-tdep.c (current_me_module): Ditto. (current_options): Ditto. (current_cop_data_bus_width): Ditto. (current_cr_names): Ditto. (current_cr_is_float): Ditto. (current_ccr_names): Ditto. * objc-exp.y (yylex): Ditto. * p-exp.y (yylex): Ditto. * remote.c (send_interrupt_sequence): Ditto. * tracepoint.c (current_trace_status): Ditto. * python/py-evts.c (gdbpy_initialize_py_events): Ditto. * python/py-prettyprint.c (push_dummy_python_frame): Ditto.
* gdb/Pedro Alves2011-03-081-1/+10
| | | | | | | | | | | | | 2011-03-08 Pedro Alves <pedro@codesourcery.com> * remote.c (remote_check_symbols): Skip if the target has no execution. gdb/testsuite/ 2011-03-08 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.server/ext-run.exp (load new file without any gdbserver inferior): New test.
* 2011-03-04 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-03-041-0/+1
| | | | * remote.c (putpkt_binary): Document that case stmt falls through.
* 2011-02-28 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-03-011-5/+5
| | | | | | * remote.c (remote_get_noisy_reply): Discard unused value. (remote_vcont_resume): Ditto. (remote_stop_ns): Ditto.
* * remote.c (remote_close): Reset INFERIOR_PTID to NULL_PTIDPierre Muller2011-02-211-2/+4
| | | | before calling discard_all_inferiors.
* gdb/Pedro Alves2011-02-141-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * target.c (target_read_live_memory): New function. (memory_xfer_live_readonly_partial): New. (memory_xfer_partial): If reading from a traceframe, fallback to reading unavailable read-only memory from read-only regions of live target memory. * tracepoint.c (disconnect_tracing): Adjust. (set_current_traceframe): New, factored out from set_traceframe_number. (set_traceframe_number): Reimplement to only change the traceframe number on the GDB side. (do_restore_current_traceframe_cleanup): Adjust. (make_cleanup_restore_traceframe_number): New. (cur_traceframe_number): New global. (tfile_open): Set cur_traceframe_number to no traceframe. (set_tfile_traceframe): New function. (tfile_trace_find): If looking up a traceframe using any method other than by number, make sure the current tfile traceframe matches gdb's current traceframe. Update the current tfile traceframe if the lookup succeeded. (tfile_fetch_registers, tfile_xfer_partial) (tfile_get_trace_state_variable_value): Make sure the remote traceframe matches gdb's current traceframe. * remote.c (remote_traceframe_number): New global. (remote_open_1): Set it to -1. (set_remote_traceframe): New function. (remote_fetch_registers, remote_store_registers) (remote_xfer_memory, remote_xfer_partial) (remote_get_trace_state_variable_value): Make sure the remote traceframe matches gdb's current traceframe. (remote_trace_find): If looking up a traceframe using any method other than by number, make sure the current remote traceframe matches gdb's current traceframe. Update the current remote traceframe if the lookup succeeded. * infrun.c (fetch_inferior_event): Adjust. * tracepoint.h (set_current_traceframe): Declare. (get_traceframe_number, set_traceframe_number): Add describing comments.
* gdb/Pedro Alves2011-02-141-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * target.h (struct traceframe_info): Forward declare. (enum target_object): Add TARGET_OBJECT_TRACEFRAME_INFO. (struct target_ops) <to_traceframe_info>: New field. (target_traceframe_info): New. * target.c (update_current_target): Inherit and default to_traceframe_info. * remote.c (PACKET_qXfer_traceframe_info): New. (remote_protocol_features): Register qXfer:traceframe-info:read. (remote_xfer_partial): Handle TARGET_OBJECT_TRACEFRAME_INFO. (remote_traceframe_info): New. (init_remote_ops): Install it. (_initialize_remote): Install "set/show remote traceframe-info" commands. * tracepoint.h (parse_traceframe_info): Declare. * tracepoint.c (struct mem_range): New. (mem_range_s): New typedef. (struct traceframe_info): New. (traceframe_info): New global. (free_traceframe_info): New function. (clear_traceframe_info): New function. (start_tracing, tfind_1, set_traceframe_number): Clear traceframe info. (build_traceframe_info): New function. (tfile_traceframe_info): New function. (init_tfile_ops): Install tfile_traceframe_info. (traceframe_info_start_memory, free_result): New functions. (memory_attributes, traceframe_info_elements): New globals. (parse_traceframe_info, get_traceframe_info): New functions. * features/traceframe-info.dtd: New file. * Makefile.in (XMLFILES): Add traceframe-info.dtd. gdb/gdbserver/ * server.c (handle_qxfer_traceframe_info): New. (qxfer_packets): Register "traceframe-info". (handle_query): Report support for qXfer:traceframe-info:read+. * tracepoint.c (match_blocktype): New. (traceframe_find_block_type): Rename to ... (traceframe_walk_blocks): ... this. Add callback filter argument, and use it. (traceframe_find_block_type): New, reimplemented on top of traceframe_walk_blocks. (build_traceframe_info_xml): New. (traceframe_read_info): New. * server.h (traceframe_read_info): Declare. gdb/doc/ * gdb.texinfo (Remote Configuration): Mention set/show remote traceframe-info. (Tools/Packages Optional for Building GDB): Mention that expat is used for traceframe info. (Remote Protocol) <Menu>: Add "Traceframe Info Format". (General Query Packets) <qSupported>: Describe the qXfer:traceframe-info:read feature. (qXfer::read): Describe qXfer:traceframe-info:read. (Traceframe Info Format): New section.
* * xml-support.c (xml_find_attribute): New.Pedro Alves2011-02-021-4/+5
| | | | | | | | | | | | | | | | (xinclude_start_include): Use it. * xml-support.h (xml_find_attribute): Declare. * memory-map.c (memory_map_start_memory) (memory_map_start_property): Use xml_find_attribute. * osdata.c (osdata_start_osdata, osdata_start_column): Use xml_find_attribute. * remote.c (start_thread): Use xml_find_attribute. * solib-target.c (library_list_start_segment) (library_list_start_section, library_list_start_library) (library_list_start_list): Use xml_find_attribute. * xml-tdesc.c (tdesc_start_target, tdesc_start_feature) (tdesc_start_union, tdesc_start_struct, tdesc_start_flags) (tdesc_start_field): Use xml_find_attribute.
* Stop remote_read_bytes from handling partial reads itself.Pedro Alves2011-01-251-58/+34
| | | | | | | | | | | | | | | * remote-fileio.c: Include target.h. (remote_fileio_write_bytes): Delete. (remote_fileio_func_open, remote_fileio_func_write) (remote_fileio_func_rename, remote_fileio_func_unlink): Use target_read_memory. (remote_fileio_func_stat): Use target_read_memory and target_write_memory. (remote_fileio_func_gettimeofday): Use target_write_memory. (remote_fileio_func_system): Use target_read_memory. * remote.c (remote_write_bytes): Make it static. (remote_read_bytes): Don't handle partial reads here. * remote.h (remote_read_bytes): Delete declaration.
* Simplify XML parsing a bit.Pedro Alves2011-01-251-16/+5
| | | | | | | | | | | | | | | | * xml-support.h (gdb_xml_parse_quick): Declare. * xml-support.c (gdb_xml_create_parser_and_cleanup_1): Renamed from gdb_xml_create_parser_and_cleanup, and added `old_chain' parameter. (gdb_xml_create_parser_and_cleanup): Reimplement on top of gdb_xml_create_parser_and_cleanup_1. (gdb_xml_parse_quick): New. * memory-map.c (parse_memory_map): Use gdb_xml_parse_quick. * osdata.c (osdata_parse): Ditto. * remote.c (remote_threads_info): Ditto. * solib-target.c (solib_target_parse_libraries): Ditto. * xml-syscall.c (syscall_parse_xml): Ditto. * xml-tdesc.c (tdesc_parse_xml): Ditto.
* 2011-01-11 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-01-111-12/+13
| | | | | | | | | | | | | | | | | | | | | | * arm-tdep.c: Internationalization. * c-lang.c: Ditto. * charset.c: Ditto. * fork-child.c: Ditto. * nto-procfs.c: Ditto. * ppc-sysv-tdep.c: Ditto. * procfs.c: Ditto. * remote-mips.c: Ditto. * remote.c: Ditto. * rs6000-nat.c: Ditto. * rs6000-tdep.c: Ditto. * target.c: Ditto. * valops.c: Ditto. * value.c: Ditto. * xml-support.c: Ditto. * mi/mi-cmd-break.c: Ditto. * mi/mi-cmd-var.c: Ditto. * mi/mi-interp.c: Ditto. * mi/mi-main.c: Ditto.
* 2011-01-10 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-01-101-48/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * nto-procfs.c: Comment cleanup, mostly periods and spaces. * nto-tdep.c: Ditto. * nto-tdep.h: Ditto. * objc-exp.y: Ditto. * objc-lang.c: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * observer.c: Ditto. * opencl-lang.c: Ditto. * osabi.c: Ditto. * parse.c: Ditto. * parser-defs.h: Ditto. * p-exp.y: Ditto. * p-lang.c: Ditto. * posix-hdep.c: Ditto. * ppcbug-rom.c: Ditto. * ppc-linux-nat.c: Ditto. * ppc-linux-tdep.c: Ditto. * ppc-linux-tdep.h: Ditto. * ppcnbsd-tdep.c: Ditto. * ppcobsd-tdep.c: Ditto. * ppcobsd-tdep.h: Ditto. * ppc-sysv-tdep.c: Ditto. * ppc-tdep.h: Ditto. * printcmd.c: Ditto. * proc-abi.c: Ditto. * proc-flags.c: Ditto. * procfs.c: Ditto. * proc-utils.h: Ditto. * progspace.h: Ditto. * prologue-value.c: Ditto. * prologue-value.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * ravenscar-sparc-thread.c: Ditto. * ravenscar-thread.c: Ditto. * ravenscar-thread.h: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote.c: Ditto. * remote-fileio.c: Ditto. * remote-fileio.h: Ditto. * remote.h: Ditto. * remote-m32r-sdi.c: Ditto. * remote-mips.c: Ditto. * remote-sim.c: Ditto. * rs6000-aix-tdep.c: Ditto. * rs6000-nat.c: Ditto. * rs6000-tdep.c: Ditto.
* 2011-01-05 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-01-051-45/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * addrmap.c: Shorten lines of >= 80 columns. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * ax-gdb.c: Ditto. * ax-general.c: Ditto. * bcache.c: Ditto. * blockframe.c: Ditto. * breakpoint.c: Ditto. * buildsym.c: Ditto. * c-lang.c: Ditto. * c-typeprint.c: Ditto. * charset.c: Ditto. * coffread.c: Ditto. * command.h: Ditto. * corelow.c: Ditto. * cp-abi.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * defs.h: Ditto. * dfp.c: Ditto. * dfp.h: Ditto. * dictionary.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * eval.c: Ditto. * event-loop.c: Ditto. * event-loop.h: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-lang.c: Ditto. * f-valprint.c: Ditto. * findcmd.c: Ditto. * frame-base.c: Ditto. * frame-unwind.c: Ditto. * frame-unwind.h: Ditto. * frame.c: Ditto. * frame.h: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_dirent.h: Ditto. * gdb_obstack.h: Ditto. * gdbcore.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * inf-ttrace.c: Ditto. * infcall.c: Ditto. * infcmd.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * inline-frame.h: Ditto. * language.c: Ditto. * language.h: Ditto. * libunwind-frame.c: Ditto. * libunwind-frame.h: Ditto. * linespec.c: Ditto. * linux-nat.c: Ditto. * linux-nat.h: Ditto. * linux-thread-db.c: Ditto. * machoread.c: Ditto. * macroexp.c: Ditto. * macrotab.c: Ditto. * main.c: Ditto. * maint.c: Ditto. * mdebugread.c: Ditto. * memattr.c: Ditto. * minsyms.c: Ditto. * monitor.c: Ditto. * monitor.h: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * osabi.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * parse.c: Ditto. * printcmd.c: Ditto. * proc-events.c: Ditto. * procfs.c: Ditto. * progspace.c: Ditto. * progspace.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote-fileio.c: Ditto. * remote.c: Ditto. * ser-mingw.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * solib-frv.c: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solib-target.c: Ditto. * solib.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * stabsread.c: Ditto. * stabsread.c: Ditto. * stack.c: Ditto. * stack.h: Ditto. * symfile-mem.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target-descriptions.c: Ditto. * target-memory.c: Ditto. * target.c: Ditto. * target.h: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * ui-file.c: Ditto. * ui-file.h: Ditto. * ui-out.h: Ditto. * user-regs.c: Ditto. * user-regs.h: Ditto. * utils.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vec.h: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xcoffsolib.h: Ditto. * xml-syscall.c: Ditto. * xml-tdesc.c: Ditto.
* run copyright.sh for 2011.Joel Brobecker2011-01-011-1/+1
|
* 2010-11-04 Hui Zhu <teawater@gmail.com>Hui Zhu2010-11-041-4/+4
| | | | * tracepoint.c (remote_trace_set_readonly_regions): Change lma to vma.
* gdb/Jan Kratochvil2010-11-021-14/+0
| | | | | | | | | | | | | | | | | | | | | | | Revert: 2010-10-17 Jan Kratochvil <jan.kratochvil@redhat.com> Pedro Alves <pedro@codesourcery.com> * gdbthread.h (currently_stepping): New declaration. * infrun.c (currently_stepping): Remove the forward declaration. (currently_stepping): Make it global. * linux-nat.c (resume_callback) <lp->stopped && lp->status == 0>: New variables tp and step, initialized them. Pass STEP to to_resume. Print also possibly "PTRACE_SINGLESTEP" if STEP. Initialize LP->STEP. * remote.c (currently_stepping_callback): New. (remote_vcont_resume) <ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid)>: New variable tp. Call currently_stepping_callback and step such thread. gdb/testsuite/ Revert: 2010-10-17 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.threads/sigstep-threads.exp: New file. * gdb.threads/sigstep-threads.c: New file.
* * remote.c (remote_get_threadlist): If we got emptyVladimir Prus2010-10-201-1/+1
| | | | | response, bail out immediately, and don't emit any warnings.
* gdb/Jan Kratochvil2010-10-171-0/+14
| | | | | | | | | | | | | | | | | | * gdbthread.h (currently_stepping): New declaration. * infrun.c (currently_stepping): Remove the forward declaration. (currently_stepping): Make it global. * linux-nat.c (resume_callback) <lp->stopped && lp->status == 0>: New variables tp and step, initialized them. Pass STEP to to_resume. Print also possibly "PTRACE_SINGLESTEP" if STEP. Initialize LP->STEP. * remote.c (currently_stepping_callback): New. (remote_vcont_resume) <ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid)>: New variable tp. Call currently_stepping_callback and step such thread. gdb/testsuite/ * gdb.threads/sigstep-threads.exp: New file. * gdb.threads/sigstep-threads.c: New file.
* 2010-07-28 Oleg Nesterov <oleg@redhat.com>Tom Tromey2010-07-281-1/+2
| | | | * remote.c (readchar): Call pop_target in case of SERIAL_ERROR.
* Add missing gettext markup.Joel Brobecker2010-07-281-1/+1
| | | | | | | gdb/ChangeLog: * remote.c (remote_download_tracepoint): Add missing gettext markup. * tracepoint.c (parse_static_tracepoint_marker_definition): Likewise.
* 2010-07-07 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>gdb_7_2-2010-07-07-branchpointThiago Jung Bauermann2010-07-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thiago Jung Bauermann <bauerman@br.ibm.com> Support for hw accelerated condition watchpoints in booke powerpc. * breakpoint.c (fetch_watchpoint_value): Rename to fetch_subexp_value and move to eval.c. Change callers. (insert_bp_location): Pass watchpoint condition in target_insert_watchpoint. (remove_breakpoint_1) Pass watchpoint condition in target_remove_watchpoint. (watchpoint_locations_match): Call target_can_accel_watchpoint_condition. * eval.c: Include wrapper.h. (fetch_subexp_value): Moved from breakpoint.c. * ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Formatting fix. (can_use_watchpoint_cond_accel): New function. (calculate_dvc): Likewise. (num_memory_accesses): Likewise. (check_condition): Likewise. (ppc_linux_can_accel_watchpoint_condition): Likewise (ppc_linux_insert_watchpoint): Call can_use_watchpoint_cond_accel, check_condition and calculate_dvc. (ppc_linux_remove_watchpoint): Likewise. (_initialize_ppc_linux_nat): Set to_can_accel_watchpoint_condition to ppc_linux_can_accel_watchpoint_condition * target.c (debug_to_insert_watchpoint): Add argument for watchpoint condition. (debug_to_remove_watchpoint): Likewise. (debug_to_can_accel_watchpoint_condition): New function. (update_current_target): Set to_can_accel_watchpoint_condition. (setup_target_debug): Set to_can_accel_watchpoint_condition. * target.h: Add opaque declaration for struct expression. (struct target_ops) <to_insert_watchpoint>, <to_remove_watchpoint>: Add new arguments to pass the watchpoint <to_can_accel_watchpoint_condition>: New member. condition. Update all callers and implementations. (target_can_accel_watchpoint_condition): New macro. * value.c (free_value_chain): New function. * value.h (fetch_subexp_value): New prototype. (free_value_chain): Likewise.
* Static tracepoints support, and UST integration.Pedro Alves2010-07-011-0/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb/gdbserver/ * configure.ac: Handle --with-ust. substitute ustlibs and ustinc. * mem-break.c (uninsert_all_breakpoints) (reinsert_all_breakpoints): New. * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints): * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New. (gdb_agent_ust_loaded, helper_thread_id) (gdb_agent_helper_thread_id): New macros. (struct ipa_sym_addresses): Add addr_ust_loaded, addr_helper_thread_id, addr_cmd_buf. (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf. (in_process_agent_loaded_ust): New. (write_e_ust_not_loaded): New. (maybe_write_ipa_ust_not_loaded): New. (struct collect_static_trace_data_action): New. (enum tracepoint_type) <static_tracepoint>: New. (struct tracepoint) <handle>: Mention static tracepoints. (struct static_tracepoint_ctx): New. (CMD_BUF_SIZE): New. (add_tracepoint_action): Handle static tracepoint actions. (unprobe_marker_at): New. (clear_installed_tracepoints): Handle static tracepoints. (cmd_qtdp): Handle static tracepoints. (probe_marker_at): New. (cmd_qtstart): Handle static tracepoints. (response_tracepoint): Handle static tracepoints. (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New. (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat. (get_context_regcache): Handle static tracepoints. (do_action_at_tracepoint): Handle static tracepoint actions. (traceframe_find_block_type): Handle static trace data blocks. (traceframe_read_sdata): New. (download_tracepoints): Download static tracepoint actions. [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h. (GDB_PROBE_NAME): New. (ust_ops): New. (GET_UST_SYM): New. (USTF): New. (dlsym_ust): New. (ust_marker_to_static_tracepoint): New. (gdb_probe): New. (collect_ust_data_at_tracepoint): New. (gdb_ust_probe): New. (UNIX_PATH_MAX, SOCK_DIR): New. (gdb_ust_connect_sync_socket): New. (resume_thread, stop_thread): New. (run_inferior_command): New. (init_named_socket): New. (gdb_ust_socket_init): New. (cstr_to_hexstr): New. (next_st): New. (first_marker, next_marker): New. (response_ust_marker): New. (cmd_qtfstm, cmd_qtsstm): New. (unprobe_marker_at, probe_marker_at): New. (cmd_qtstmat, gdb_ust_thread): New. (gdb_ust_init): New. (initialize_tracepoint_ftlib): Call gdb_ust_init. * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h (ST_REGENTRY): New. (x86_64_st_collect_regmap): New. (X86_64_NUM_ST_COLLECT_GREGS): New. (AMD64_RIP_REGNUM): New. (supply_static_tracepoint_registers): New. * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h (ST_REGENTRY): New. (i386_st_collect_regmap): New. (i386_NUM_ST_COLLECT_GREGS): New. (supply_static_tracepoint_registers): New. * server.c (handle_query): Handle qXfer:statictrace:read. <qSupported>: Report support for StaticTracepoints, and qXfer:statictrace:read features. * server.h (traceframe_read_sdata) (supply_static_tracepoint_registers): Declare. * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex) (unpack_varlen_hex): Include in IPA build. * Makefile.in (ustlibs, ustinc): New. (IPA_OBJS): Add remote-utils-ipa.o. ($(IPA_LIB)): Link -ldl and -lpthread. (UST_CFLAGS): New. (IPAGENT_CFLAGS): Add UST_CFLAGS. * config.in, configure: Regenerate. gdb/ * NEWS: Mention new support for static tracepoints. (New packets): Mention qTfSTM, qTsSTM, qTSTMat and qXfer:statictrace:read. (New features in the GDB remote stub, GDBserver): Mention static tracepoints support using an UST based backend. (New commands): Mention "info static-tracepoint-markers" and "strace". * breakpoint.c (is_marker_spec): New. (is_tracepoint): Handle static tracepoints. (validate_commands_for_breakpoint): Static tracepoints can't do while-stepping. (static_tracepoints_here): New. (bpstat_what): Handle static tracepoints. (print_one_breakpoint_location, allocate_bp_location, mention): Ditto. (create_breakpoint_sal): Ditto. (decode_static_tracepoint_spec): New. (create_breakpoint): Replace `hardwareflag', and `traceflag' with `type_wanted'. Adjust. Handle static tracepoint marker locations. (break_command_1): Adjust. (update_static_tracepoint): New. (update_breakpoint_locations): Handle static tracepoints. (breakpoint_re_set_one): Handle static tracepoint marker locations. (disable_command, enable_command): Handle static tracepoints. (trace_command, ftrace_command): Adjust. (strace_command): New. (create_tracepoint_from_upload): Adjust. (save_breakpoints): Handle static tracepoints. (_initialize_breakpoint): Install the "strace" command. * breakpoint.h (enum bptype): New bp_static_tracepoint type. (struct breakpoint): New fields static_trace_marker_id and static_trace_marker_id_idx. (breakpoints_here_p): Declare. (create_breakpoint): Adjust. (static_tracepoints_here): Declare. * remote.c (struct remote_state) <static_tracepoints>: New field. (PACKET_qXfer_statictrace_read, PACKET_StaticTracepoints): New. (remote_static_tracepoint_marker_at): New. (remote_static_tracepoint_markers_by_strid): New. (remote_static_tracepoint_feature): New. (remote_disconnected_tracing_feature): Handle "StaticTracepoints". (remote_xfer_partial): Handle TARGET_OBJECT_STATIC_TRACE_DATA. (remote_supports_static_tracepoints): New. (remote_download_tracepoint): Download static tracepoints. (init_remote_ops): Install remote_static_tracepoint_marker_at and remote_static_tracepoint_markers_by_strid. (_initialize_remote): Install set|show remote static-tracepoints, and set|show remote read-sdata-object commands. * target.c (update_current_target): Inherit and default to_static_tracepoint_marker_at, and to_static_tracepoint_markers_by_strid. * target.h (static_tracepoint_marker): Forward declare. (enum target_object): New object TARGET_OBJECT_STATIC_TRACE_DATA. (static_tracepoint_marker_p): New typedef. (DEF_VEC_P(static_tracepoint_marker_p)): New VEC type. (struct target_ops): New fields to_static_tracepoint_marker_at and to_static_tracepoint_markers_by_strid. (target_static_tracepoint_marker_at) (target_static_tracepoint_markers_by_strid): New. * tracepoint.c: Include source.h. (validate_actionline): Handle $_sdata. (struct collection_list): New field strace_data. (add_static_trace_data): New. (clear_collection_list): Clear strace_data. (stringify_collection_list): Account for a possible static trace data collection. (encode_actions_1): Encode an $_sdata collection. (parse_tracepoint_definition): Handle static tracepoints. (parse_static_tracepoint_marker_definition): New. (release_static_tracepoint_marker): New. (print_one_static_tracepoint_marker): New. (info_static_tracepoint_markers_command): New. (sdata_make_value): New. (_initialize_tracepoint): Create the $_sdata convenience variable. Add the "info static-tracepoint-markers" command. Mention $_sdata in the "collect" command's help output. * tracepoint.h (struct static_tracepoint_marker): New. (parse_static_tracepoint_marker_definition) (release_static_tracepoint_marker): Declare. * mi/mi-cmd-break.c (mi_cmd_break_insert): Adjust. * python/py-breakpoint.c (bppy_new): Adjust. doc/ * gdb.texinfo (Convenience Variables): Document $_sdata. (Commands to Set Tracepoints): Describe static tracepoints. Add `Listing Static Tracepoint Markers' menu entry. Document "strace". (Tracepoint Action Lists): Document collecting $_sdata. (Listing Static Tracepoint Markers): New subsection. (Tracepoints support in gdbserver): Mention static tracepoints. (remote packets, enabling and disabling): Mention read-sdata-object. (General Query Packets) <qSupported>: Document qXfer:sdata:read and StaticTracepoint. Mention qTfSTM, qTsSTM and qTSTMat as tracepoint packets. Document qXfer:sdata:read. (Tracepoint packets): Document qTfSTM, qTsSTM and qTSTMat.
* 2010-06-11 Stan Shebs <stan@codesourcery.com>Stan Shebs2010-06-121-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add per-operation permission flags. * target.h (struct target_ops): New method to_set_permissions. (target_set_permissions): New macro. (target_insert_breakpoint): Change macro to function. (target_remove_breakpoint): Ditto. (target_stop): Ditto. (may_write_registers): Declare. (may_write_memory): Declare. (may_insert_breakpoints): Declare. (may_insert_tracepoints): Declare. (may_insert_fast_tracepoints): Declare. (may_stop): Declare. * target.c (may_write_registers, may_write_registers_1): New globals. (may_write_memory, may_write_memory_1): New globals. (may_insert_breakpoints, may_insert_breakpoints_1): New globals. (may_insert_tracepoints, may_insert_tracepoints_1): New globals. (may_insert_fast_tracepoints, may_insert_fast_tracepoints_1): New globals. (may_stop, may_stop_1): New global. (target_xfer_partial): Test for write permission. (target_store_registers): Ditto. (target_insert_breakpoint): New function. (target_remove_breakpoint): New function. (target_stop): New function. (_initialize_targets): Add new set/show variables. (set_write_memory_permission): New function. (update_target_permissions): New function. (set_target_permissions): New function. (update_current_target): Default to_set_permissions. (_initialize_targets): Use new globals and setter function. * tracepoint.c (start_tracing): Test for permission. * inferior.h (update_observer_mode): Declare. * infrun.c (non_stop_1): Define earlier. (observer_mode, observer_mode_1): New globals. (set_observer_mode, show_observer_mode): New functions. (update_observer_mode): New function. (_initialize_infrun): Define "set observer" command. * remote.c (PACKET_QAllow): New optional packet. (remote_protocol_features): Add QAllow. (remote_set_permissions): New function. (remote_start_remote): Call it. (init_remote_ops): Add it to target vector. (_initialize_remote): Add config command for QAllow. * gdb.texinfo (Observer Mode): New section. (General Query Packets): Document QAllow. * gdb.base/permissions.exp: New file.
* 2010-06-08 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-06-081-0/+1
| | | | * remote.c (remote_close): Set inferior_ptid to null_ptid.
* Fix ARI warning in remote.c (no trailing \n in call to error)Joel Brobecker2010-06-021-1/+1
| | | | | * remote.c (remote_get_noisy_reply): Remove trailing "\n" in call to error.
* * remote.c (unpack_varlen_hex): Remove forward declaration.Pedro Alves2010-05-271-2/+2
| | | | | | | | | | | (remote_console_output): Make static, and add forward declaration. * remote.h: Drop FIXME comment. (unpack_varlen_hex): Declare. (remote_console_output, remote_cisco_objfile_relocate) (deprecated_target_resume_hook, deprecated_target_wait_loop_hook): Delete declarations. * tracepoint.c: Include "remote.h". (unpack_varlen_hex): Delete declaration.
* gdb/Pedro Alves2010-05-261-7/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2010-05-26 Pedro Alves <pedro@codesourcery.com> * NEWS: Mention the `qRelocInsn' feature. * gdbarch.sh (relocate_instruction): New. * amd64-tdep.c (rip_relative_offset): New. (append_insns): New. (amd64_relocate_instruction): New. (amd64_init_abi): Install it. * i386-tdep.c (append_insns): New. (i386_relocate_instruction): New. (i386_gdbarch_init): Install it. * remote.c (remote_get_noisy_reply): Handle qRelocInsn requests. * gdbarch.h, gdbarch.c: Regenerate. gdb/doc/ 2010-05-26 Pedro Alves <pedro@codesourcery.com> * gdb.texinfo (General Query Packets) <qSupported>: Describe the `qRelocInsn' feature. (Relocate instruction reply packet): New subsection of `Tracepoint Packets'. (Tracepoint Packets): Mention that packets QTDP and QTStart support the qRelocInsn request, and add cross reference to new subsection.
* 2010-05-16 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-05-161-27/+69
| | | | | * remote.c: White space. (process_g_packet): Remove orphan braces.
* * remote.c (remote_query_supported_append): Use reconcat.Pedro Alves2010-05-071-12/+9
| | | | (remote_query_supported): Install a cleanup. Use reconcat.
* * gdbarch.sh (qsupported): Delete.Pedro Alves2010-05-071-4/+0
| | | | | | * gdbarch.h, gdbarch.c: Regenerate. * remote.c (remote_query_supported): Remove use of gdbarch_qsupported.
* * remote.c (clear_threads_parsing_context): New.Pedro Alves2010-05-061-4/+23
| | | | | | (remote_threads_info): Delete unused null_cleanup. Install a cleanup to clear the threads_parsing_context in case parsing throws.
* * remote.c (remote_threads_info): Really revert previous previousPedro Alves2010-05-051-1/+1
| | | | change.
* 2010-05-05 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-05-051-1/+1
| | | | | * remote.c (remote_threads_info): Revert questionable part of the previous change.
* 2010-05-05 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-05-051-4/+2
| | | | | | * remote.c (remote_threads_info): Delete unused variable. (process_stop_reply): Delete unused variable. (remote_get_trace_status): Delete unused variables.
* ARI fix: Remove ATTRIBUTE_UNUSED throughout.Pierre Muller2010-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | * arm-linux-tdep.c (arm_linux_cleanup_svc): Remove ATTRIBUTE_UNUSED. (cleanup_kernel_helper_return): Likewise. * arm-tdep.c (copy_unmodified): Likewise. (copy_preload): Likewise. (copy_copro_load_store): Likewise. (cleanup_branch): Likewise. (copy_b_bl_blx): Likewise. (copy_bx_blx_reg): Likewise. (copy_alu_imm): Likewise. (copy_alu_reg): Likewise. (copy_alu_shifted_reg): Likewise. (cleanup_load): Likewise. (cleanup_store): Likewise. (cleanup_block_load_pc): Likewise. (cleanup_svc): Likewise. (copy_undef): Likewise. (copy_unpred): Likewise. * remote.c (register_remote_support_xml): Likewise.
* * remote.c (register_remote_support_xml)Mark Kettenis2010-05-041-4/+4
| | | | | | | (remote_query_supported_append, remote_query_supported): Add cast to NULL used as sentinel. * tracepoint.c (tvariables_info_1): Likewise. * utils.c (add_internal_problem_command): Likewise.
* * remote.c (remote_notice_signals): New.Pedro Alves2010-05-031-0/+14
| | | | | | (remote_start_remote): In non-stop mode, update the remote end on which signals it can silently pass. (init_remote_ops): Install remote_notice_signals.
* Support for Windows OS Thread Information Block.Pierre Muller2010-04-161-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Document new feature. * remote.c (PACKET_qGetTIBAddr): New enum element. (remote_get_tib_address): New function. (init_remote_ops): Set to_get_tib_address field to remote_get_tib_address. (_initialize_remote): Add add_packet_config_cmd for PACKET_qGetTIBAddr. * target.c (update_current_target): Set default value for new to_get_tib_address field. * target.h (target_ops): New field to_get_tib_address. (target_get_tib_address): New macro. * windows-nat.c (thread_info): Add thread_local_base field. (windows_add_thread): Add tlb argument of type 'void *'. (fake_create_process): Adapt windows_add_thread call. (get_windows_debug_event): Idem. (windows_get_tib_address): New function. (init_windows_ops): Set to_get_tib_address field to remote_get_tib_address. (_initialize_windows_nat): Replace info_w32_cmdlist initialization by a call to init_w32_command_list. (info_w32_command, info_w32_cmdlist): Removed from here... to windows-tdep.c file. * windows-tdep.h (info_w32_cmdlist): Declare. (init_w32_command_list): New external function declaration. * windows-tdep.c: Add several headers. (info_w32_cmdlist): to here, made global. (thread_information_32): New struct. (thread_information_64): New struct. (TIB_NAME): New char array. (MAX_TIB32, MAX_TIB64, FULL_TIB_SIZE): New constants. (maint_display_all_tib): New static variable. (windows_get_tlb_type): New function. (tlb_value_read, tlb_value_write): New functions. (tlb_value_funcs): New static struct. (tlb_make_value): New function. (display_one_tib): New function. (display_tib): New function. (show_maint_show_all_tib):New function. (info_w32_command): Moved from windows-nat.c. (init_w32_command_list): New function. (_initialize_windows_tdep): New function. New "maint set/show show-all-tib" command New "$_tlb" internal variable. gdbserver/ChangeLog entry: * server.c (handle_query): Handle 'qGetTIBAddr' query. * target.h (target_ops): New get_tib_address field. * win32-low.h (win32_thread_info): Add thread_local_base field. * win32-low.c (child_add_thread): Add tlb argument. Set thread_local_base field to TLB. (get_child_debug_event): Adapt to child_add_thread change. (win32_get_tib_address): New function. (win32_target_ops): Set get_tib_address field to win32_get_tib_address. * linux-low.c (linux_target_ops): Set get_tib_address field to NULL. doc/ChangeLog entry: gdb.texinfo ($_tlb): Document new automatic convinience variable. (info w32 thread-information-block): Document new command. (qGetTIBAddress): Document new gdbserver query. (maint set/show show-all-tib): Document new command.
* * remote.c (remote_get_noisy_reply): Don't error out on emptyPedro Alves2010-04-131-23/+37
| | | | | | | | | | | | | | | | | replies. (remote_start_remote): Update and merge tracepoints and trace state variables as long as the target supports tracepoints. (remote_trace_init): Fix prototype. (remote_download_trace_state_variable): Validate reply. (remote_trace_set_readonly_regions): Fix prototype. (remote_trace_start): Fix prototype. Check for empty reply. (remote_get_trace_status): Small cleanup. (remote_trace_stop): Fix prototype. Check for empty reply. (remote_trace_find): Check for empty reply. (remote_save_trace_data): Validate reply. (remote_set_disconnected_tracing): Check for empty reply, and validate reply. (remote_set_circular_trace_buffer): Ditto.
* 2010-04-08 Stan Shebs <stan@codesourcery.com>Stan Shebs2010-04-091-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Pedro Alves <pedro@codesourcery.com> * tracepoint.h (struct trace_status): New fields disconnected_tracing and circular_buffer. (disconnect_tracing): Rename from disconnect_or_stop_tracing. * tracepoint.c (trace_status_command): Display target's status for disconnected tracing and circular buffer. (disconnect_tracing): Rename from disconnect_or_stop_tracing, add query for non-disconnected-tracing case, remove the stop_tracing call. (tfile_open): Clear disconnected and circular buffer status. (trace_save): Save disconnected and circular buffer status. (parse_trace_status): Parse disconnected and circular buffer status, also recognize disconnected as a stop reason. * remote.c (remote_set_disconnected_tracing): Only set QTDisconnected if the remote end supports disconnected tracing. Warn otherwise, if trying to enable disconnected tracing. * infcmd.c (detach_command): Update disconnect_tracing call. * cli/cli-cmds.c (quit_command): Ditto. * gdb.texinfo (Tracepoint Packets): Describe disconn and circular trace status fields.
* * breakpoint.h (struct counted_command_line): Moved definition toPedro Alves2010-04-021-1/+1
| | | | | | | | | breakpoint.c, and forward declare. (breakpoint_commands): Declare. * breakpoint.c (struct counted_command_line): Moved here. (breakpoint_commands): New. * tracepoint.c (encode_actions): Use breakpoint_commands. * remote.c (remote_download_tracepoint): Ditto.
* Use hex_string instead of phex_nz for error.H.J. Lu2010-04-011-1/+1
| | | | | | | 2010-04-01 H.J. Lu <hongjiu.lu@intel.com> * remote.c (remote_parse_stop_reply): Use hex_string instead of phex_nz for error.
* * src/gdb/remote.c (end_thread): ARI fix: Use xstrdup instead of strdup.Pierre Muller2010-03-311-1/+1
|
* Add xmlRegisters= to qSupported packet.H.J. Lu2010-03-301-12/+62
| | | | | | | | | | | | | | | | | | | | | | | | gdb/ 2010-03-30 H.J. Lu <hongjiu.lu@intel.com> * NEWS: Mention xmlRegisters= in qSupported packet. * i386-tdep.c: Include "remote.h". (_initialize_i386_tdep): Call register_remote_support_xml. * remote.c (remote_support_xml): New. (register_remote_support_xml): Likewise. (remote_query_supported_append): Likewise. (remote_query_supported): Support remote_support_xml. * remote.h (register_remote_support_xml): New. gdb/doc/ 2010-03-30 H.J. Lu <hongjiu.lu@intel.com> * gdb.texinfo (General Query Packets): Add xmlRegisters.
* 2010-03-29 Stan Shebs <stan@codesourcery.com>Stan Shebs2010-03-291-8/+81
| | | | | | | | | | | | | | | | | | | * tracepoint.h (struct uploaded_string): New struct. (struct uploaded_tp): New fields for source strings. * breakpoint.c (this_utp, next_cmd): New globals. (read_uploaded_action): New function. (create_tracepoint_from_upload): Fill in more parts of a tracepoint. * tracepoint.c (encode_source_string): New function. (trace_save): Write out source strings, fix error checks. (parse_tracepoint_definition): Add source string parsing. * remote.c (PACKET_TracepointSource): New packet type. (remote_download_command_source): New function. (remote_download_tracepoint): Download source pieces also. (_initialize_remote): Add packet config command. * gdb.texinfo (Tracepoint Packets): Describe QTDPsrc. (General Query Packets): Describe TracepointSource.
* gdb/Pedro Alves2010-03-241-31/+40
| | | | | | | | | | | * remote.c (crc32): Constify `buf' parameter. (remote_verify_memory): New, abstracted out from... (compare_sections_command): ... this. Remove hardcoded target checks. (init_remote_ops): Install remote_verify_memory. * target.c (target_verify_memory): New. * target.h (struct target_ops) <to_verify_memory>: New field. (target_verify_memory): Declare.
* Implement -trace-save.Vladimir Prus2010-03-231-1/+1
| | | | | | | | | | | | | | | * mi-cmds.h (mi_cmds_trace_save): Declare. * mi-cmds.c (mi_cmds): Register -trace-save. * mi/mi-main.c (mi_cmd_trace_save): New. * remote.c (remote_save_trace_data): Take const parameter. * target.h (struct target_ops::to_save_trace_data): Take const parameter. * target.c (update_current_target): Adjust to the above. * tracepoint.c (trave_save): New, extracted from (trace_save_command): ...this. (tfile_trace_find): Remove message that is unnecessary now that 'tfind' reports found frame. * tracepoint.h (trace_save): Declare.