aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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-18Re-indent INIT_ARRAY.H.J. Lu2-4/+8
2010-03-18 H.J. Lu <hongjiu.lu@intel.com> * scripttempl/elf.sc (INIT_ARRAY): Re-indent.
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-18Reformat.H.J. Lu1-1/+1
2010-03-18 * infcmd.c (finish_command_continuation): Wrap print_return_valueTom Tromey2-1/+18
in TRY_CATCH.
2010-03-18Avoid buffer overflow.H.J. Lu2-2/+6
2010-03-18 H.J. Lu <hongjiu.lu@intel.com> * readelf.c (decode_arm_unwind): Increase buf size to 9 byte.
2010-03-18Fix last checkinStan Shebs1-1/+1
2010-03-18 * doc/c-arm.texi (.setfp): Correct example.Daniel Jacobowitz2-2/+6
2010-03-18Move ChangeLog entries to proper place.H.J. Lu2-9/+9
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-18 PR ld/11384Nick Clifton2-0/+8
* emultempl/sh64elf.em: Add missing EOF.
2010-03-18Don't add IMAGE_FILE_RELOCS_STRIPPED for PIE.H.J. Lu4-1/+24
2010-03-18 H.J. Lu <hongjiu.lu@intel.com> PR binutils/11396 * libcoff-in.h (pe_tdata): Add dont_strip_reloc. * libcoff.h: Regenerated. * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG if dont_strip_reloc is set. (_bfd_XX_bfd_copy_private_bfd_data_common): Set dont_strip_reloc on output if there is no .reloc and IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
2010-03-18bfd/Nick Clifton11-4/+82
2010-03-15 Wei Guozhi <carrot@google.com> PR gas/11323 * bfd-in2.h (enum bfd_reloc_code_real): New BFD_RELOC_GOT_PREL type. * elf32-arm.c (elf32_arm_reloc_map): BFD_RELOC_GOT_PREL to R_ARM_GOT_PREL map. * libbfd.h (bfd_reloc_code_real_names): BFD_RELOC_GOT_PREL name. * reloc.c (comments): Document the new relocation. gas/ 2010-03-15 Wei Guozhi <carrot@google.com> PR gas/11323 * config/tc-arm.c (reloc_names): New relocation names. (md_apply_fix): New case for BFD_RELOC_ARM_GOT_PREL. (tc_gen_reloc): New case for BFD_RELOC_ARM_GOT_PREL. * doc/c-arm.texi (ARM-Relocations): Document the new relocation. gas/testsuite 2010-03-15 Wei Guozhi <carrot@google.com> PR gas/11323 * gas/arm/got_prel.s: New test case. * gas/arm/got_prel.d: Likewise.
2010-03-18 * pe-dll.c (make_one): Make text section readonly.Nick Clifton2-3/+14
(make_one): Add *ABS* symbol @feat.00 with value 1 to tag the jump stub on X86 as /SAFESEH compatible for native toolchains.
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-17Run list-1, list-2 and list-3 only for ELF tagets.H.J. Lu2-3/+10
2010-03-17 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run list-1, list-2 and list-3 only for ELF tagets.
2010-03-17daily updateAlan Modra1-1/+1
2010-03-17Revert accidental changes.H.J. Lu2-4/+5
2010-03-17 H.J. Lu <hongjiu.lu@intel.com> * reloc.c (BFD_RELOC_SPU_PIC18): Removed. (BFD_RELOC_SPU_STUB): Likewise.
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-17Avoid overflow.H.J. Lu2-1/+6
2010-03-17 Jie Zhang <jie@codesourcery.com> * elf.c (assign_file_positions_for_load_sections): Avoid overflow.
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 * plugin.c (bfd_plugin_object_p): Pass iostream to fileno usingAlan Modra2-2/+7
proper type.
2010-03-17rename filesAlan Modra2-0/+0
2010-03-17 * ldlang.c (lang_size_sections_1): Remove "s" param. Set "s" fromAlan Modra2-13/+16
*prev instead. Update all callers.
2010-03-17warning fixesAlan Modra4-2/+10
2010-03-17*** empty log message ***gdbadmin1-1/+1
2010-03-16daily updateAlan Modra1-1/+1
2010-03-16sim: avoid TRACE redefine warningsMike Frysinger3-16/+13
The common code sets up an autoconf option --enable-sim-trace which adds -DTRACE= to CPPFLAGS. This causes warnings in the building of some files that declare a local TRACE() helper macro. So punt it from hw-ports.c (since it isn't actually used) and convert hw-properties.c to HW_TRACE().
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-162010-03-16 Segher Boessenkool <segher@kernel.crashing.org>Segher Boessenkool2-0/+7
* gmon_io.c (gmon_out_read): Close file when done.
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.
2010-03-162010-03-16 Holger Hans Peter Freyther <zecke@selfish.org>Hui Zhu2-2/+6
* linux-record.c (record_linux_msghdr): Remove unintended semicolons.
2010-03-16Add missing newline.Daniel Jacobowitz1-1/+1
2010-03-16 * ldlang.c (lang_insert_orphan): Place loadable orphans in the sameDaniel Jacobowitz6-1/+58
region and phdrs as their placement section. testsuite/ * ld-elf/orphan-region.d, ld-elf/orphan-region.ld, ld-elf/orphan-region.s: New files.
2010-03-16 * MAINTAINERS: Update my email address. List Tristan GingoldDaniel Jacobowitz2-3/+8
as the release branch maintainer.
2010-03-16 * MAINTAINERS: Update my email address.Daniel Jacobowitz2-5/+9
2010-03-16 Simplify MI breakpoint setting.Vladimir Prus4-139/+115
* breakpoint.c (break_command_really): Make nonstatic and rename to... (create_breakpoint): ...this. Rename prior function by this name to... (create_breakpoint_sal): ...this. (create_breakpoints): Rename to... (create_breakpoints_sal): ...this. (set_breakpoint): Remove. * breakpoint.h: Adjust to above changes. * mi/mi-cmd-break.c (mi_cmd_break_insert): Simplify.
2010-03-162010-03-15 Doug Kwan <dougkwan@google.com>Doug Kwan3-33/+74
* stringpool.cc (Stringpool_template::Stringpool_template): Initialize offset_. (Stringpool_template::new_key_offset): New method. (Stringpool_template::add_string): Assign offsets when adding new strings. (Stringpool_template::set_string_offsets): Do not set string offsets when not optimizing. * stringpool.h (Chunked_vector::Chunked_vector): Initialize data member size_. (Chunked_vector::clear): Clear size_. (Chunked_vector::reserve): Call reserve method of all Element_vectors. (Chunked_vector::size): Return size_. (Chunked_vector::push_back): Use size_ to find insert position. (Chunked_vector::size_): New data member. (Stringpool_template::set_no_zero_null): Assert string set is empty. (Stringpool_template::new_key_offset): New method declaration. (Stringpool_template::offset_): New data member.
2010-03-16Fix a commit snafuStan Shebs1-1/+1
2010-03-16 * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.Alan Modra2-1/+139
(ppc64_elf_edit_toc): Set it here. (ha_reloc_match): New function. (ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
2010-03-16*** empty log message ***gdbadmin1-1/+1
2010-03-152010-03-15 Stan Shebs <stan@codesourcery.com>Stan Shebs2-53/+269
* ax-gdb.c: Include cp-support.h. (find_field): Remove. (gen_primitive_field): New function. (gen_struct_ref_recursive): New function. (gen_struct_ref): Rewrite to call gen_struct_ref_recursive instead of find_field. (gen_static_field): New function. (gen_struct_elt_for_reference): New. (gen_namespace_elt): New. (gen_maybe_namespace_elt): New. (gen_aggregate_elt_ref): New. (gen_expr): Add OP_SCOPE, display opcode name in error message.
2010-03-15daily updateAlan Modra1-1/+1