aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2010-03-23 * gdb.threads/pthreads.c (thread1, thread2, main): Fix printfPedro Alves2-8/+13
format strings and add casts to avoid compiler warnings.
2010-03-232010-03-23 Michael Snyder <msnyder@vmware.com>Michael Snyder2-0/+73
* server.c (crc32): New function. (handle_query): Add handling for 'qCRC:' request.
2010-03-23 * gdb.texinfo (GDB/MI Tracepoint Commands): Document MI tracepointVladimir Prus2-17/+230
commands.
2010-03-23 Implement -trace-save.Vladimir Prus9-30/+92
* 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.
2010-03-23 Implement -trace-find.Vladimir Prus8-16/+155
* mi/mi-cmds.c (mi_cmds): Register -trace-find. * mi/mi-cmds.h (mi_cmd_trace_find): Declare. * mi/mi-main.c (mi_cmd_trace_find): New. * target.h (struct target_ops): Document to_trace_find. * tracepoint.h (tfind_1): Declare. * tracepoint.c (finish_tfind_command): Rename to... (tfind_1): ...this. * remote.c (remote_trace_find): Return -1 if target say there's no frame. Improve error diagnostics.
2010-03-23 -trace-define-variable and -trace-list-variables.Vladimir Prus6-17/+119
* tracepoint.c (create_trace_state_variable): Make private copy of name, as opposed to assuming the pointer lives forever. (tvariables_info_1): New. (tvariables_info): Use the above. * tracepoint.h (create_trace_state_variable, tvariables_info_1): Declare. * mi/mi-cmds.c (mi_cmds): Register -trace-define-variable and -trace-list-variables. * mi/mi-cmds.h (mi_cmd_trace_define_variable) (mi_cmd_trace_list_variables): New. * mi/mi-main.c (mi_cmd_trace_define_variable) (mi_cmd_trace_list_variables): New.
2010-03-23 Implement -break-passcount.Vladimir Prus4-0/+35
* mi/mi-cmd-break.c (mi_cmd_break_passcount): New. * mi/mi-cmds.c (mi_cmds): Register -break-passcount. * mi/mi-cmds.h (mi_cmd_break_passcount): Declare.
2010-03-23 -trace-start/-trace-end/-trace-status.Vladimir Prus6-12/+156
* mi/mi-cmds.c (mi_cmds): Register -trace-start, -trace-status and -trace-stop. * mi/mi-cmds.h (mi_cmd_trace_start, mi_cmd_trace_status) (mi_cmd_trace_stop): Declare. * mi/mi-main.c (mi_cmd_trace_start, mi_cmd_trace_status) (mi_cmd_trace_stop): New. * tracepoint.c (start_tracing): New, extracted from... (trace_start_command): ...this. (trace_status_mi): New. * tracepoint.h (struct trace_status): Document stopping_tracepoint. (start_tracing, stop_tracing, trace_status_mi): Declare.
2010-03-23 Implement creating tracepoints with -break-insert.Vladimir Prus2-2/+16
* mi/mi-cmd-break.c (mi_cmd_break_insert): Handle -a to mean that tracepoint should be created.
2010-03-23 * breakpoint.c (check_no_tracepoint_commands): UseVladimir Prus2-2/+7
current spelling of 'teval'.
2010-03-23Remove conflict marker.Vladimir Prus1-1/+0
2010-03-23 Unify actions and commandsVladimir Prus14-342/+375
* defs.h (read_command_lines, read_command_lines_1): New parameters validator and closure. * tracepoint.h (struct action_line): Remove. * breakpoint.h (struct breakpoint): Remove the 'actions' field. * defs.h (enum command_control_type): New value while_stepping_control. (struct command_line): Add comments. * breakpoint.c (breakoint_is_tracepoint): New. (breakpoint_set_commands): For tracepoints, verify the commands are permissible. (check_tracepoint_commands): New. (commands_command): Require that each new line is validated using check_tracepoint_command, if we set commands for a tracepoint. (create_tracepoint_from_upload): Likewise. (print_one_breakpoint_location): Remove the code to print actions specifically. (tracepoint_save_command): Relay to print_command_lines. * cli/cli-script.c (process_next_line): New parameters validator and closure. Handle 'while-stepping'. Call validator if not null. (read_command_lines, read_command_lines1): Likewise. (recurse_read_control_structure): New parameters validator and closure. Handle while_stepping_control. (print_command_lines): Handle while-stepping. (get_command_line, define_command, document_command): Adjust. * remote.c (remote_download_tracepoint): Adjust. * tracepoint.c (make_cleanup_free_actions, read_actions) (free_actions, do_free_actions_cleanup): Remove. (trace_actions_command): Use read_command_lines. (validate_actionline): Use error in one place. (encode_actions_1): New, extracted from... (encode_actions): ...this. Also use cleanups for exception safety. (trace_dump_command): Adjust. * mi/mi-cmd-break (mi_cmd_break_commands): Validate commands if it's tracepoint.
2010-03-23gdb: fix building with system readlineMike Frysinger2-1/+6
Building gdb with --enable-targets=all and --with-system-readline hits a failure in a few targets all related to the inclusion of some opcodes headers. The usage of the bundled readline results in an -I to the top srcdir, but if that isn't used, then there is no such -I path. A few gdb targets use this implicitly to include opcodes/ source header files. So make sure there is always an explicit -I path to the opcodes/ directory.
2010-03-23 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if thePedro Alves2-1/+10
lwp had been stopped by a watchpoint.
2010-03-23*** empty log message ***gdbadmin1-1/+1
2010-03-22gdb/testsuite/Jan Kratochvil2-4/+9
* dg-extract-results.sh: Sync with GCC HEAD (import r155655, r157175 and r157645).
2010-03-222010-03-22 Stan Shebs <stan@codesourcery.com>Stan Shebs2-9/+8
* value.c (value_static_field): Be lazy about the field's value.
2010-03-222010-03-22 Reid Kleckner <reid@kleckner.net>Tom Tromey2-1/+16
PR gdb/11094 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Add bp_jit_event. (disable_breakpoints_in_shlibs): Likewise.
2010-03-22gdb/testsuite/Jan Kratochvil3-0/+156
* gdb.dwarf2/dw2-empty-namespace.exp, gdb.dwarf2/dw2-empty-namespace.S: New.
2010-03-22 * gdb.python/Makefile.in (EXECUTABLES): Add py-mi.Daniel Jacobowitz3-2/+7
* gdb.python/py-mi.exp (binfile): Rename to py-mi.
2010-03-22 * dwarf2read.c (partial_die_parent_scope): Work around buggyUlrich Weigand2-0/+25
GCC 4.1 debug info generation (GCC PR c++/28460). (determine_prefix): Likewise.
2010-03-22*** empty log message ***gdbadmin1-1/+1
2010-03-21*** empty log message ***gdbadmin1-1/+1
2010-03-20 * tui/tui-disasm.c (tui_get_begin_asm_address): Default toDaniel Jacobowitz3-2/+10
get_current_arch. * tui/tui-layout.c (extract_display_start_addr): Likewise.
2010-03-20*** empty log message ***gdbadmin1-1/+1
2010-03-192010-03-19 Stan Shebs <stan@codesourcery.com>Stan Shebs4-28/+200
* ax-gdb.c (gen_fetch): Handle bool. (gen_usual_unary): Ditto. (gen_cast): Ditto. (gen_equal): New function. (gen_less): New function. (gen_expr_binop_rest): Call them, also return integer type from logical operations. (gen_expr): Ditto. * gdb.trace/ax.exp: New file.
2010-03-19 * jv-lang.c (jv_dynamics_objfile_data_key)Tom Tromey2-23/+90
(jv_type_objfile_data_key): New globals. (class_symtab): Move earlier. (jv_per_objfile_free): New function. (get_dynamics_objfile): Call set_objfile_data. Add 'gdbarch' parameter. Remove ancient #if 1. (add_class_symbol): Remove redundant declaration. (java_lookup_class): Use alloc_type, not alloc_type_arch. (java_link_class_type): Mark as static. Update. (jv_clear_object_type): New function. (set_java_object_type): Likewise. (get_java_object_type): Use set_java_object_type. (is_object_type): Likewise. (_initialize_java_language): Register new objfile keys. (get_java_class_symtab): Add 'gdbarch' parameter. (add_class_symtab_symbol): Update. (type_from_class): Update.
2010-03-192010-03-19 Stan Shebs <stan@codesourcery.com>Stan Shebs2-1/+5
* ax-general.c (ax_const_l): Fix a sizing bug.
2010-03-19 * lib/gdb.exp (gdb_compile_test): Watch for "compiler not installed"Doug Evans2-0/+5
output from gcc.
2010-03-19 * gdb.base/break-interp.exp (prelinkNO): Handle prelink binariesDoug Evans2-1/+6
named /usr/sbin/prelink<foo>.
2010-03-19*** empty log message ***gdbadmin1-1/+1
2010-03-18GDB 7.1 released.gdbadmin1-0/+4
2010-03-182010-03-18 Stan Shebs <stan@codesourcery.com>Stan Shebs12-20/+269
Pedro Alves <pedro@codesourcery.com> * target.h (struct target_ops): New method to_set_circular_trace_buffer. (target_set_circular_trace_buffer): New macro. * target.c (update_current_target): Add to_set_circular_trace_buffer, fix to_set_disconnected_tracing default behavior. * remote.c (remote_set_circular_trace_buffer): New function. (init_remote_ops): Add it to vector. * tracepoint.h (struct trace_status): New field traceframes_created, change buffer_size and buffer_free to int. * tracepoint.c (circular_trace_buffer): New global. (start_tracing): Send values of disconnected tracing and circular trace buffer settings. (set_circular_trace_buffer): New function. (parse_trace_state): Handle total space and frames created. (trace_status_command): Display total space and total frames created. (trace_save): Write out new status values. (parse_trace_status): Set traceframe_count, traceframes_created, buffer_free and buffer_size to -1 by default. (_initialize_tracepoint): New setshow for circular-trace-buffer. * NEWS: Mention the circular trace buffer option. * gdb.texinfo (Starting and Stopping Trace Experiments): Describe circular-trace-buffer. (Tracepoint Packets): Describe QTBuffer, and details of the qTStatus reply. * gdb.trace/circ.exp: Test circular-trace-buffer. * gdb.trace/tfile.exp: Update tstatus test.
2010-03-18[dwarf] Anonymous nested function causes SEGV during psymbol readJoel Brobecker5-5/+335
According to the DWARF3 standard, a function always has a name attribute (Section 3.3 - Subroutine and Entry Point Entries). The only exception is when a DW_AT_abstract_origin attribute is provided, in which case the name may be inherited from the referenced DIE. The problem occured because our compiler generated a subprogram DIE for a nested function where the name attribute was missing (and no abstract-origin either). Our code in add_partial_symbol is not prepared to deal with the situation, and happily just tries to compute the length of the (NULL) function name. This normally cannot happen, because there is already a guard in scan_partial_symbols, where we (silently!) ignore anonymous dies, including anonymous subprograms. Unfortunately, there is a flaw that affects Ada and other languages that allow nested subprograms. For nested subprograms, we do not go through scan_partial_symbols and thus we are missing the name check. This patch adds the name check in the nested subprogram case. It also adds a complaint which is emitted during the psymtab->symtab conversion phase. gdb/ChangeLog: * dwarf2read.c (add_partial_subprogram): Make sure the subprogram DIE has a name before creating the associated partial symbol. (read_func_scope): Emit a complaint if the subprogram does not have a name or when we can't extract the subprogram PC bounds. gdb/testsuite/ChangeLog: * gdb.dwarf2/dw2-anonymous-func.S: New file. * gdb.dwarf2/dw2-anonymous-func.exp: New testcase. Tested on x86_64-linux, no regression. Note that the testcase also verifies that the psymtab->symtab conversion does not crash (this is the purpose of the "list file1.txt:1" test.
2010-03-18 * infcmd.c (finish_command_continuation): Wrap print_return_valueTom Tromey2-1/+18
in TRY_CATCH.
2010-03-18Fix last checkinStan Shebs1-1/+1
2010-03-18ChangeLog:Ulrich Weigand4-4/+11
* mi/mi-main.c (mi_cmd_list_thread_groups): Use get_current_arch instead of selected frame architecture. testsuite/ChangeLog: * gdb.mi/gdb680.exp: Revert 2009-06-17 change.
2010-03-18 gdb/Pedro Alves4-11/+24
* infcmd.c (until_command): Use ERROR_NO_INFERIOR. Ensure there's a valid selected thread, and that it is not running. (advance_command): Ditto. (finish_command): Ditto. gdb/testsuite/ * gdb.base/default.exp: Adjust.
2010-03-182010-03-17 Stan Shebs <stan@codesourcery.com>Stan Shebs2-0/+11
* ax-gdb.c (require_rvalue): Disallow non-scalars.
2010-03-182010-03-17 Stan Shebs <stan@codesourcery.com>Stan Shebs4-2/+42
* infcall.c: Include tracepoint.h. (call_function_by_hand): Disallow calls in tfind mode. * infcmd.c: Include tracepoint.h. (ensure_not_tfind_mode): New function. (continue_1): Call it. (step_1) Ditto. (jump_command): Ditto. (signal_command): Ditto. (advance_command): Ditto. (until_command): Ditto. (finish_command): Ditto. * tracepoint.h (disconnect_or_stop_tracing): Declare.
2010-03-18*** empty log message ***gdbadmin1-1/+1
2010-03-172010-03-17 Stan Shebs <stan@codesourcery.com>Stan Shebs5-66/+210
* ax-gdb.h (struct axs_value): New field optimized_out. (gen_trace_for_var): Add gdbarch argument. * ax-gdb.c (gen_trace_static_fields): New function. (gen_traced_pop): Call it, add gdbarch argument. (gen_trace_for_expr): Update call to it. (gen_trace_for_var): Ditto, and report optimized-out variables. (gen_struct_ref_recursive): Check for optimized-out value. (gen_struct_elt_for_reference): Ditto. (gen_static_field): Pass gdbarch instead of expression, assume optimization if field not found. (gen_var_ref): Set the optimized_out flag. (gen_expr): Error on optimized-out variable. * tracepoint.c (collect_symbol): Handle struct-valued vars as expressions, skip optimized-out variables with computed locations. * dwarf2loc.c (dwarf2_tracepoint_var_ref): Flag instead of erroring out if location expression missing. (loclist_tracepoint_var_ref): Don't error out here.
2010-03-17 * dwarf2read.c (dwarf2_get_section_info): Handle case where noTom Tromey2-0/+15
DWARF data is available.
2010-03-17 * symfile.c (generic_load): Reset breakpoints after loading.Daniel Jacobowitz2-0/+14
2010-03-17 * linux-nat.c (linux_nat_detach): Check debug_linux_nat.Tom Tromey2-4/+9
2010-03-17gdb/Jan Kratochvil2-5/+12
* spu-tdep.c (spu_catch_start): Replace set_breakpoint call with the create_breakpoint call, adjust the parameters.
2010-03-17*** empty log message ***gdbadmin1-1/+1
2010-03-16gdb/Jan Kratochvil3-1/+15
* dwarf2read.c (read_subrange_type): Set TYPE_HIGH_BOUND_UNDEFINED. * valarith.c (value_subscripted_rvalue): Suppress error if TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
2010-03-16Avoid switch to invalid ptid during Ada task switch.Joel Brobecker2-0/+18
This is to prevent an internal error during an Ada task switch. A task switch is simply a thread switch under the hood. What we do is collect the info from the Ada Task Control Block, deduce the associated thread ptid, and then switch to that thread. If the thread ptid computation routine has not been implemented for the target, of if there is a bug, then we end up computing a bogus ptid which GDB does not know about, which eventually leads to an assertion failure: (gdb) task 1 [New Thread 5715] /[...]/gdb/thread.c:595: internal-error: is_thread_state: Assertion `tp' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) When this happens, it's just nicer for the user to print an error message, and cancel the task switch. After this patch is applied, this is what we get: (gdb) task 1 [New Thread 10250] Unable to compute thread ID for task 1. Cannot switch to this task. gdb/ChangeLog: * ada-tasks.c (task_command_1): Check that the task ptid is valid before doing the associated thread switch.
2010-03-16 gdb/gdbserver/Pedro Alves3-0/+52
* server.h (internal_error): Declare. (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define. * utils.c (internal_error): New function.