aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2013-05-17gdb/gdbserverYao Qi2-1/+6
* i386-low.c (i386_length_and_rw_bits): Move the comment to the right place.
2013-05-17*** empty log message ***gdbadmin1-1/+1
2013-05-16gdb/Thomas Schwinge3-4/+24
2013-05-16 Yue Lu <hacklu.newborn@gmail.com> * configure.ac: Ensure MIG is available when building for GNU Hurd hosts. * configure: Regenerate.
2013-05-16 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,Luis Machado2-22/+45
PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments. (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR guards. Update comments. (linux_target_op) <read_offsets>: Conditionally define to linux_read_offsets if the target is UCLIBC and if it defines PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2013-05-16gdb.ada/complete.exp: Fix FIXME.Pedro Alves2-5/+7
2013-05-16 Pedro Alves <palves@redhat.com> * gdb.ada/complete.exp (test_gdb_no_completion): Fix typo in comment. Use gdb_test_no_output.
2013-05-16[dwarf]: Add DW_LANG_UPC support in set_cu_language.Joel Brobecker2-0/+5
gdb/ChangeLog: * dwarf2read.c (set_cu_language): Add DW_LANG_UPC handling.
2013-05-16Missing do_cleanups in ada_make_symbol_completion_list.Joel Brobecker4-1/+28
This results in an internal-warning when trying the completion when in Ada mode: (gdb) b simple<TAB> /[...]/cleanups.c:265: internal-warning: restore_my_cleanups has found a stale cleanup A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) gdb/ChangeLog: * ada-lang.c (ada_make_symbol_completion_list): Make sure all cleanups are done before returning from this function. gdb/testsuite/ChangeLog: * gdb.ada/complete.exp: Add test verifying completion using the "tab" key.
2013-05-16*** empty log message ***gdbadmin1-1/+1
2013-05-15 * gdb.base/filesym.exp: New completer test.Keith Seitz2-0/+78
* gdb.base/filesym.c: New file.
2013-05-15Remove my name from a couple tests.Pedro Alves3-5/+6
Tested on x86_64 Fedora 17. gdb/testsuite/ 2013-05-15 Pedro Alves <palves@redhat.com> * gdb.base/fixsection.c: Remove attribution. * gdb.base/watch-read.exp: Ditto.
2013-05-15Remove forward enum declaration in utils.h.Joel Brobecker2-1/+6
These forward declarations are a GNU extension, and they trigger a build warning when the compiler does not support it. gdb/ChangeLog: * utils.h: #include "exceptions.h". (enum errors): Remove partial declaration.
2013-05-15ppc-aix core file relocation.Joel Brobecker9-193/+435
The current code attempts to provide relocation support when debugging core files via the rs6000_xfer_partial method of the rs6000-nat target_ops vector. However, this target_ops vector does not get pushed on the target stack at all when debugging core files, thus bypassing completely that part of the code. This patch fixes the problem by extending corelow's core_xfer_partial into handling the TARGET_OBJECT_LIBRARIES_AIX object. gdb/ChangeLog: * gdbarch.sh (core_xfer_shared_libraries_aix): New method. * gdbarch.h, gdbarch.c: Regenerate. * corelow.c (core_xfer_partial): Add TARGET_OBJECT_LIBRARIES_AIX handling. * rs6000-aix-tdep.h: New file. * Makefile.in (HFILES_NO_SRCDIR): Add rs6000-aix-tdep.h. * rs6000-aix-tdep.c: Include "rs6000-aix-tdep.h" and "xml-utils.h". (struct field_info, struct ld_info_desc): New types. (ld_info32_desc, ld_info64_desc): New static constants. (struct ld_info): New type. (rs6000_aix_extract_ld_info): New function. (rs6000_aix_shared_library_to_xml): Likewise. (rs6000_aix_ld_info_to_xml): Likewise. (rs6000_aix_core_xfer_shared_libraries_aix): Likewise. (rs6000_aix_init_osabi): Add call to set_gdbarch_core_xfer_shared_libraries_aix. * rs6000-nat.c: Add "rs6000-aix-tdep.h" include. Remove "xml-utils.h" include. (LdInfo): Delete typedef. (ARCH64_DECL, LDI_FIELD, LDI_NEXT, LDI_FD, LDI_FILENAME): Delete macros. (rs6000_ptrace_ldinfo): Change return type to gdb_byte *. Adjust code accordingly. (rs6000_core_ldinfo): Delete, folded into rs6000_aix_core_xfer_shared_libraries_aix. (rs6000_xfer_shared_library): Delete. (rs6000_xfer_shared_libraries): Reimplement.
2013-05-15The "record goto" command scans its arguments for "begin", "start", or "end".Markus Metzger4-14/+72
Turn those into sub-commands. Document the "record goto" command.
2013-05-15*** empty log message ***gdbadmin1-1/+1
2013-05-14gdb/Jan Kratochvil2-0/+9
* linespec.c (convert_linespec_to_sals): New comment for SOURCE_FILENAME assignment.
2013-05-14gdb/Jan Kratochvil2-1/+9
* cleanups.c (restore_my_cleanups): Replace gdb_assert by internal_warning.
2013-05-14 * eval.c (parse_and_eval_long): Make 'exp' const.Tom Tromey3-2/+7
* value.h (parse_and_eval_long): Update.
2013-05-14 * ui-file.c (gdb_fopen): Make arguments const.Tom Tromey3-2/+7
* ui-file.h (gdb_fopen): Make arguments const.
2013-05-14 * remote.c (remote_set_trace_notes): Make arguments const.Tom Tromey4-3/+11
* target.c (update_current_target): Update cast. * target.h (to_set_trace_notes): Make arguments const.
2013-05-14 * go32-nat.c (go32_terminal_info): Make 'args' const.Tom Tromey6-9/+17
* inferior.h (child_terminal_info): Update. * inflow.c (child_terminal_info): Make 'args' const. * target.c (default_terminal_info): Make 'args' const. (debug_to_terminal_save_ours): Likewise. * target.h (struct target_ops) <to_terminal_info>: Make argument const.
2013-05-14 * gcore.c (create_gcore_bfd): Make 'filename' const.Tom Tromey6-7/+17
* gcore.h (create_gcore_bfd): Make 'filename' const. * record-full.c (record_full_save): Make 'recfilename' const. * target.c (target_save_record): Make 'filename' const. * target.h (struct target_ops) <to_save_record>: Make 'filename' const. (target_save_record): Likewise.
2013-05-14*** empty log message ***gdbadmin1-1/+1
2013-05-13 * gdb.dwarf2/implptrconst.exp: Create a CU with 4 byte addressTom Tromey2-3/+10
size and change type sizes to 4 bytes.
2013-05-13fix PR number in ChangeLogTom Tromey1-1/+1
2013-05-13 PR gdb/15538:Tom Tromey2-2/+9
* dwarf2read.c (dwarf2_record_block_ranges): Ensure that the ranges section has been read.
2013-05-13 PR exp/15364:Tom Tromey6-8/+34
* eval.c (evaluate_subexp_standard) <STRUCTOP_STRUCT, STRUCTOP_PTR>: Return a not_lval value for EVAL_AVOID_SIDE_EFFECTS. * opencl-lang.c (evaluate_subexp_opencl): Return a not_lval value for EVAL_AVOID_SIDE_EFFECTS. gdb/testsuite * gdb.base/exprs.exp (test_expr): Add regression test. * gdb.base/exprs.c (null_t_struct): New global.
2013-05-13Float parameter passing in funcall on ppc-aix & ppc-lynx178.Joel Brobecker3-9/+28
Given the following code: float global_float = 0.0; void set_float (float f) { global_float = f; } GDB incorrectly calls set_float if the set_float function is marked as prototyped: (gdb) call set_float (5.0) (gdb) print global_float $1 = 2048 What happens, when the function is marked as prototyped, is that GDB finds that the argument is a float, casts the value given in the expression to a float, and then gives that float to ppc-aix/ ppc-lynx178's push_dummy_call gdbarch routine. The latter then blindly copies it as is in the first floating-point register, instead of making sure that it has the proper format first. gdb/ChangeLog: * rs6000-aix-tdep.c (rs6000_push_dummy_call): Convert floating point registers to register type before storing value. * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
2013-05-13* History saving should stay disabled for test cases *Muhammad Bilal3-0/+9
I saw some test cases in gdb.base/default.exp and gdb.base/setshow.exp are enabling the history saving. Hence .gdb_history file is modified with history information even though, by default, we have History saving disabled. So we should modify GDB test cases so that history saving should stay off for all test cases. ChangeLog: 2013-05-13 Muhammad Bilal <mbilal@codesourcery.com> * gdb.base/default.exp: Disable history saving. * gdb.base/setshow.exp: Likewise.
2013-05-13*** empty log message ***gdbadmin1-1/+1
2013-05-12*** empty log message ***gdbadmin1-1/+1
2013-05-11*** empty log message ***gdbadmin1-1/+1
2013-05-102013-05-10 Joel Brobecker <brobecker@adacore.com>Tom Tromey5-0/+67
Tom Tromey <tromey@redhat.com> * common/filestuff.c (mark_fd_no_cloexec, unmark_fd_no_cloexec): New functions. * common/filestuff.c (mark_fd_no_cloexec, unmark_fd_no_cloexec): Declare. * darwin-nat.c (darwin_pre_ptrace): Use mark_fd_no_cloexec. (darwin_ptrace_him): Use unmark_fd_no_cloexec. * inf-ttrace.c (do_cleanup_pfds): Use unmark_fd_no_cloexec. (inf_ttrace_prepare): Use mark_fd_no_cloexec.
2013-05-10gdbTom Tromey3-2/+12
Freddie Chopin <freddie_chopin@op.pl> PR build/15414: * configure: Rebuild. * configure.ac (build_warnings): Do not use -Wformat-nonliteral with -Wno-format. sim/common * acinclude.m4 (SIM_AC_OPTION_WARNINGS): Do not use -Wformat-nonliteral with -Wno-format. sim/bfin * configure: Rebuild. sim/cr16 * configure: Rebuild. sim/cris * configure: Rebuild. sim/d10v * configure: Rebuild. sim/igen * configure: Rebuild. sim/m68hc11 * configure: Rebuild. sim/mips * configure: Rebuild. sim/mn10300 * configure: Rebuild. sim/v850 * configure: Rebuild.
2013-05-10Fix typo in "show remote traceframe-info-packet"Pedro Alves2-1/+6
I noticed: (gdb) show remote traceframe-info-packet Support for the `qXfer:trace-frame-info:read' packet is auto-detected, currently unknown. ^^^^^^^^^^^ The packet is actually qXfer:traceframe-info:read. gdb/ 2013-05-10 Pedro Alves <palves@redhat.com> * remote.c (_initialize_remote): Fix spelling of qXfer:traceframe-info:read packet in packet config command.
2013-05-10PR remote/15455 - QTro remote packet brokenPedro Alves5-0/+221
In the function remote_trace_set_readonly_regions in gdb/remote.c, the local variable 'offset' does not account for "QTro" at the start of the packet with the result that if there are any read-only regions, the packet is sent -- but without the "QTro" -- causing the remote stub to report that the packet is unsupported: Sending packet: $:0000000000400200,(...),00000000004560a4#ab...Packet received: vs the expected: Sending packet: $QTro:0000000000400200,(...),00000000004560a4#31...Packet received: OK We don't see the problem when testing with GDBserver, as that supports qXfer:trace-frame-info:read, meaning GDBserver never needs to read from the read-only sections directly itself. This commit adds a test that explicitly disables qXfer:trace-frame-info:read. gdb/ 2013-05-10 David Taylor <dtaylor@emc.com> PR remote/15455 * remote.c (remote_trace_set_readonly_regions): Do not overwrite "QTro" at start of packet. gdb/testsuite/ 2013-05-10 Pedro Alves <palves@redhat.com> PR remote/15455 * gdb.trace/qtro.c: New file. * gdb.trace/qtro.exp: New file.
2013-05-10Remove FIXME in solib-aix.c:solib_aix_relocate_section_addressesJoel Brobecker2-10/+5
This issue should now be fixed thanks to a change in bfd removing the SEC_ALLOC flag from all sections that do not get mapped to memory. gdb/ChangeLog: * solib-aix.c (solib_aix_relocate_section_addresses): Remove FIXME comment.
2013-05-10AIX: wrong address for shared object's .bss sectionJoel Brobecker2-1/+21
gdb/ChangeLog: * solib-aix.c (solib_aix_relocate_section_addresses): For the .bss section action, apply the same offset as the .data section.
2013-05-10move sparc-sol-thread.c back into sol-thread.c.Joel Brobecker5-57/+33
The routines in sparc-sol-thread used to be SPARC-specific (and documented as such in the ptrace man page), and therefore hosting them in a sparc-specific file made sense. However, newer versions of Solaris now use those callbacks (Solaris 10 Update 10, apparently), and thus the note about these callbacks being specific to SPARC was removed. So this patch deletes sparc-sol-thread.c and moves the code back inside sol-thread.c. gdb/ChangeLog: PR tdep/15420: * sol-thread.c (ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs): New functions, directly copied from sparc-sol-thread.c. * sparc-sol-thread.c: Delete. * configure.ac: Remove code handling sparc-solaris-thread.c. * configure: Regenerate.
2013-05-102013-05-10 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon29-87/+4845
* stack.c (backtrace_command_1): Add "no-filters", and Python frame filter logic. (backtrace_command): Add "no-filters" option parsing. (_initialize_stack): Alter help to reflect "no-filters" option. * Makefile.in (SUBDIR_PYTHON_OBS): Add py-framefilter.o (SUBDIR_PYTHON_SRCS): Add py-framefilter.c (py-frame.o): Add target * data-directory/Makefile.in (PYTHON_DIR): Add Python frame filter files. * python/python.h: Add new frame filter constants, and flag enum. (apply_frame_filter): Add definition. * python/python.c (apply_frame_filter): New non-Python enabled function. * python/py-utils.c (py_xdecref): New function. (make_cleanup_py_xdecref): Ditto. * python/py-objfile.c: Declare frame_filters dictionary. (objfpy_dealloc): Add frame_filters dealloc. (objfpy_new): Initialize frame_filters attribute. (objfile_to_objfile_object): Ditto. (objfpy_get_frame_filters): New function. (objfpy_set_frame_filters): New function. * python/py-progspace.c: Declare frame_filters dictionary. (pspy_dealloc): Add frame_filters dealloc. (pspy_new): Initialize frame_filters attribute. (pspacee_to_pspace_object): Ditto. (pspy_get_frame_filters): New function. (pspy_set_frame_filters): New function. * python/py-framefilter.c: New file. * python/lib/gdb/command/frame_filters.py: New file. * python/lib/gdb/frames.py: New file. * python/lib/gdb/__init__.py: Initialize global frame_filters dictionary * python/lib/gdb/FrameDecorator.py: New file. * python/lib/gdb/FrameIterator.py: New file. * mi/mi-cmds.c (mi_cmds): Add frame filters command. * mi/mi-cmds.h: Declare. * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Add --no-frame-filter logic, and Python frame filter logic. (stack_enable_frame_filters): New function. (parse_no_frame_option): Ditto. (mi_cmd_stack_list_frames): Add --no-frame-filter and Python frame filter logic. (mi_cmd_stack_list_locals): Ditto. (mi_cmd_stack_list_args): Ditto. (mi_cmd_stack_list_variables): Ditto. * NEWS: Add frame filter note. 2013-05-10 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-framefilter.py: New File. * gdb.python/py-framefilter-mi.exp: Ditto. * gdb.python/py-framefilter.c: Ditto. * gdb.python/py-framefilter-mi.exp: Ditto. * gdb.python/py-framefilter-mi.c: Ditto, * gdb.python/py-framefilter-gdb.py.in: Ditto. 2013-05-10 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Backtrace): Add "no-filter" argument. (Python API): Add Frame Filters API, Frame Wrapper API, Writing a Frame Filter/Wrapper, Managing Management of Frame Filters chapter entries. (Frame Filters API): New Node. (Frame Wrapper API): New Node. (Writing a Frame Filter): New Node. (Managing Frame Filters): New Node. (Progspaces In Python): Add note about frame_filters attribute. (Objfiles in Python): Ditto. (GDB/MI Stack Manipulation): Add -enable-frame-filters command, @anchors and --no-frame-filters option to -stack-list-variables, -stack-list-frames, -stack-list-locals and -stack-list-arguments commands.
2013-05-10*** empty log message ***gdbadmin1-1/+1
2013-05-09 * symfile.c (syms_from_objfile_1): Delete args offsets, num_offsets.Doug Evans3-65/+26
All callers updated. (syms_from_objfile): Ditto. Make static. (symbol_file_add_with_addrs): Renamed from symbol_file_add_with_addrs_or_offsets. Delete args offsets, num_offsets. All callers updated. * symfile.h (syms_from_objfile): Delete.
2013-05-09 * symfile.c (decrement_reading_symtab): Add assert.Doug Evans2-0/+7
(increment_reading_symtab): Ditto.
2013-05-09source.c: Use fgetc instead of getc.Joel Brobecker2-4/+10
On AIX, getc is a macro which triggers an -Wunused-value warning. gdb/ChangeLog: * source.c (forward_search_command): Replace call to getc by call to fgetc. (reverse_search_command): Likewise.
2013-05-09*** empty log message ***gdbadmin1-1/+1
2013-05-08 * psymtab.c (expand_symtabs_matching_via_partial): Fix file nameDoug Evans2-5/+16
matching test.
2013-05-08 * gdb.base/solib-search.exp: Set test name for "setTom Tromey2-1/+8
solib-search-path" test.
2013-05-082013-05-08 Hafiz Abid Qadeer <abidh@codesourcery.com>Hafiz Abid Qadeer2-146/+232
* gdb.trace/circ.exp: Remove unnecessary 'if then' checks. (set_a_tracepoint): Set tracepoint before prologue. (run_trace_experiment): Test setup_tracepoints and 'break end' in it. (trace_buffer_normal): Remove. (gdb_trace_circular_tests): Remove. Move tests to... (top level): ...here. Call 'runto_main' before checking for trace support. Use commands to check the support for circular trace buffer and changing of trace buffer size. Add test to calculate size of single frame. Use this size to calculate the size of trace buffer. Use 'tfind pc func9' instead of 'tfind 9'. Use 'with_test_prefix'.
2013-05-08Avoid duplicating text in sol-thread.c:info_cbJoel Brobecker2-12/+12
This is a minor cleanup that helps avoiding duplicating the output of a command when handling alternative situations. gdb/ChangeLog: * sol-thread.c (info_cb): Factorize the code a little.
2013-05-08Improve output of "maintenance info sol-threads" command.Joel Brobecker2-7/+10
This patch does the following: - Puts the startfunc and "Sleep func" info on the same line; - Renames "Sleep func" into "sleepfunc" to be consistent with "startfunc" - Avoids the use of a '-' as a separate before the "sleepfunc" output, because the '-' looks odd and out of place when the "startfunc" field is not printed (ti.ti_startfunc is nul). - Use a '=' instead of ':' and avoids the space between the name of the value and its value, mostly to help group the value with its name. For the record, this is how the new outout now looks like: (gdb) maintenance info sol-threads user thread #1, lwp 1, (active) system thread #2, lwp 2, (active) system thread #3, lwp 0, (asleep) sleepfunc=0xff32d9e0 user thread #4, lwp 4, (asleep) startfunc=[...].task_wrapper sleepfunc=0xff3290f0 system thread #5, lwp 7, (active) startfunc=_co_timerset user thread #6, lwp 8, (active) startfunc=[...].task_wrapper gdb/ChangeLog: * sol-thread.c (info_cb): Rework the output of the "maintenance info sol-threads" command a bit.
2013-05-08ti.ti_pc vs ti.ti_startfunc copy-pasto in sol-thread.c:info_cbJoel Brobecker2-1/+6
gdb/ChangeLog: * sol-thread.c (info_cb) [ti.ti_state == TD_THR_SLEEP]: Replace ti.ti_startfunc by ti.ti_pc. Probably OK to commit without approval, so will likely do so in the next few days.