aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2013-03-07gdb/gdbserver/Yao Qi2-8/+16
* tracepoint.c (cur_action, cur_step_action): Make them unsigned. (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead of -1. (cmd_qtsp): Adjust condition. Do post increment. Set cur_action and cur_step_action back to 0.
2013-03-07 * utils.c (initialize_utils): Improve doc strings of "set/showEli Zaretskii2-7/+19
width", "set/show height", and "set/show pagination".
2013-03-07PR gdb/15236: gdbserver write to linux memory with zero length corrupts stackPedro Alves2-1/+13
PROBLEM: The function linux_write_memory () in linux-low.c allocates a buffer on the stack to hold a copy of the data to be written. register PTRACE_XFER_TYPE *buffer = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE)); "count" is the number of bytes to be written, rounded up to the nearest multiple of sizeof (PTRACE_XFER_TYPE) and allowing for not being an aligned address. The function later uses buffer[0] = ptrace (PTRACE_PEEKTEXT, pid, (PTRACE_ARG3_TYPE) (uintptr_t) addr, 0); The problem is that this function can be called to write zero bytes on an aligned address, for example when receiving an X packet of length 0 (used to test if 8-bit write is supported). Under these circumstances, count can be zero. Since in this case, buffer[0] may never have been allocated, the stack is corrupted and gdbserver may crash. SOLUTION: Writing zero bytes should always succeed. The patch below returns successfully early if the length is zero, so avoiding the stack corruption. Verified on the ARC GDB 7.5.1 port. 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com> PR server/15236 * linux-low.c (linux_write_memory): Return early success if LEN is zero.
2013-03-07 * ax-gdb.c (gen_printf): Make FORMAT const.Keith Seitz5-4/+12
* ax-gdb.h (gen_printf): Likewise. * ax-general.c (ax_string): Make STR const. * ax.h (ax_string): Likewise.
2013-03-07*** empty log message ***gdbadmin1-1/+1
2013-03-06 * elfread.c (elf_symfile_read): Move debugging printf to moreDoug Evans2-3/+8
logical location.
2013-03-06Garbage collect py-utils.c:target_string_to_unicode.Pedro Alves3-14/+6
The strlen in this function looked suspicious, for the function documents that STR is in the target's charset (what if it is utf-32, etc.). On closer inspection, nothing is calling the function, and it's been that way ever since the function was added. gdb/ 2013-03-06 Pedro Alves <palves@redhat.com> * python/py-utils.c (target_string_to_unicode): Delete function. * python/python-internal.h (target_string_to_unicode): Delete declaration.
2013-03-06tstatus.exp: use UNSUPPORTED for optional features that are not supportedPedro Alves2-20/+31
The current tstatus.exp tests shows PASSes if either the target support or not the optional tstatus bits: PASS: gdb.trace/tstatus.exp: tstatus does not report trace stop reason PASS: gdb.trace/tstatus.exp: tstatus reports trace stop reason The former (and any other similar case) should be UNSUPPORTED rather than PASS. That'd make it much easier to spot actually problems with the test (e.g., the one Yao's previous patch addressed), along with regressions and progressions. The "not supported" paths in tstatus.exp explicitly check for output you'd get if the feature wasn't supported, so real unexpected failures will still be caught as FAILs. So now e.g., where we wanted to check if tstatus reports the trace stop reason, and if the target does support it, we get PASS: tstatus reports trace stop reason if the target actually reports what we'd expect if the trace stop reason isn't supported, we get: UNSUPPORTED: tstatus reports trace stop reason and if the target reports something else unexpected, we get: FAIL: tstatus reports trace stop reason That has the added bonus that the test string is always the same and only the test results change (PASS/FAIL/UNSUPPORTED), which makes it easier for testers see regressions, compared to the previous: -PASS: gdb.trace/tstatus.exp: tstatus reports trace stop reason +PASS: gdb.trace/tstatus.exp: tstatus does not report trace stop reason which clearly easily goes by unnoticed, as evidenced by the existing problem Yao's previous patch addressed. Tested on x86_64 Fedora 17. gdb/testsuite/ 2013-03-06 Pedro Alves <palves@redhat.com> * gdb.trace/tstatus.exp (run_trace_experiment): When the target doesn't support the tested optional feature, call "unsupported" with the same test message as the "pass" case, instead of calling "pass" with a different message. Use the same text for the "fail" cases too.
2013-03-06 * linespec.c (get_current_search_block): ARI fix, use (void)Pierre Muller2-1/+6
for empty parameter list.
2013-03-06gdb/testsuite/Yao Qi2-44/+7
* gdb.trace/tstatus.exp: Remove the invocation of gdb_load_shlibs, gdb_compile, clean_restart and runto_main. (test_tracepoints): Don't set fast tracepoint. (top level): Don't check agent library is loaded or not.
2013-03-06gdb/testsuite/Yao Qi2-1/+6
* gdb.trace/tstatus.exp (run_trace_experiment): Escape parentheses by "\\".
2013-03-06*** empty log message ***gdbadmin1-1/+1
2013-03-05 * ada-lang.c (ada_lookup_symbol_list_worker): New function, contentsDoug Evans7-103/+146
of old ada_lookup_symbol_list. In !full_search case, don't search superblocks. (ada_lookup_symbol_list): Delete arg full_search, all callers updated. Call ada_lookup_symbol_list_worker. (ada_iterate_over_symbols): Call ada_lookup_symbol_list_worker. * ada-lang.h (ada_lookup_symbol_list): Update. * language.h (language_defn): Update comment for la_iterate_over_symbols. * linespec.c (iterate_over_file_blocks): New function. (iterate_over_all_matching_symtabs): Call it. (lookup_prefix_sym): Ditto. (get_current_search_block): New function. (get_search_block): Delete. (find_label_symbols): Call get_current_search_block. (add_matching_symbols_to_info): Call iterate_over_file_blocks. * symtab.c (iterate_over_symbols): Don't search superblocks.
2013-03-05Fix ChangeLog entry.Corinna Vinschen1-1/+1
2013-03-05gdb/Yao Qi3-4/+12
* cli/cli-decode.c (add_setshow_zuinteger_unlimited_cmd): Change parameter VAR's type from "unsigned int" to "int". * command.h (var_zuinteger_unlimited): Update its comments. (add_setshow_zuinteger_unlimited_cmd): Update the declaration.
2013-03-05 * NEWS: Mention new target x86_64-*-cygwin*.Corinna Vinschen2-0/+5
2013-03-05 * configure.host: Add x86_64-*-cygwin* as host.Corinna Vinschen6-1/+36
* configure.tgt: Add x86_64-*-cygwin* as target. * config/i386/cygwin64.mh: New file. * gdbserver/configure.srv: Add x86_64-*-cygwin* as target.
2013-03-05*** empty log message ***gdbadmin1-1/+1
2013-03-04gdb/Jan Kratochvil2-1/+5
* linespec.c (decode_line_2): Fix duplicate request off by two message.
2013-03-04gdb/Jan Kratochvil7-49/+285
* linespec.c (struct linespec_canonical_name): New. (struct linespec_state): Change canonical_names type to it. (add_sal_to_sals): Change variable canonical_name to canonical. Change xrealloc element size. Initialize the different CANONICAL fields. (canonical_to_fullform): New. (filter_results): Use it. Add variables canonical, fullform and cleanup. (struct decode_line_2_item, decode_line_2_compare_items): New. (decode_line_2): Remove variables iter and item_names, add variables items and items_count. Modify the code for these new variables. gdb/testsuite/ * gdb.linespec/base/one/thefile.cc (twodup): New. (m): Call it. * gdb.linespec/base/two/thefile.cc (dupname): New. (n): Call it. * gdb.linespec/break-ask.exp: New file. * gdb.linespec/lspec.cc (body_elsewhere): New comment marker.
2013-03-04 * coff-pe-read.c (read_pe_exported_syms): Don't return withoutCorinna Vinschen2-0/+8
calling do_cleanup.
2013-03-042013-03-04 Luis Machado <lgustavo@codesourcery.com>Hui Zhu2-0/+11
* tracepoint.c (build_traceframe_info): Add code for byte order.
2013-03-04*** empty log message ***gdbadmin1-1/+1
2013-03-03*** empty log message ***gdbadmin1-1/+1
2013-03-02Revise ChangeLog comment for recently committed change.Kevin Buettner1-3/+3
2013-03-02 * v850-tdep.c: (v850e2_register_name): (v850e2_reg_names):Kevin Buettner2-27/+42
Revise system register names to match current V850E2M architecture specifications.
2013-03-02 gdb/Jiong Wang2-2/+18
* tilegx-tdep.c (tilegx_analyze_prologue): Limit bundle reading to END_ADDR. (tilegx_skip_prologue): Limit prologue analysis to section end
2013-03-02*** empty log message ***gdbadmin1-1/+1
2013-03-01gdb/Jan Kratochvil2-1/+7
* dwarf2loc.c (call_site_find_chain_1): New variable save_callee_pc, use it.
2013-03-01Use gdb_byte for bytes from the program being debugged.Pedro Alves36-93/+167
gdb_byte should be used for bytes from the program being debugged. We have many places using char or unsigned char instead all over the existing ports, and more ends up added over time due to copy/paste as new code is based on old code. I've greped the tree for "char buf[", and fixed all I found. Tested by building with --enable-targets=all. 2013-03-01 Pedro Alves <palves@redhat.com> Use gdb_byte for bytes from the program being debugged. * arm-tdep.c (arm_store_return_value, arm_get_longjmp_target): Change type of local 'buf' to gdb_byte. * avr-tdep.c (avr_frame_prev_register, avr_push_dummy_call): Likewise. * bfin-tdep.c (bfin_push_dummy_call): Likewise. * cris-tdep.c (cris_sigcontext_addr) (cris_sigtramp_frame_unwind_cache): Likewise. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp) (frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache): Likewise. * frv-tdep.c (frv_pseudo_register_write, frv_analyze_prologue): Likewise. * hppa-hpux-tdep.c (hppa32_hpux_find_global_pointer) (hppa32_hpux_search_dummy_call_sequence) (hppa_hpux_supply_save_state): Likewise. * hppa-linux-tdep.c (insns_match_pattern) (hppa_linux_find_global_pointer): Likewise. * hppa-tdep.c (hppa_in_function_epilogue_p) (skip_prologue_hard_way, hppa_frame_cache): Likewise. * i386-nto-tdep.c (i386nto_sigcontext_addr): Likewise. * i386fbsd-tdep.c (i386fbsd_supply_uthread) (i386fbsd_collect_uthread): Likewise. * ia64-hpux-tdep.c (ia64_hpux_push_dummy_code): Likewise. * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Likewise. * ia64-tdep.c (examine_prologue, ia64_frame_cache) (ia64_frame_prev_register, ia64_sigtramp_frame_cache) (ia64_sigtramp_frame_prev_register, ia64_access_reg) (ia64_access_rse_reg, ia64_libunwind_frame_this_id) (ia64_libunwind_frame_prev_register) (ia64_libunwind_sigtramp_frame_this_id) (ia64_find_global_pointer_from_dynamic_section) (find_extant_func_descr, find_func_descr, ia64_dummy_id) (ia64_unwind_pc): Likewise. * iq2000-tdep.c (iq2000_store_return_value): Likewise. * m68hc11-tdep.c (m68hc11_push_dummy_call) (m68hc11_extract_return_value): Likewise. * m68klinux-nat.c (fetch_register, store_register): Likewise. * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_cr32_write) (mep_get_insn, mep_push_dummy_call): Likewise. * mips-linux-tdep.c (mips_linux_get_longjmp_target) (mips_linux_in_dynsym_stub): Likewise. * mn10300-tdep.c (mep_pseudo_cr32_write): Likewise. * ppc-linux-nat.c (fetch_register, store_register): Likewise. * regcache.c (dump_endian_bytes): Change type of parameter 'buf' to gdb_byte. * remote-mips.c (mips_set_register): Likewise. * remote-sim.c (gdbsim_fetch_register): Likewise. * score-tdep.c (score7_fetch_inst): Change type of parameter 'memblock' and local 'buf' to gdb_byte. (score7_malloc_and_get_memblock): Change return type to gdb_byte. Change type of local 'buf' to gdb_byte. Adjust. (score7_adjust_memblock_ptr): Change type of parameter 'memblock' to gdb_byte**. (score7_analyze_prologue): Change type of 'memblock' and 'memblock_ptr' locals to gdb_byte*. * sh64-tdep.c (sh64_extract_return_value) (sh64_store_return_value): Change type of local 'buf' to gdb_byte. * solib-darwin.c (darwin_current_sos, darwin_read_exec_load_addr): * solib-pa64.c (pa64_solib_create_inferior_hook) (pa64_open_symbol_file_object): Remove local 'buf'. * solib-som.c (som_solib_create_inferior_hook, link_map_start) (som_open_symbol_file_object): Likewise. * solib-spu.c (spu_current_sos): Likewise. * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise. * spu-multiarch.c (parse_spufs_run, spu_fetch_registers) (spu_store_registers): Likewise. * target.c (debug_print_register): Likewise. * tic6x-tdep.c (tic6x_get_longjmp_target): Likewise. * xstormy16-tdep.c (xstormy16_store_return_value) (xstormy16_push_dummy_call, xstormy16_resolve_jmp_table_entry) (xstormy16_find_jmp_table_entry): Likewise.
2013-03-01Revise the commit date of my ChangeLog entry.Jiong Wang1-1/+1
2013-03-01Implement get_longjmp_target for tilegx.Jiong Wang2-0/+29
gdb/ * tilegx-tdep.c (tilegx_get_longjmp_target): New function. (tilegx_gdbarch_init): Install it.
2013-03-01Add missing file from the previous commit.Jiong Wang1-0/+67
(forget to "cvs add" it)
2013-03-01*** empty log message ***gdbadmin1-1/+1
2013-02-28 * python/py-arch.c (archpy_disassemble): Use PyInt_Check andTom Tromey2-3/+8
PyLong_Check.
2013-02-28 * python/py-finishbreakpoint.c (bpfinishpy_init): gcc -Wall lint.Doug Evans3-2/+8
* python/python.c (gdbpy_find_pc_line): Ditto.
2013-02-28 * contrib/excheck.py: New file.Tom Tromey4-0/+515
* contrib/exsummary.py: New file. * contrib/gcc-with-excheck: New file.
2013-02-28 * python/python.c (gdbpy_print_stack): Call begin_line andTom Tromey2-10/+24
fprintf_filtered inside TRY_CATCH.
2013-02-28 * python/python.c (gdbpy_find_pc_line): Call find_pc_lineTom Tromey2-5/+19
inside TRY_CATCH.
2013-02-28 * py-finishbreakpoint.c (bpfinishpy_init): Reorganize to callTom Tromey2-35/+39
frame_object_to_frame_info inside TRY_CATCH.
2013-02-28 * py-block.c (gdbpy_block_for_pc): Call block_for_pc insideTom Tromey2-2/+9
TRY_CATCH.
2013-02-28 * objfiles.h (ALL_PSPACE_OBJFILES): Remove trailing backlash.Tom Tromey2-1/+5
2013-02-28 * configure.ac: Invoke AC_SYS_LARGEFILE.Tom Tromey4-0/+212
* configure, config.in: Rebuild.
2013-02-28 * win32-low.c: Throughout, fix format strings and casts ofCorinna Vinschen2-15/+23
printf-like functions to avoid type related warnings on all platforms. (get_child_debug_event): Print dwDebugEventCode as hex since that's how it's usually documented.
2013-02-28gdb/gdbserver/Yao Qi2-1/+6
* tracepoint.c (cmd_qtbuffer): Call phex_nz instead of pulongest.
2013-02-28gdb/gdbserver/Yao Qi2-140/+181
* gdb.trace/report.exp: Move some code to ... (use_collected_data): New. (top level): Call use_collected_data once on the live target. Save at file of the current trace session, load it with target tfile, and call use_collected_data again.
2013-02-28*** empty log message ***gdbadmin1-1/+1
2013-02-27 * windows-nat.c: Throughout, fix format strings and casts ofCorinna Vinschen2-32/+42
printf-like functions to avoid type related warnings on all platforms. (handle_output_debug_string): Fetch context information address from debug string using string_to_core_addr.
2013-02-27gdb/testsuite/Jan Kratochvil2-0/+6
* gdb.threads/fork-thread-pending.c (main): Add alarm.
2013-02-27gdb/testsuite/Jan Kratochvil2-0/+9
* gdb.base/valgrind-infcall.exp (valgrind_pid): New variable. Add final kill of ${valgrind_pid}.