aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-09-02 * win32-low.c (child_xfer_memory): Check if ReadProcessMemoryPierre Muller2-6/+21
or WriteProcessMemory complete successfully and handle ERROR_PARTIAL_COPY error.
2013-09-02server.c:gdb_read_memory: Fix error return.Pedro Alves2-1/+6
When I added gdb_read_memory, with bits factored out from elsewhere, I missed adjusting this error return. gdb_read_memory has an interface similar to Like GDB's xfer_partial: > /* Read trace frame or inferior memory. Returns the number of bytes > actually read, zero when no further transfer is possible, and -1 on > error. Return of a positive value smaller than LEN does not > indicate there's no more to be read, only the end of the transfer. Returning EIO, a positive value, is obviously bogus, for the caller will confuse it with a successful partial transfer. Found by inspection. Tested on x86_64 Fedora 17. gdb/gdbserver/ 2013-09-02 Pedro Alves <palves@redhat.com> * server.c (gdb_read_memory): Return -1 on traceframe memory read error instead of EIO.
2013-09-02 Fix small indentation error in last commitPierre Muller1-2/+2
2013-09-02 * windows-nat.c (windows_xfer_memory): Handle ERROR_PARTIAL_COPYPierre Muller2-1/+14
error code.
2013-09-02 * windows-nat.c (windows_xfer_memory): Fix compilation failurePierre Muller2-4/+9
by use of plongest function.
2013-09-022013-09-02 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>Andreas Krebbel2-3/+9
* s390-opc.txt: Fix description for fiebra, fidbra, and fixbra. For the load fp integer instructions only the suppression flag was new with z196 version.
2013-09-022013-09-02 Tristan Gingold <gingold@adacore.com>Tristan Gingold3-1/+788
* NEWS: Add entry mentioning support for native Windows x64 SEH data. * amd64-windows-tdep.c: #include "objfiles.h", "frame-unwind.h", "coff/internal.h", "coff/i386.h", "coff/pe.h" and "libcoff.h". (struct amd64_windows_frame_cache): New struct. (amd64_windows_w2gdb_regnum): New global. (pc_in_range, amd64_windows_frame_decode_epilogue) (amd64_windows_frame_decode_insns, amd64_windows_find_unwind_info) (amd64_windows_frame_cache, amd64_windows_frame_prev_register) (amd64_windows_frame_this_id): New functions. (amd64_windows_frame_unwind): New static global. (amd64_windows_skip_prologue): New function. (amd64_windows_init_abi): Call frame_unwind_prepend_unwinder with amd64_windows_frame_unwind. Call set_gdbarch_skip_prologue with amd64_windows_skip_prologue.
2013-09-02daily updateAlan Modra1-1/+1
2013-09-01daily updateAlan Modra1-1/+1
2013-08-312013-08-31 John David Anglin <dave.anglin@bell.net>Dave Anglin2-1/+6
* elf64-hppa.c (elf_hppa_final_link_relocate): Add missing '%' to format string.
2013-08-31daily updateAlan Modra1-1/+1
2013-08-30GDB 7.6.1 released.gdbadmin1-0/+4
2013-08-30gdb.base/code_elim.exp - force .bss creation.Andrew Burgess2-1/+14
https://sourceware.org/ml/gdb-patches/2013-08/msg00920.html gdb/ChangeLog * gdb.base/code_elim1.c (my_bss_symbol): New variable added. (my_static_symbol): Add comment. (main): Reference my_bss_symbol.
2013-08-30MI -trace-find, print frame with LOC_AND_ADDRESS instead of SRC_AND_LOC.Pedro Alves2-1/+6
When I looked for print_stack_frame calls in MI, I wondered why this one passing down SRC_AND_LOC. print_stack_frame does: /* For mi, alway print location and address. */ if (ui_out_is_mi_like_p (current_uiout)) print_what = LOC_AND_ADDRESS; So it really doesn't matter which value is passed down, but, to avoid confusion in readers, it's better to use the MI standard here. There's another SRC_AND_LOC in mi-interp.c, but that one makes sense. gdb/ 2013-08-30 Pedro Alves <palves@redhat.com> * mi/mi-main.c (mi_cmd_trace_find): Use LOC_AND_ADDRESS instead of SRC_AND_LOC.
2013-08-30restore_selected_frame: tweak warning.Pedro Alves2-2/+7
I noticed SRC_LINE has special handling within print_stack_frame (mid statement handling), so I audited all uses, and noticed the one in restore_selected_frame. I actually added this warning myself back in 2008, but reading back, I think we can do better. "reparsed frame" is probably confusing to users. Old: warning: Couldn't restore frame #2 in current thread, at reparsed frame #0 45 w = 0; (gdb) New: warning: Couldn't restore frame #2 in current thread. Bottom (innermost) frame selected: #0 foo () at foo.c:45 45 w = 0; (gdb) Tested on x86_64 Fedora 17. gdb/ 2013-08-30 Pedro Alves <palves@redhat.com> * thread.c (restore_selected_frame): Use SRC_AND_LOC, and change warning text.
2013-08-30bsd-kvm.c: Fix arguments to print_stack_frame.Pedro Alves2-3/+8
1 is SRC_AND_LOC. Then, this is passing -1 as print_level argument to print_stack_frame. -1 is not a valid print_level value (it's a regular boolean). But, it used to be, before <https://sourceware.org/ml/gdb-patches/2004-04/msg00585.html>. What happened is that bsd-kvm.c did not exist at the time of that patch, but went into the tree about a month after, without being adjusted to the new interface. Fixed now, exactly as e.g., ocd.c had been adjusted: > --- ocd.c 18 Jan 2004 19:26:51 -0000 1.28 > +++ ocd.c 23 Apr 2004 14:29:12 -0000 > @@ -225,7 +225,7 @@ > flush_cached_frames (); > registers_changed (); > stop_pc = read_pc (); > - print_stack_frame (get_selected_frame (), -1, 1); > + print_stack_frame (get_selected_frame (), 0, SRC_AND_LOC); gdb/ 2013-08-30 Pedro Alves <palves@redhat.com> * bsd-kvm.c (bsd_kvm_open, bsd_kvm_proc_cmd, bsd_kvm_pcb_cmd): Adjust arguments to print_stack_frame.
2013-08-30ada-tasks.c: write SRC_AND_LOC instead '1'.Pedro Alves2-1/+6
1 is SRC_AND_LOC. 2013-08-30 Pedro Alves <palves@redhat.com> * ada-tasks.c (task_command_1): Write SRC_AND_LOC instead '1'.
2013-08-30frame.h: Delete stale declaration.Pedro Alves2-3/+4
This is declaring a function that no longer exists. It was deleted back in 2003-01-13: ... show_and_print_stack_frame, print_only_stack_frame_stub, print_only_stack_frame): Delete functions. gdb/ 2013-08-30 Pedro Alves <palves@redhat.com> * frame.h (show_and_print_stack_frame): Delete declaration.
2013-08-302013-08-30 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon4-4/+43
PR python/15461 * python/py-arch.c (ARCHPY_REQUIRE_VALID): New macro. (archpy_name): Check for valid architecture. (archpy_disassemble): Ditto. 2013-08-30 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-arch.exp: Tests for invalid architecture.
2013-08-30daily updateAlan Modra1-1/+1
2013-08-29thread support broken on ppc-aix.Joel Brobecker2-1/+6
Thread support got broken when adding 64bit support on ppc-aix. Upon digging further, I found that the following patch... | * gdb_ptrace.h: Use ptrace64 instead of ptrace if HAVE_PTRACE64 | is defined. | * rs6000-nat.c: Check for __ld_info64_ if compiling 64 BIT gdb. | (rs6000_ptrace32): Call ptrace64 instead of ptrace if present. | (rs6000_ptrace64): Call ptace64 instead of ptracex if present. | * configure.ac: Check for ptrace64. | * configure, config.in: Regenerate. ... is responsible for this regression: (gdb) x /x &__n_pthreads 0xf06a8258 <__n_pthreads>: Cannot access memory at address 0xf06a8258 Prior to the patch, we have: (gdb) x /x &__n_pthreads 0xf06a8258 <__n_pthreads>: 0x00000003 The problem occurs inside rs6000_ptrace32, while calling ptrace64. The address is given to rs6000_ptrace32 as an "int *", while ptrace64 takes a "long long". The cast causes the address to be sign-extended, which results in GDB trying to read the wrong address. This patch fixes the issue by casting the address to a "uintptr_t" instead, and letting the compiler do the implicit conversion to "long long" in the function call. gdb/ChangeLog: * rs6000-nat.c (rs6000_ptrace32): Cast "addr" to "uintptr_t" instead of "long long" in call to ptrace64.
2013-08-292013-08-29 Sterling Augustine <saugustine@google.com>Sterling Augustine2-6/+15
* boards/remote-stdio-gdbserver.exp: Set rcp_prog and rsh_prog in new conditional. Move use of REMOTE_PORTNUM into said conditional.
2013-08-29Remove use of deprecated_command_loop_hook from mi code.Andrew Burgess2-35/+16
https://sourceware.org/ml/gdb-patches/2013-08/msg00605.html gdb/ChangeLog * mi/mi-interp.c (mi_command_loop): Change signature to match interp_command_loop_ftype. (mi1_command_loop): Remove. (mi2_command_loop): Remove. (mi3_command_loop): Remove. (mi_interpreter_resume): Remove setting of deprecated_command_loop_hook. (_initialize_mi_interp): Set mi_command_loop as the command loop callback.
2013-08-292013-08-29 Sanimir Agovic <sanimir.agovic@intel.com>Sanimir Agovic2-1/+6
* valops.c (do_search_struct_field): Pass v2 instead of base_type to value_type.
2013-08-29cleanup: make allocate_value_contents staticSanimir Agovic3-2/+6
2013-08-29 Sanimir Agovic <sanimir.agovic@intel.com> * value.c (allocate_value_contents): Make static. * value.h (allocate_value_contents): Remove prototype.
2013-08-29cleanup: use value_lazy_at instead of allocate_value_lazy/attribute setterSanimir Agovic4-16/+13
I came across a pattern used to construct a value in the following way: struct value *val = allocate_value_lazy (type); VALUE_LVAL (val) = lval_memory; set_value_address (val, address); Instead we fold the above call into: value_at_lazy (type, addr); 2013-08-27 Sanimir Agovic <sanimir.agovic@intel.com> * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use value_at_lazy instead of assembling value via allocate_value_lazy and attribute setter. * findvar.c (default_read_var_value): Use value_at_lazy instead of assembling value via allocate_value_lazy and attribute setter. * valops.c (do_search_struct_field): Use value_at_lazy instead of assembling value via allocate_value_lazy and attribute setter.
2013-08-29cleanup: replace allocate_value and memcpy with value_from_contentsSanimir Agovic2-4/+6
2013-08-29 Sanimir Agovic <sanimir.agovic@intel.com> * value.c (value_from_contents_and_address): Replace allocate_value and memcpy with value_from_contents.
2013-08-29 * elf64-x86-64.c (elf_x86_64_check_tls_transition): AllowJakub Jelinek14-32/+546
64-bit -mcmodel=large -fpic TLS GD and LD sequences. (elf_x86_64_relocate_section): Handle -mcmodel=large -fpic TLS GD and LD sequences in GD->LE, GD->IE and LD->LE transitions. ld/testsuite/ * ld-x86-64/x86-64.exp: Add tlsld3, tlsgd7 and tlsgd8 tests. * ld-x86-64/tlspic1.s: Add -mcmodel=large -fpic TLS GD and LD sequences. * ld-x86-64/tlspic.dd: Adjusted. * ld-x86-64/tlspic.rd: Adjusted. * ld-x86-64/tlspic-nacl.rd: Adjusted. * ld-x86-64/tlsld3.dd: New test. * ld-x86-64/tlsld3.s: New file. * ld-x86-64/tlsgd7.dd: New test. * ld-x86-64/tlsgd7.s: New file. * ld-x86-64/tlsgd8.dd: New test. * ld-x86-64/tlsgd8.s: New file.
2013-08-292013-08-29 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon2-1/+5
* gdb.python/py-arch.exp: Load gdb-python.exp.
2013-08-292013-08-29 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon13-49/+116
* python/py-framefilter.c (py_print_frame): Remove usage of PyString_AsString. Use python_string_to_host_string instead. Refactor function to work with a string as a new allocation instead of a pointer. (py_print_frame): Ditto. * python/lib/gdb/frames.py (return_list): Cain iterators together instead of adding them as a list. (_sort_list): Call return_list, and remove duplicate code. (execute_frame_filters): Convert iterator to a list with list(). * python/lib/gdb/command/frame_filters.py (SetFrameFilterPriority._set_filter_priority): Convert priority attribute to an integer. * python/lib/gdb/FrameIterator.py (FrameIterator.next): Define wrapper function __next__. * python/lib/gdb/FrameDecorator.py: If basestring not defined, define as "str". 2013-08-29 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-framefilter.py (FrameFilter.filter): Check itertools for imap attribute. Otherwise use map(). (ElidingIterator): Define wrapper function __next__. * gdb.python/py-framefilter-mi.exp: Do not use execfile, use exec (open (read ())) instead. * gdb.python/py-framefilter.exp: Ditto. * gdb.python/py-arch.exp: Update print based test to Python 3.x compliance. * gdb.python/py-frame.exp: Ditto. * gdb.python/py-type.exp: Ditto.
2013-08-292013-08-29 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon1-2/+0
* ChangeLog: Remove blank lines between PR and ChangeLog description.
2013-08-292013-08-29 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon2-1/+31
PR python/15752 * python/py-framefilter.c (apply_frame_filter): Check gdb_python_initialized. Exit if the Python frame-filter code cannot be initialized.
2013-08-292013-08-29 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon2-1/+8
PR cli/15842 * top.c (print_gdb_version): Remove erroneous newline after help text.
2013-08-29gdb/Yao Qi2-2/+7
* varobj.c (install_dynamic_child): Remove trailing space. Add one blank line after variable declaration.
2013-08-29daily updateAlan Modra1-1/+1
2013-08-28PR gdb/15415Jan Kratochvil13-28/+168
gdb/ 2013-08-27 Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/15415 * corefile.c (get_exec_file): Use exec_filename. * defs.h (OPF_DISABLE_REALPATH): New definition. Add new comment. * exec.c (exec_close): Free EXEC_FILENAME. (exec_file_attach): New variable canonical_pathname. Use OPF_DISABLE_REALPATH. Call gdb_realpath explicitly. Set EXEC_FILENAME. * exec.h (exec_filename): New. * inferior.c (print_inferior, inferior_command): Use PSPACE_EXEC_FILENAME. * mi/mi-main.c (print_one_inferior): Likewise. * progspace.c (clone_program_space, print_program_space): Likewise. * progspace.h (struct program_space): New field pspace_exec_filename. * source.c (openp): Describe OPF_DISABLE_REALPATH. New variable realpath_fptr, initialize it from OPF_DISABLE_REALPATH, use it. gdb/testsuite/ 2013-08-27 Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/15415 * gdb.base/argv0-symlink.c: New file. * gdb.base/argv0-symlink.exp: New file.
2013-08-28PR server/15604Jan Kratochvil5-0/+24
gdb/gdbserver/ 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com> PR server/15604 * linux-low.c: Include filestuff.h. (linux_create_inferior) <pid == 0>: Call close_most_fds. * lynx-low.c: Include filestuff.h. (lynx_create_inferior) <pid == 0>: Call close_most_fds. * server.c: Include filestuff.h. (main): Call notice_open_fds. * spu-low.c: Include filestuff.h. (spu_create_inferior) <pid == 0>: Call close_most_fds.
2013-08-28 * gdb.dwarf2/gdb-index.exp (add_gdb_index): Use explicit test nameTom Tromey2-1/+7
when saving index.
2013-08-28gdb/common/linux-ptrace.c: Fix build on non-Intel architectures.Will Newton2-1/+6
As uintptr_t is used stdint.h must be included on all architectures. 2013-08-28 Will Newton <will.newton@linaro.org> * common/linux-ptrace.c: Include stdint.h unconditionally.
2013-08-28gdb/Jan Kratochvil2-1/+6
Code cleanup. * nto-tdep.c (nto_find_and_open_solib): Use OPF_TRY_CWD_FIRST.
2013-08-28gdb/Yao Qi5-2/+79
* event-top.c (gdb_setup_readline): Call stderr_fileopen instead of stdio_fileopen. * main.c (captured_main) [__MINGW32__]: Set stderr unbuffered. .Call stderr_fileopen instead of stdio_fileopen. * ui-file.c [__MINGW32__] (stderr_file_write): New function. [__MINGW32__] (stderr_file_fputs): New function. (stderr_fileopen): New function. * ui-file.h (stderr_fileopen): Declare.
2013-08-28 * aarch64-opc.c (aarch64_logical_immediate_p): Return FALSE if theNick Clifton5-2/+18
immediate is not suitable for the 32-bit ABI. * gas/aarch64/illegal.s: Add illegal constant for logical operation. * gas/aarch64/illegal.l: Add expected error message.
2013-08-28 PR ld/15896Nick Clifton2-2/+7
* ld.texinfo: Fix uses of MB abbreviation.
2013-08-28daily updateAlan Modra1-1/+1
2013-08-27gold/Roland McGrath5-149/+252
* output.cc (Output_segment::set_section_addresses): Take new Target* argument. If target->isolate_execinstr() and the segment is executable and starts at a target->abi_pagesize() boundary, pad its end out to a target->abi_pagesize() boundary with code fill. * output.h (Output_segment::set_section_addresses): Update decl. * layout.h (Layout::check_output_data_for_reset_values): Take new argument RELAX_OUTPUTS. (Layout): New member relax_output_list_. (Layout::add_relax_output): New method. * layout.cc (Layout::Layout): Update constructor. (Layout::reset_relax_output): New method. (Layout::clean_up_after_relaxation): Call it. (Layout::prepare_for_relaxation): Update caller. (Layout::set_segment_offsets): Update callers of set_section_addresses. Call reset_relax_output before re-processing segments for isolate_execinstr case. (Layout::write_data): Handle relax_output_list_. (Layout::Relaxation_debug_check::check_output_data_for_reset_values): Take new argument RELAX_OUTPUTS. Assert it's an empty collection.
2013-08-27 * dwarf2read.c (struct dwarf2_cu): Tweak comment.Doug Evans2-10/+17
(struct dwarf2_per_cu_data): Ditto. (maybe_queue_comp_unit): Delete forward decl. Add comment. (process_imported_unit_die): Ditto. (follow_die_sig_1): Simplify assert.
2013-08-27 PR binutils/15796Nick Clifton2-0/+24
* ar.c (map_over_members): Correctly handle multiple same-name entries on the command line and in the archive.
2013-08-27windows-nat.c: Don't install a deprecated_xfer_memory method.Pedro Alves2-22/+25
This stops another target from installing a target_ops->deprecated_xfer_memory method. Tested on native MinGW. gdb/ 2013-08-27 Pedro Alves <palves@redhat.com> * windows-nat.c (windows_xfer_memory): Adjust prototype to follow xfer_partial's interface. Return TARGET_XFER_E_IO on error. (windows_xfer_partial): Defer TARGET_OBJECT_MEMORY handling to windows_xfer_memory directly. (init_windows_ops): Don't install a deprecated_xfer_memory method.
2013-08-27darwin-nat.c: Don't install a deprecated_xfer_memory method.Pedro Alves2-21/+6
darwin_xfer_partial already handles TARGET_OBJECT_MEMORY, so this method is not necessary. gdb/ 2013-08-27 Pedro Alves <palves@redhat.com> * darwin-nat.c (darwin_xfer_memory): Delete. (_initialize_darwin_inferior): Don't install a deprecated_xfer_memory method.
2013-08-27Add options to skip unavailable localsYao Qi12-27/+157
This is the patch to add new option '--skip-unavailable' to MI commands '-stack-list-{locals, arguments, variables}'. This patch extends list_args_or_locals to add a new parameter 'skip_unavailable', and don't list locals or arguments if values are unavailable and 'skip_unavailable' is true. This is inspecting a trace frame (tfind mode), where only a few locals have been collected. -stack-list-locals, no switch vs new switch: -stack-list-locals --simple-values ^done,locals=[{name="array",type="unsigned char [2]"},{name="i",type="int",value="<unavailable>"}] -stack-list-locals --skip-unavailable --simple-values ^done,locals=[{name="array",type="unsigned char [2]"}] -stack-list-arguments, no switch vs new switch: -stack-list-arguments --simple-values ^done,stack-args=[frame={level="0",args=[{name="j",type="int",value="4"},{name="s",type="char *",value="<unavailable>"}]},frame={level="1",args=[]}] -stack-list-arguments --skip-unavailable --simple-values ^done,stack-args=[frame={level="0",args=[{name="j",type="int",value="4"}]},frame={level="1",args=[]}] -stack-list-variables, no switch vs new switch: -stack-list-variables --simple-values ^done,variables=[{name="j",arg="1",type="int",value="4"},{name="s",arg="1",type="char *",value="<unavailable>"},{name="array",type="unsigned char [2]"},{name="i",type="int",value="<unavailable>"}] -stack-list-variables --skip-unavailable --simple-values ^done,variables=[{name="j",arg="1",type="int",value="4"},{name="array",type="unsigned char [2]"}] tests are added to test these new options. gdb: 2013-08-27 Pedro Alves <pedro@codesourcery.com> Yao Qi <yao@codesourcery.com> * mi/mi-cmd-stack.c (list_args_or_locals): Adjust prototype. (parse_no_frames_option): Remove. (mi_cmd_stack_list_locals): Handle --skip-unavailable. (mi_cmd_stack_list_args): Adjust. (mi_cmd_stack_list_variables): Handle --skip-unavailable. (list_arg_or_local): Add new parameter 'skip_unavailable'. Return early if SKIP_UNAVAILABLE is true and ARG->val is unavailable. Caller update. (list_args_or_locals): New parameter 'skip_unavailable'. Handle it. * valprint.c (scalar_type_p): Rename to ... (val_print_scalar_type_p): ... this. Make extern. (val_print, value_check_printable): Adjust. * valprint.h (val_print_scalar_type_p): Declare. * value.c (value_entirely_unavailable): New function. * value.h (value_entirely_unavailable): Declare. * NEWS: Mention the new option "--skip-unavailable" to MI commands '-stack-list-locals', '-stack-list-arguments' and '-stack-list-variables'. gdb/doc: 2013-08-27 Pedro Alves <pedro@codesourcery.com> Yao Qi <yao@codesourcery.com> * gdb.texinfo (GDB/MI Stack Manipulation) <-stack-list-locals>: Document new --skip-unavailable option. <-stack-list-variables>: Document new --skip-unavailable option. gdb/testsuite: 2013-08-27 Yao Qi <yao@codesourcery.com> * gdb.trace/entry-values.exp: Test unavailable entry value is not shown when option '--skip-unavailable' is specified. * gdb.trace/mi-trace-unavailable.exp (test_trace_unavailable): Add tests for new option '--skip-unavailable'.