aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2013-12-13Small style violation fix in ada_array_bound_from_typeJoel Brobecker2-1/+6
gdb/ChangeLog: * ada-lang.c (ada_array_bound_from_type): Remove unwanted space between 'struct type *' and 'arr_type'.
2013-12-122013-12-12 Siva Chandra Reddy <sivachandra@google.com>Siva Chandra10-3/+251
PR python/16113 * NEWS (Python Scripting): Add entry for the new feature and the new attribute of gdb.Field objects. * python/py-type.c (gdbpy_is_field): New function (convert_field): Add 'parent_type' attribute to gdb.Field objects. * python/py-value.c (valpy_getitem): Allow subscript value to be a gdb.Field object. (value_has_field): New function (get_field_flag): New function * python/python-internal.h (gdbpy_is_field): Add declaration. testsuite/ * gdb.python/py-value-cc.cc: Improve test case. * gdb.python/py-value-cc.exp: Add new tests to test usage of gdb.Field objects as subscripts on gdb.Value objects. doc/ * gdb.texinfo (Values From Inferior): Add a note about using gdb.Field objects as subscripts on gdb.Value objects. (Types In Python): Add description about the new attribute "parent_type" of gdb.Field objects.
2013-12-12Add @cindex for section documenting the -list-features GDB/MI command.Joel Brobecker2-0/+6
gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Add @cindex entry for section docuumenting the -list-features GDB/MI command.
2013-12-12breakpoint.c:insert_bp_location: Constify local.Pedro Alves2-3/+8
gdb/ 2013-12-12 Pedro Alves <palves@redhat.com> * breakpoint.c (insert_bp_location): Make 'hw_bp_err_string' local const, and remove casts.
2013-12-12Eliminate UNSUPPORTED_ERROR.Pedro Alves5-24/+32
I have a case that could use an exception for "unsupported feature". I found UNSUPPORTED_ERROR, but looking deeper, I think as is, reusing it for other things would be fragile. E.g., if the Python script sourced by source_script_from_stream triggers any other missing functionality that would result in UNSUPPORTED_ERROR being propagated out to source_script_from_stream, that would confuse the error for Python not being built into GDB. This patch thus redoes things a little. Instead of using an exception for the "No Python" scenario, check whether Python is configured in before actually trying to source the file. It adds a new function instead of using #ifdef HAVE_PYTHON directly, as that is better at avoiding bitrot, as both Python and !Python paths are visible to the compiler this way. Tested on Fedora 17, with and without Python. gdb/ 2013-12-12 Pedro Alves <palves@redhat.com> * cli/cli-cmds.c (source_script_from_stream) Use have_python instead of catching UNSUPPORTED_ERROR. * exceptions.h (UNSUPPORTED_ERROR): Delete. * python/python.c (source_python_script) [!HAVE_PYTHON]: Internal error if called. * python/python.h (have_python): New static inline function.
2013-12-11 * dwarf2read.c (lookup_dwo_cutu): Include name of dwp file inDoug Evans2-5/+24
"can't find DWO" warning.
2013-12-10Sanitize access to gdbarch on the SDT probe API (and fix ARM bug)Sergio Durigan Junior6-29/+71
This patch sanitizes the access to gdbarch made by various functions of the SDT probe API. Before this patch, gdbarch was being accessed via the probe's objfile; however, this proved to cause a bug on 32-bit ARM targets because during the parsing of the probe's arguments the code needed to access some pseudo-registers of the architecture, and this information is not fully correct on the objfile's gdbarch. Basically, the approach taken was to instead pass the current/selected frame to the parsing and evaluation functions, so that they can extract the gdbarch directly from the frame. It solved the ARM bug reported above, and also contributed to make the API cleaner. Tested on x86_64 and 32-bit ARM. 2013-12-11 Sergio Durigan Junior <sergiodj@redhat.com> * break-catch-throw.c (fetch_probe_arguments): Pass selected frame to get_probe_argument_count and evaluate_probe_argument. * probe.c (get_probe_argument_count): Adjust declaration to accept frame. Pass frame to probe_ops's get_probe_argument_count. (evaluate_probe_argument): Likewise, for evaluate_probe_argument. (probe_safe_evaluate_at_pc): Pass frame to get_probe_argument_count and evaluate_probe_argument. * probe.h (struct probe_ops) <get_probe_argument_count, evaluate_probe_argument>: Adjust declarations to accept frame. (get_probe_argument_count, evaluate_probe_argument): Likewise. * solib-svr4.c (solib_event_probe_action): Get current frame. Pass it to get_probe_argument_count. (svr4_handle_solib_event): Get current frame. Pass it to get_probe_argument_count and evaluate_probe_argument. * stap-probe.c (stap_parse_probe_arguments): Adjust declaration to accept gdbarch. Do not obtain it from the probe's objfile. (stap_get_probe_argument_count): Adjust declaration to accept frame. Obtain gdbarch from the frame. Call generic can_evaluate_probe_arguments. Pass gdbarch to stap_parse_probe_arguments. (stap_get_arg): Adjust declaration to accept gdbarch. Pass it to stap_parse_probe_arguments. (stap_evaluate_probe_argument): Adjust declaration to accept frame. Obtain gdbarch from the frame. Pass gdbarch to stap_get_arg. (stap_compile_to_ax): Pass agent_expr's gdbarch to stap_get_arg. (compute_probe_arg): Obtain gdbarch from frame. Pass frame to get_probe_argument_count and evaluate_probe_argument.
2013-12-11Fix a bug in matching notifications.Yao Qi2-6/+14
Due to copy-n-paste, the problem caused PR remote/15974 also exists in gdbserver. This patch fixes it in the same way. Patch to fix remote/15974 can be found: https://sourceware.org/ml/gdb-patches/2013-12/msg00014.html gdb/gdbserver: 2013-12-11 Yao Qi <yao@codesourcery.com> * notif.c (handle_notif_ack): Return 0 if no notification matches.
2013-12-10add missing PR# to previous entryDoug Evans1-0/+1
2013-12-10PR 16286Doug Evans5-3/+60
* c-lang.c (c_get_string): Ignore the declared size of the object if a specific length is requested. testsuite/ * gdb.python/py-value.c: #include stdlib.h, string.h. (str): New struct. (main): New local xstr. * gdb.python/py-value.exp (test_value_in_inferior): Add test to fetch a value as a string with a length beyond the declared length of the array.
2013-12-10Delete interp_exec_p.Doug Evans4-16/+10
* interps.h (interp_exec_p): Delete. * interps.c (interp_exec_p): Delete. (interp_exec): Update. Assert interp->procs->exec_proc != NULL. * mi/mi-interp.c (mi_cmd_interpreter_exec): Update.
2013-12-10Add call to get_compiler_info to gdb_compile_shlib.Andrew Burgess2-2/+14
https://sourceware.org/ml/gdb-patches/2013-12/msg00374.html gdb/testsuite/ChangeLog * lib/gdb.exp (gdb_compile_shlib): Add call to get_compiler_info, update comment.
2013-12-10Use target_read_code in skip_prologue (amd64)Yao Qi2-4/+13
gdb: 2013-12-10 Yao Qi <yao@codesourcery.com> * amd64-tdep.c (amd64_analyze_stack_align): Call target_read_code instead of target_read_memory. (amd64_analyze_prologue): Call read_code_unsigned_integer instead of read_memory_unsigned_integer. Call read_code instead of read_memory. (amd64_skip_xmm_prologue): Likewise.
2013-12-10Use target_read_code in skip_prologue (i386)Yao Qi4-34/+106
GDB is able to cache memory accesses requested in target_read_code, so target_read_code is more efficient than general target_read_memory. This patch uses target_read_code and its variants to read target memory in the functions related to i386_skip_prologue. It improves the performance when doing 'b foo' (foo is a function) in remote debugging. Nowadays, when we set a breakpoint on function f1, GDB will fetch the code in f1 to determine the start of the function body (say skip the prologue), it requests read from target many times. With this patch applied, the number of RSP 'm' packets are reduced. gdb: 2013-12-10 Yao Qi <yao@codesourcery.com> * corefile.c (read_code): New function. (read_code_integer): New function. (read_code_unsigned_integer): New function. * gdbcore.h (read_code): Declare. (read_code_integer): Declare. (read_code_unsigned_integer): Declare. * i386-tdep.c (i386_follow_jump): Call target_read_code instead of target_read_memory. Call read_code_unsigned_integer instead of read_memory_unsigned_integer. (i386_analyze_struct_return): Likewise. (i386_skip_probe): Likewise. (i386_analyze_stack_align): Likewise. (i386_match_pattern): Likewise. (i386_skip_noop): Likewise. (i386_analyze_frame_setup): Likewise. (i386_analyze_register_saves): Likewise. (i386_skip_prologue): Likewise. (i386_skip_main_prologue): Likewise. (i386_frame_cache_1): Likewise.
2013-12-10Invalidate target cache before starting to handle event.Yao Qi2-0/+33
gdb: 2013-12-10 Yao Qi <yao@codesourcery.com> * infrun.c: Include "target-dcache.h". (prepare_for_detach): Call target_dcache_invalidate. (wait_for_inferior): Likewise. (fetch_inferior_event): Likewise. (infrun_thread_stop_requested_callback): Likewise. Set overlay_cache_invalid to 1.
2013-12-10Set language for Ada minimal symbols.Joel Brobecker4-0/+53
This helps with the following issue: Given an Ada program defining a global variable: package Pck is Watch : Integer := 1974; end Pck; When printing the address of this variable, GDB also tries to print the associated symbol name: (gdb) p watch'address $1 = (access integer) 0x6139d8 <pck__watch> ^^ || The problem is that GDB prints the variable's linkage name, instead of its natural name. This is because the language of the associated minimal symbol never really gets set. This patch adds handling for Ada symbols in symbol_find_demangled_name. After this patch, we now get: (gdb) p watch'address $1 = (access integer) 0x6139d8 <pck.watch> ^ | gdb/ChangeLog: * symtab.c (symbol_find_demangled_name): Add handling of Ada symbols. gdb/testsuite/ChangeLog: * gdb.ada/int_deref.exp: Add test verifying that we print the decoded symbol name when printing the address of Ada symbols.
2013-12-10GDB/MI: Document support for -exec-run --start in -list-featuresJoel Brobecker7-1/+31
This adds "exec-run-start-option" in the output of the -list-features commands, allowing front-ends to easily determine whether -exec-run supports the --start option. gdb/ChangeLog: * mi/mi-main.c (mi_cmd_list_features): add "exec-run-start-option". * NEWS: Expand the entry documenting the new -exec-run --start option to mention the corresponding new entry in the output of "-list-features". gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Document the new "exec-run-start-option" entry in the output of the "-list-features" command. gdb/testsuite/ChangeLog: * gdb.mi/mi-start.exp: Add test verifying that -list-features contains "exec-run-start-option".
2013-12-10nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missingJoel Brobecker2-0/+93
We observed on Windows 2012 that we were unable to unwind past exception handlers. For instance, with any Ada program raising an exception that does not get handled: % gnatmake -g a -bargs -shared % gdb a (gdb) start (gdb) catch exception unhandled Catchpoint 2: unhandled Ada exceptions (gdb) c Catchpoint 2, unhandled CONSTRAINT_ERROR at <__gnat_unhandled_exception> ( e=0x645ff820 <constraint_error>) at s-excdeb.adb:53 53 s-excdeb.adb: No such file or directory. At this point, we can already see that something went wrong, since the frame selected by the debugger corresponds to a runtime function rather than the function in the user code that caused the exception to be raised (in our case procedure A). This is further confirmed by the fact that we are unable to unwind all the way to procedure A: (gdb) bt #0 <__gnat_unhandled_exception> (e=0x645ff820 <constraint_error>) at s-excdeb.adb:53 #1 0x000000006444e9a3 in <__gnat_notify_unhandled_exception> (excep=0x284d2 +0) at a-exextr.adb:144 #2 0x00000000645f106a in __gnat_personality_imp () from C:\[...]\libgnat-7.3.dll #3 0x000000006144d1b7 in _GCC_specific_handler (ms_exc=0x242fab0, this_frame=0x242fe60, ms_orig_context=0x242f5c0, ms_disp=0x242ef70, gcc_per=0x645f0960 <__gnat_personality_imp>) at ../../../src/libgcc/unwind-seh.c:289 #4 0x00000000645f1211 in __gnat_personality_seh0 () from C:\[...]\libgnat-7.3.dll #5 0x000007fad3879f4d in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) It turns out that the unwinder has been doing its job flawlessly up until frame #5. The address in frame #5 is correct, but GDB is not able to associate it with any symbol or unwind record. And this is because this address is inside ntdll.dll, and when we received the LOAD_DLL_DEBUG_EVENT for that DLL, the system was not able to tell us the name of the library, thus causing us to silently ignoring the event. Because GDB does not know about ntdll.dll, it is unable to access the unwind information from it. And because the function at that address does not use a frame pointer, the unwinding becomes impossible. This patch helps recovering ntdll.dll at the end of the "run/attach" phase, simply by trying to locate that specific DLL again. In terms of our medium to long term planning, it seems to me that we should be able to simplify the code by ignoring LOAD_DLL_DEBUG_EVENT during the startup phase, and modify windows_ensure_ntdll_loaded to then detect and report all shared libraries after we've finished inferior creation. But for a change just before 7.7 branch creation, I thought it was safest to just handle ntdll.dll specifically. This is less intrusive, and ntdll is the only DLL affected by the problem I know so far. gdb/ChangeLog: * windows-nat.c (handle_load_dll): Add comments. (windows_ensure_ntdll_loaded): New function. (do_initial_windows_stuff): Use windows_ensure_ntdll_loaded. Add FIXME comment.
2013-12-08Fix gdb/ChangeLog date in last entry.Joel Brobecker1-1/+1
2013-12-08Use gdb_produce_sourceYao Qi2-51/+61
We added a new proc gdb_produce_source recently, and it can be used more widely in lib/gdb.exp to generate source file. gdb/testsuite: 2013-12-08 Yao Qi <yao@codesourcery.com> * lib/gdb.exp (support_complex_tests): Use gdb_produce_source. (is_elf_target, is_ilp32_target, is_ilp64_target): Likewise. (is_64_target, is_amd64_regs_target): Likewise. (skip_altivec_tests, skip_vsx_tests, skip_btrace_tests): Likewise.
2013-12-08Document the GDB 7.6.2 release in gdb/ChangeLogJoel Brobecker1-0/+4
gdb/ChangeLog: GDB 7.6.2 released.
2013-12-08Avoid "may be used uninitialized" warningYao Qi2-1/+6
Hi, I see such warning below on one compiler I am using. cc1: warnings being treated as errors ../../workspace/gdb/stack.c: In function 'frame_info': ../../workspace/gdb/stack.c:1519:20: error: 'caller_pc' may be used uninitialized in this function Go through the gdb-patches archives and find the "canonical" way to fix this warning is to initialize the variable. gdb: 2013-12-08 Yao Qi <yao@codesourcery.com> * stack.c (frame_info): Initialize variable caller_pc.
2013-12-07strip off +x bits on non-executable/script filesMike Frysinger3-0/+5
These files are source files and have no business being +x. We couldn't easily fix it in CVS (you need login+write access to the raw rcs files), but we can fix this w/git. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-12-07gdb: testsuite: fix ksh shebang to use shMike Frysinger4-3/+9
These scripts use /bin/ksh, but they're dirt simple and can be used with /bin/sh, so just change the shebang. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-12-06Fix "info frame" in the outermost frame.Pedro Alves10-59/+723
Doing "info frame" in the outermost frame, when that was indicated by the next frame saying the unwound PC is undefined/not saved, results in error and incomplete output: (gdb) bt #0 thread_function0 (arg=0x0) at threads.c:63 #1 0x00000034cf407d14 in start_thread (arg=0x7ffff7fcb700) at pthread_create.c:309 #2 0x000000323d4f168d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 (gdb) frame 2 #2 0x000000323d4f168d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 115 call *%rax (gdb) info frame Stack level 2, frame at 0x0: rip = 0x323d4f168d in clone (../sysdeps/unix/sysv/linux/x86_64/clone.S:115); saved rip Register 16 was not saved (gdb) Not saved register values are treated as optimized out values internally throughout. stack.c:frame_info is handing unvailable values, but not optimized out ones. The patch deletes the frame_unwind_caller_pc_if_available wrapper function and instead lets errors propagate to frame_info (it's only user). As frame_unwind_pc now needs to be able to handle and cache two different error scenarios, the prev_pc.p variable is replaced with an enumeration. (FWIW, I looked into making gdbarch_unwind_pc or a variant return struct value's instead, but it results in lots of boxing and unboxing for no real gain -- e.g., the mips and arm implementations need to do computation on the unboxed PC value. Might as well throw an error on first attempt to get at invalid contents.) After the patch, we get: (gdb) info frame Stack level 2, frame at 0x0: rip = 0x323d4f168d in clone (../sysdeps/unix/sysv/linux/x86_64/clone.S:115); saved rip = <not saved> Outermost frame: outermost caller of frame at 0x7ffff7fcafc0 source language asm. Arglist at 0x7ffff7fcafb8, args: Locals at 0x7ffff7fcafb8, Previous frame's sp is 0x7ffff7fcafc8 (gdb) A new test is added. It's based off dw2-reg-undefined.exp, and tweaked to mark the return address (rip) of "stop_frame" as undefined. Tested on x86_64 Fedora 17. gdb/ 2013-12-06 Pedro Alves <palves@redhat.com> * frame.c (enum cached_copy_status): New enum. (struct frame_info) <prev_pc.p>: Change type to enum cached_copy_status. (fprint_frame): Handle not saved and unavailable prev_pc values. (frame_unwind_pc_if_available): Delete and merge contents into ... (frame_unwind_pc): ... here. Handle OPTIMIZED_OUT_ERROR. Adjust to use enum cached_copy_status. (frame_unwind_caller_pc_if_available): Delete. (create_new_frame): Adjust. * frame.h (frame_unwind_caller_pc_if_available): Delete declaration. * stack.c (frame_info): Use frame_unwind_caller_pc instead of frame_unwind_caller_pc_if_available, and handle NOT_AVAILABLE_ERROR and OPTIMIZED_OUT_ERROR errors. * valprint.c (val_print_optimized_out): Use val_print_not_saved. (val_print_not_saved): New function. * valprint.h (val_print_not_saved): Declare. gdb/testsuite/ 2013-12-06 Pedro Alves <palves@redhat.com> * gdb.dwarf2/dw2-undefined-ret-addr.S: New file. * gdb.dwarf2/dw2-undefined-ret-addr.c: New file. * gdb.dwarf2/dw2-undefined-ret-addr.exp: New file.
2013-12-06New OPTIMIZED_OUT_ERROR error code.Pedro Alves6-7/+25
In order to catch <optimized out> errors like we catch <unavailable> errors, this adds a new OPTIMIZED_OUT_ERROR error code, and throws it in various places. gdb/ChangeLog 2013-12-06 Andrew Burgess <aburgess@broadcom.com> Pedro Alves <palves@redhat.com> * exceptions.h (errors): Add OPTIMIZED_OUT_ERROR. * dwarf2loc.c (write_pieced_value): Throw OPTIMIZED_OUT_ERROR. * frame.c (frame_unwind_register): Throw OPTIMIZED_OUT_ERROR. * spu-tdep.c (spu_software_single_step): Throw OPTIMIZED_OUT_ERROR. * valops.c (value_assign): Throw OPTIMIZED_OUT_ERROR.
2013-12-06update free_objfile commentTom Tromey2-15/+5
The introductory comment to free_objfile is obsolete. This patch fixes it by removing all the obsolete bits. 2013-12-06 Tom Tromey <tromey@redhat.com> * objfiles.c (free_objfile): Update comment.
2013-12-06remove objfile_to_frontTom Tromey3-22/+5
I happened to notice that nothing uses objfile_to_front. This patch removes it. 2013-12-06 Tom Tromey <tromey@redhat.com> * objfiles.h (objfile_to_front): Remove. * objfiles.c (objfile_to_front): Remove.
2013-12-06remove unnecessary declarationTom Tromey2-2/+5
This removes an unnecessary declaration from minsyms.c. 2013-12-06 Tom Tromey <tromey@redhat.com> * minsyms.c (get_symbol_leading_char): Remove unnecessary declaration.
2013-12-06pack partial_symtab for spaceTom Tromey2-13/+17
This improves the packing of struct partial_symtab. I noticed with pahole that were were a couple of holes. This consolidates the holes without, I think, affecting readability -- it just moves the "user" field a bit earlier in the struct. This change saves a small amount of memory. 2013-12-06 Tom Tromey <tromey@redhat.com> * psympriv.h (struct partial_symtab) <user>: Move earlier.
2013-12-06fix a couple of FIXMEsTom Tromey2-4/+7
This fixes a couple of old "32x64" FIXME comments by using paddress with current_gdbarch rather than hex_string and a cast to long. 2013-12-06 Tom Tromey <tromey@redhat.com> * cli/cli-cmds.c (edit_command): Use paddress, not hex_string. (list_command): Likewise.
2013-12-06put the psymtab filename in the filename bcacheTom Tromey2-2/+7
This puts the psymtab filename in the filename bcache. This saves a small amount of memory. 2013-12-06 Tom Tromey <tromey@redhat.com> * psymtab.c (allocate_psymtab): Put the filename in the filename bcache.
2013-12-06make symtab::dirname constTom Tromey3-5/+10
This makes symtab::dirname const and updates one spot to avoid an intermediate constless result. 2013-12-06 Tom Tromey <tromey@redhat.com> * buildsym.c (end_symtab_from_static_block): Use obstack_copy0. * symtab.h (struct symtab) <dirname>: Now const.
2013-12-06make symtab::filename constTom Tromey3-3/+8
This makes symtab::filename const and removes a newly unnecessary cast. 2013-12-06 Tom Tromey <tromey@redhat.com> * symfile.c (allocate_symtab): Remove cast. * symtab.h (struct symtab) <filename>: Now const.
2013-12-06 * gdb.base/break.exp: Fix setting of $baz.Doug Evans2-1/+5
2013-12-06remove some sym_probe_fns methodsTom Tromey7-210/+34
While looking into the probe API, it seemed to me that there were a number of methods in sym_probe_fns that were not needed. This patch removes them. Specifically, it seems to me that sym_probe_fns ought to be concerned with the API for constructing the probes. Any method relating to some aspect of an individual probe can be handled via the probe's own vtable. That is, the double indirection here doesn't seem useful -- it certainly isn't in fact used, but also I couldn't think of a potential use. 2013-12-06 Tom Tromey <tromey@redhat.com> * break-catch-throw.c (fetch_probe_arguments): Use get_probe_argument_count and evaluate_probe_argument. * elfread.c (elf_get_probe_argument_count) (elf_can_evaluate_probe_arguments, elf_evaluate_probe_argument) (elf_compile_to_ax): Remove. (elf_probe_fns): Update. * probe.c (get_probe_argument_count, can_evaluate_probe_arguments) (evaluate_probe_argument): Call method on probe, not via sym functions. * stap-probe.c (compute_probe_arg): Use get_probe_argument_count, evaluate_probe_argument. (compile_probe_arg): Use get_probe_argument_count. Call method on probe, not via sym functions. * symfile-debug.c (debug_sym_get_probe_argument_count) (debug_can_evaluate_probe_arguments) (debug_sym_evaluate_probe_argument, debug_sym_compile_to_ax): Remove. (debug_sym_probe_fns): Remove. * symfile.h (struct sym_probe_fns) <sym_get_probe_argument_count, can_evaluate_probe_arguments, sym_evaluate_probe_argument, sym_compile_to_ax>: Remove fields.
2013-12-06Add support for DW_OP_bit_piece and DW_OP_plus_uconst to DWARF assembler.Andrew Burgess2-0/+14
https://sourceware.org/ml/gdb-patches/2013-12/msg00143.html gdb/testsuite/ChangeLog * lib/dwarf.exp: (Dwarf::_location): Handle DW_OP_bit_piece and DW_OP_plus_uconst.
2013-12-06testsuite: introduce index in varobj child eval.Keven Boell2-1/+17
In some languages, e.g. fortran, arrays start with index 1 instead 0. This patch changes the MI library to support testing varobj children of fortran arrays. 2013-11-21 Keven Boell <keven.boell@intel.com> testsuite/ * lib/mi-support.exp (mi_list_varobj_children_range): Add call to mi_list_array_varobj_children_with_index. (mi_list_array_varobj_children_with_index): New function. Add parameter to specify array start.
2013-12-06 Fix completion for pascal language.Pierre Muller2-17/+24
* p-exp.y (exp : field_exp name): Do not call mark_struct_expression. (exp : field_exp name COMPLETE): New rule. (exp : SIZEOF): Set correct current_type. (last_was_structop): Remove static variable. (yylex): Remove saw_structop local variable. Adapt code to removal of variables above.
2013-12-06Uninitialized variable "this_id" in frame.c:get_prev_frame_1.Joel Brobecker2-2/+7
With a simple Ada program where I have 3 functions, one just calling the next, the backtrace is currently broken when GDB is compiled at -O2: #0 hello.first () at hello.adb:5 #1 0x0000000100001475 in hello.second () at hello.adb:10 Backtrace stopped: previous frame inner to this frame (corrupt stack?) It turns out that a recent patch deleted the assignment of variable this_id, making it an unitialized variable: * frame-unwind.c (default_frame_unwind_stop_reason): Return UNWIND_OUTERMOST if the frame's ID is outer_frame_id. * frame.c (get_prev_frame_1): Remove outer_frame_id check. The hunk in question starts with: - /* Check that this frame is not the outermost. If it is, don't try - to unwind to the prev frame. */ - this_id = get_frame_id (this_frame); - if (frame_id_eq (this_id, outer_frame_id)) (the code was removed as redundant - but removing the assignment was in fact not intentional). There is no other code in this function that sets the variable. Instead of re-adding the statement in the lone section where it is actually used, I inlined it, and then got rid of the variable altogether. This way, and until we start needing this frame ID in another location within that function, we dont' have to worry about the variable's validity/lifetime. gdb/ChangeLog: * frame.c (get_prev_frame_1): Delete variable "this_id". Replace its use by a call to get_frame_id.
2013-12-05Add software single step support to moxie portAnthony Green2-18/+191
2013-12-04fix date in previous entryDoug Evans1-1/+1
2013-12-04 * auto-load.c (load_auto_scripts_for_objfile): Add some comments.Doug Evans2-0/+9
2013-12-05Allow Windows UNWIND_INFO version 2.Joel Brobecker2-2/+19
We've observed in Windows 2012 that ntdll.dll contains some unwind records with the version field set to 2. This patch adjusts the decoder to accept records flagged with this version as well. Version 2 appears to still be largely undocumented at this stage. However, apart from a mysterious opcode 6, everything else still seems to remain the same. So this patch also changes the decoder to ignore those opcodes; before this change, the debugger would silently stop the decoding, and let the frame unwinder make do with what it the decoder managed to decode up to that point. It's unclear at this point what we're losing by not being able to decode that opcode. But the information does not appear to be critical, at least as far as call unwinding is concerned. gdb/ChangeLog: (from Tristan Gingold <gingold@adacore.com>) (from Joel Brobecker <brobecker@adacore.com>) * amd64-windows-tdep.c (amd64_windows_frame_decode_insns): Accept version 2. Ignore operations using opcode 6.
2013-12-05Minor coding-style fixes in ada-lex.l:find_dot_all.Joel Brobecker2-13/+18
gdb/ChangeLog: * ada-lex.l (find_dot_all): Fix coding style violations.
2013-12-04Fix the manual more thoroughly.Eli Zaretskii1-6/+6
2013-12-04doc/gdb.texinfo (i386): Fix yesterday's commit.Eli Zaretskii2-1/+5
2013-12-03add @kindex for catchpointsTom Tromey2-0/+19
I wanted to find the docs for "catch load" the other day, and I found out that this isn't in the index. It seems to me that each command ought to be in the index for quick reference like this, so this patch adds an @kindex (chosen because it seems to be what the rest of the manual does) for each "catch" subcommand. 2013-12-03 Tom Tromey <tromey@redhat.com> * gdb.texinfo (Set Catchpoints): Add @kindex for each command documented here.
2013-12-03add "dir" menu item for gdbserverTom Tromey2-0/+5
I happened to notice that the gdbserver program doesn't appear in the top-level "dir" file. This adds an entry for it to the gdb manual. 2013-12-03 Tom Tromey <tromey@redhat.com> * gdb.texinfo (@direntry): Add menu item for gdbserver.
2013-12-03Documentation for MPX.Walfred Tedeschi4-0/+57
2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com> * NEWS: Add section for Intel(R) Architecture Instructions Extesions mentioning MPX. doc/ * gdb.texinfo (i386 Features): Add MPX feature registers. (x86 Specific featuresx86 Architecture-specific Issues): Adds a subsubsection for MPX and describes the display of the boundary registers. Signed-off-by: Walfred Tedeschi <walfred.tedeschi@intel.com>