aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-08-07Move stdio.h to common-defs.hGary Benson25-23/+31
This commit moves the inclusion of stdio.h to common-defs.h and removes all other inclusions. gdb/ 2014-08-07 Gary Benson <gbenson@redhat.com> * common/common-defs.h: Include stdio.h. * defs.h: Do not include stdio.h. * ada-lang.c: Likewise. * common/buffer.c: Likewise. * common/common-utils.c: Likewise. * cp-name-parser.y: Likewise. * gnu-nat.c: Likewise. * go32-nat.c: Likewise. * i386gnu-nat.c: Likewise. * proc-api.c: Likewise. * proc-events.c: Likewise. * proc-flags.c: Likewise. * proc-why.c: Likewise. * python/python-internal.h: Likewise. * target-memory.c: Likewise. * tui/tui-io.c: Likewise. * tui/tui.c: Likewise. gdb/gdbserver/ 2014-08-07 Gary Benson <gbenson@redhat.com> * server.h: Do not include stdio.h. * linux-low.c: Likewise. * remote-utils.c: Likewise. * spu-low.c: Likewise. * utils.c: Likewise. * wincecompat.c: Likewise.
2014-08-07Ensure coff-ppc local symbols are zero terminatedChen Gang2-8/+16
* coff-ppc.c (coff_ppc_relocate_section): Ensure local symbols are zero terminated.
2014-08-07Don't issue a warning for references in LTO IR to warning symbolsH.J. Lu8-8/+73
bfd/ PR ld/16746 * linker.c (_bfd_generic_link_add_one_symbol): Don't issue a warning for references in LTO IR to warning symbols. ld/testsuite/ PR ld/16746 * ld-plugin/lto.exp: Add 4 tests for PR ld/16746. * ld-plugin/pr16746a.c: New file. * ld-plugin/pr16746b.c: Likewise. * ld-plugin/pr16746c.c: Likewise. * ld-plugin/pr16746d.c: Likewise.
2014-08-07missing changelog for last commitAlan Modra1-0/+6
2014-08-07Merge WARN and CWARN cases in _bfd_generic_link_add_one_symbolAlan Modra1-10/+2
WARN has always been able to be handled by the CWARN case (WARN was used when the previous symbols was undef, undefweak or common and thus must be on the undefs list, so the CWARN test passes). So let's merge those two cases. * linker.c (WARN, CWARN): Collapse these states to WARN. (_bfd_generic_link_add_one_symbol): Use old CWARN case for new WARN.
2014-08-07daily updateAlan Modra1-1/+1
2014-08-06Rename variable with confusing nameSimon Marchi2-17/+22
I saw this gem of not so legible code in solib-svr4.c (scan_dyntag): if (dyn_tag == dyntag) and thought it deserved a small rename. This just renames variables to be a bit more clear for those who read the code. I also constified the parameter because, why not. The same was done in scan_dyntag_auxv as well. Tested only by rebuilding, since the change was done mechanically. gdb/Changelog: 2014-08-01 Simon Marchi <simon.marchi@ericsson.com> * solib-svr4.c (scan_dyntag): Rename dyntag and dyn_tag variables. (scan_dyntag_auxv): Same.
2014-08-06Add -momit_lock_prefix=[no|yes] optionIlya Tocar8-0/+88
This option serves as a workaround for processors, which fail on lock prefix. gas/ * config/tc-i386.c (omit_lock_prefix): New. (output_insn): Omit lock prefix if omit_lock_prefix is true. (OPTION_omit_lock_prefix): New. (md_longopts): Add momit-lock-prefix. (md_parse_option): Handle momit-lock-prefix. (md_show_usage): Add momit-lock-prefix=[no|yes]. * doc/c-i386.texi (momit-lock-prefix): Document. gas/testsuite/ * gas/i386/i386.exp: Run new tests. * gas/i386/omit-lock-no.d: New. * gas/i386/omit-lock-yes.d: Ditto. * gas/i386/omit-lock.s: Ditto.
2014-08-06Modify new gold test to pass on powerpc64leAlan Modra2-1/+5
* testsuite/defsym_test.sh: Allow ppc64le localentry annotation.
2014-08-06Rearrange awkwardly-nested conditionalsGary Benson2-6/+8
gdbserver's init_register_cache has some preprocessor conditionals awkwardly nested around an if..else block. This commit moves the conditionals inside the braces to make the code more readable. gdb/gdbserver/ 2014-08-06 Gary Benson <gbenson@redhat.com> * regcache.c (init_register_cache): Move conditionals inside if.
2014-08-06Remove duplicated include fileYao Qi3-2/+6
File x86-linux-nat.h is included twice in amd64-linux-nat.c and i386-linux-nat.c. This patch is to remove one. gdb: 2014-08-06 Yao Qi <yao@codesourcery.com> * amd64-linux-nat.c: Remove duplicated include "x86-linux-nat.h". * i386-linux-nat.c: Likewise.
2014-08-06Replace hardwired target-is-async checkGary Benson2-1/+5
This commit replaces a hardwired target-is-async check. gdb/gdbserver/ 2014-08-06 Gary Benson <gbenson@redhat.com> * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2014-08-06PR14918, lto always links in libgcc_s.soAlan Modra2-0/+16
PR14918 * plugin.c (plugin_opt_plugin_arg): Drop --pass-through.
2014-08-06Allow lto tests to run with older compilersAlan Modra3-268/+321
* lib/ld-lib.exp (check_lto_fat_available): New. (check_lto_available): Remove -ffat-lto-objects test. * ld-plugin/lto.exp: Use [list ] rather than { } to set up list variables, allowing substition of vars. Set lto_fat and plug_opt and add to various tests.
2014-08-06Warn for gold on lto objects without pluginAlan Modra2-0/+9
PR 13227 * symtab.cc (Symbol_table::add_from_relobj): Warn on __gnu_lto_slim.
2014-08-06Fix comment in dwarf_decode_lines_1Yao Qi2-1/+7
When I read dwarf_decode_lines_1 comments today, it should be called "special opcode" rather than "special operand", as said in DWARF spec. It is obvious to me. I'll push it in if no comments in three days. gdb: 2014-08-06 Yao Qi <yao@codesourcery.com> * dwarf2read.c (dwarf_decode_lines_1): Replace "Special operand" with "Special opcode" in comments.
2014-08-06daily updateAlan Modra1-1/+1
2014-08-05Fix outputdots so that it doesn't errantly discard the first line of, e.g.,Doug Evans5-7/+43
CODE_FRAGMENT. Also fix skip_past_newline to not skip past NUL. * bfd-in2.h: Regenerate. * libcoff.h: Regenerate. doc/ * chew.c (skip_past_newline_1): New function. (outputdots): Call it. (skip_past_newline): Ditto.
2014-08-05MIPS: Fix a .pdr section linker buffer overrunMaciej W. Rozycki2-0/+7
* elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's rawsize if changing size.
2014-08-05Remove pointless function initialize_interpsGary Benson2-19/+7
This commit removes the pointless function initialize_interps. gdb/ 2014-08-05 Gary Benson <gbenson@redhat.com> * interps.c (initialize_interps): Remove prototype. (interpreter_initialized): Remove static global. (interp_add): Do not call initialize_interps. (initialize_interps): Remove function.
2014-08-05Remove spurious va_end in vwarningGary Benson2-1/+4
This commit removes a spurious va_end in vwarning. gdb/ 2014-08-05 Gary Benson <gbenson@redhat.com> * utils.c (vwarning): Remove spurious va_end.
2014-08-05Regen ld/Makefile.inAlan Modra2-1/+5
* Makefile.in: Regenerate.
2014-08-05gas/testuite ChangeLog typoAlan Modra1-1/+1
2014-08-05chew.c warning fixAlan Modra2-3/+10
* chew.c (print_stack_level, main): Cast result of pointer difference to match format string.
2014-08-05Fix PR17226, ld --gc-sections segfaults on sparc-linuxAlan Modra2-1/+6
PR ld/17226 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Typo fix.
2014-08-05Fix load of archive element with common def for -u symAlan Modra2-33/+16
* linker.c (generic_link_check_archive_element): Move handling of command link -u symbols with a common symbol def to the code handling non-common symbols so that archive element symbols are loaded. Use generic_link_add_object_symbols.
2014-08-05Fix LTO vs. COFF archivesAlan Modra10-560/+187
Avoid scan of symbols on objects in coff archives since we don't need to do anything special with common symbols. The scan is quite useless, and breaks LTO due to slim LTO objects not having symbols available until after the plugin has claimed them. Instead we can add objects based on their archive symbol map. Also, rip out the archive symbol hash table used by the generic linker. Using a hash breaks one feature of unix archive linking; The first object file in an archive defining any given symbol should be the object extracted to satisfy that symbol. What's more a hash isn't much faster except in pathological cases where object file ordering causes many scans of the archive. See the comment which I'm removing from elf_link_add_archive_symbols. Finally, tidy elflink.c archive handling a little. PR 13557 * linker.c (struct archive_list, struct archive_hash_entry, struct archive_hash_table, archive_hash_newfunc, archive_hash_table_init, archive_hash_lookup, archive_hash_allocate, archive_hash_table_free): Delete. (_bfd_generic_link_add_archive_symbols): Add h and name params to checkfn. Rewrite using a straight-forward scan over archive map. (generic_link_check_archive_element_no_collect, generic_link_check_archive_element_collect, generic_link_check_archive_element): Add h and name params. * aoutx.h (aout_link_check_archive_element): Likewise. * pdp11.c (aout_link_check_archive_element): Likewise. * xcofflink.c (xcoff_link_check_archive_element): Likewise. * cofflink.c (coff_link_check_archive_element): Likewise. Don't scan symbols, simply add archive element whenever h is undefined. (coff_link_check_ar_symbols): Delete. * ecoff.c (read_ext_syms_and_strs): Delete. (reread_ext_syms_and_strs): Delete. (ecoff_link_check_archive_element): Add h and name param. Don't scan symbols, simply add based on h. Use ecoff_link_add_object_symbols. * elflink.c (elf_link_is_defined_archive_symbol): Don't test archive_pass. (elf_link_add_archive_symbols): Delete "defined" array, merge functionality into "included". Make "included" a char array. Don't set or test archive_pass. * libbfd-in.h (_bfd_generic_link_add_archive_symbols): Update. * libbfd.h: Regenerate.
2014-08-05Prepare gdb for 64-bit obstacksAlan Modra7-16/+29
* charset.c (convert_between_encodings): Cast result of obstack_base. * cp-valprint.c (cp_print_value_fields): Use size_t locals. * hppa-tdep.c (internalize_unwinds): Change "size" parm to size_t. (read_unwind_info): Use size_t for some locals. * jit.c (finalize_symtab): Likewise. * utils.c (hashtab_obstack_allocate): Likewise. * symmisc.c (print_objfile_statistics): Update format strings.
2014-08-05daily updateAlan Modra1-1/+1
2014-08-04Fix incorrect placement of two Intel gdb/NEWS itemsJan Kratochvil2-7/+11
there were two commits which placed new gdb/NEWS items to the bottom of the NEWS file (such as for gdb-4.0) instead at their right place under: *** Changes in GDB 7.8 https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=gdb/NEWS;h=ae84e009b8008f9da2707829c0cbab358abc17fb;hp=a8ae8c7b7a5ddce9b5779914dd1e6a87463d7d60;hb=ca8941bbd088002cb8ff87abe16d02ecc8d58d1e;hpb=489e41ddf4bb5616a7471fb4072df5efbb9a706e commit ca8941bbd088002cb8ff87abe16d02ecc8d58d1e Author: Walfred Tedeschi <walfred.tedeschi@intel.com> Date: Tue Dec 3 13:31:03 2013 +0000 Documentation for MPX. Message-Id: <1386074172-14177-1-git-send-email-walfred.tedeschi@intel.com> https://sourceware.org/ml/gdb-patches/2013-12/msg00082.html and https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=gdb/NEWS;h=a7067fdf9a7af422572a29d1fdd6ef011c87cd9f;hp=b72d64db313d0785edec19a9c4b441b854698e6a;hb=01f9f808e2e86187c95e7cff4aeb014a421a53ce;hpb=93ee1e3683a12f4774b8beb4f821910982e21ce2 commit 01f9f808e2e86187c95e7cff4aeb014a421a53ce Author: Michael Sturm <michael.sturm@intel.com> Date: Mon Dec 16 16:43:05 2013 +0100 Add AVX512 registers support to GDB and GDBserver. Message-Id: <1398258160-9070-4-git-send-email-michael.sturm@intel.com> https://sourceware.org/ml/gdb-patches/2013-12/msg00818.html gdb/ 2014-08-04 Jan Kratochvil <jan.kratochvil@redhat.com> * NEWS (Changes in GDB-4.0): Move Intel MPX and Intel AVX-512 items ... (Changes in GDB 7.8): ... here. Message-ID: <20140804165708.GA12824@host2.jankratochvil.net>
2014-08-04make "set debug target" take effect immediatelyTom Tromey6-6/+29
Right now, "set debug target" acts a bit strangely. Most target APIs only notice that it has changed when the target stack is changed in some way. This is because many methods implement the setting using the special debug target. However, a few spots do change their behavior immediately -- any place explicitly checking "targetdebug". Some of this peculiar behavior is documented. However, I think that it just isn't very useful for it to work this way. So, this patch changes "set debug target" to take effect immediately in all cases. This is done by simply calling update_current_target when the setting is changed. This required one small change in the test suite. Here a test was expecting the current behavior. Built and regtested on x86-64 Fedora 20. 2014-08-04 Tom Tromey <tromey@redhat.com> * target.c (set_targetdebug): New function. (initialize_targets): Pass set_targetdebug when creating "set debug target". 2014-08-04 Tom Tromey <tromey@redhat.com> * gdb.texinfo (Debugging Output): Update for change to "set debug target". 2014-08-04 Tom Tromey <tromey@redhat.com> * gdb.base/sss-bp-on-user-bp-2.exp: Expect output from "set debug target 0".
2014-08-04fix test suite regressionTom Tromey2-2/+7
This fixes a test suite regession that Yao noticed. This test checks for some specific "target debug" output that has changed since the test was written. 2014-08-04 Tom Tromey <tromey@redhat.com> * gdb.base/sss-bp-on-user-bp-2.exp: Match "to_resume", not "target_resume".
2014-08-04daily updateAlan Modra1-1/+1
2014-08-03daily updateAlan Modra1-1/+1
2014-08-02daily updateAlan Modra1-1/+1
2014-08-01[gdb/doc] Add target triplet to man filesMasaki Muranaka2-2/+10
After applying hash 43662968, gdb.1 and other man pages are not added target triplet even if we configure with --target=. It causes conflicts on some distributions. And uninstall rules requires $(transform) variable. gdb/doc/ChangeLog: * Makefile.in (transform): New variable. (install-man1, install-man5): Apply $(transform) to man file names. Tested by installing both native and cross debugger.
2014-08-01Handle variable-sized fields in the interior of structure typeJoel Brobecker5-26/+50
In Ada, variable-sized field can be located at any position of a structure. Consider for instance the following declarations: Dyn_Size : Integer := 1; type Table is array (Positive range <>) of Integer; type Inner is record T1 : Table (1 .. Dyn_Size) := (others => 1); T2 : Table (1 .. Dyn_Size) := (others => 2); end record; type Inner_Array is array (1 .. 2) of Inner; type Outer is record I0 : Integer := 0; A1 : Inner_Array; Marker : Integer := 16#01020304#; end record; Rt : Outer; What this does is declare a variable "Rt" of type Outer, which contains 3 fields where the second (A1) is of type Inner_Array. type Inner_Array is an array with 2 elements of type Inner. Because type Inner contains two arrays whose upper bound depend on a variable, the size of the array, and therefore the size of type Inner is dynamic, thus making field A1 a dynamically-size field. When trying to print the value of Rt, we hit the following limitation: (gdb) print rt Attempt to resolve a variably-sized type which appears in the interior of a structure type The limitation was somewhat making sense in C, but needs to be lifted for Ada. This patch mostly lifts that limitation. As a result of this patch, the type length computation had to be reworked a little bit. gdb/ChangeLog: * gdbtypes.c (resolve_dynamic_struct): Do not generate an error if detecting a variable-sized field that is not the last field. Fix struct type length computation. gdb/testsuite/ChangeLog: * gdb.base/vla-datatypes.c (vla_factory): Add new variable inner_vla_struct_object_size. * gdb.base/vla-datatypes.exp: Adjust last test, and mark it as xfail.
2014-08-01Add debug trace in amd64-windows-tdep.c::amd64_windows_frame_decode_insnsJoel Brobecker2-0/+14
This is a trace which would have been useful when trying to understand why the debugger was not decoding the stream of unwind codes I was expecting. This patch adds a trace first informing us that we are following the unwind info to the next unwind record in that chain. gdb/ChangeLog: * amd64-windows-tdep.c (amd64_windows_frame_decode_insns): Add debug trace.
2014-08-01x64-windows: Fix extraction of chained UNWIND_INFOJoel Brobecker2-1/+6
On x86_64-windows, GDB is unable to unwind past some code in mswsock.dll. For instance: (gdb) bt #0 0x00000000778712fa in ntdll!ZwWaitForSingleObject () from C:\Windows\SYSTEM32\ntdll.dll #1 0x000007fefcfb0f75 in WSPStartup () from C:\Windows\system32\mswsock.dll Backtrace stopped: previous frame inner to this frame (corrupt stack?) The UNWIND_INFO record for frame #1's PC has a UNW_FLAG_CHAININFO flag, and so after having decoded this unwind record, GDB's decoder next tries to locate the next unwind record on the chain. Unfortunately, the location of that unwind info appears to be miscomputed. This is the expression used: chain_vma = cache->image_base + unwind_info + sizeof (ex_ui) + ((codes_count + 1) & ~1) * 2 + 8; The chain-info is expected to be right after the "Unwind codes array" which is itself after all the fields of ex_ui's struct. So the "+ 8" offset at the end should not be there. Because of that extra offset, we were reading no longer processing correct unwind info, leading the unwinder computing the wrong frame size, computing the wrong return address, etc. gdb/ChangeLog: * amd64-windows-tdep.c (amd64_windows_frame_decode_insns): Remove "+ 8" offset in computation of CHAIN_VMA.
2014-08-01Fix PR10373 which is SH relax bug.Kaz Kojima5-6/+26
2014-08-01Fix PR10378 which is SH relax bug.Kaz Kojima5-1/+49
2014-08-01daily updateAlan Modra1-1/+1
2014-07-31 * inflow.c (child_terminal_inferior): Add comment.Doug Evans3-5/+33
(child_terminal_ours_for_output): Add comment. (child_terminal_ours): Add comment. * linux-nat.c (linux_nat_terminal_inferior): Add comment. (linux_nat_terminal_ours): Add comment.
2014-07-31Do not include defs.h or server.h in any header fileGary Benson10-20/+14
This commit removes all inclusions of defs.h and server.h from header files. gdb/ 2014-07-31 Gary Benson <gbenson@redhat.com> * common/btrace-common.h: Do not include defs.h or server.h. * nat/mips-linux-watch.h: Likewise. * gdb-dlfcn.h: Do not include defs.h. * tracefile.h: Likewise. gdb/gdbserver/ 2014-07-31 Gary Benson <gbenson@redhat.com> * ax.h: Do not include server.h. * gdbthread.h: Likewise. * lynx-low.h: Likewise. * notif.h: Likewise.
2014-07-31daily updateAlan Modra1-1/+1
2014-07-30Fix incomplete constification in remote-sim.cRoland McGrath2-24/+28
2014-07-30 Roland McGrath <mcgrathr@google.com> * remote-sim.c (gdbsim_open): Apply constification to forward decl.
2014-07-30constify to_openTom Tromey20-61/+68
This makes target_ops::to_open take a const string and then fixes the fallout. There were a few of these I could not build. However I eyeballed it and in any case the fixes should generally be trivial. This is based on the patch to fix up the target debugging for to_open, because that changes gdb to not directly install to_open as the target command 2014-07-30 Tom Tromey <tromey@redhat.com> * bsd-kvm.c (bsd_kvm_open): Constify. * corelow.c (core_open): Constify. * ctf.c (ctf_open): Constify. * dbug-rom.c (dbug_open): Constify. * exec.c (exec_open): Constify. * m32r-rom.c (m32r_open, mon2000_open): Constify. * microblaze-rom.c (picobug_open): Constify. * nto-procfs.c (procfs_open_1, procfs_open, procfs_native_open): Constify. * ppcbug-rom.c (ppcbug_open0, ppcbug_open1): Constify. * record-btrace.c (record_btrace_open): Constify. * record-full.c (record_full_core_open_1, record_full_open_1) (record_full_open): Constify. * remote-m32r-sdi.c (m32r_open): Constify. * remote-mips.c (common_open, mips_open, pmon_open, ddb_open) (rockhopper_open, lsi_open): Constify. * remote-sim.c (gdbsim_open): Constify. * remote.c (remote_open, extended_remote_open, remote_open_1): Constify. * target.h (struct target_ops) <to_open>: Make "arg" const. * tracefile-tfile.c (tfile_open): Constify.
2014-07-30constify some cli-utils stuffTom Tromey7-20/+62
This constifies a few functions in cli-utils -- get_number_trailer and friends -- and then fixes the fallout. 2014-07-30 Tom Tromey <tromey@redhat.com> * breakpoint.c (map_breakpoint_numbers): Update. * cli/cli-utils.c (get_number_trailer): Make "pp" const. Update. (get_number_const): New function. (get_number): Rewrite using get_number_const. (init_number_or_range): Make "string" const. (number_is_in_list): Make "list" const. * cli/cli-utils.h (get_number_const): Declare. (struct get_number_or_range_state) <string, end_ptr>: Now const. (init_number_or_range, number_is_in_list): Update. * printcmd.c (map_display_numbers): Update. * value.c (value_from_history_ref): Constify. * value.h (value_from_history_ref): Update.
2014-07-30constify exec_file_attachTom Tromey5-12/+20
This constifies exec_file_attach and updates the rest of gdb. Insight will need some minor tweaks after this, though it's worth noting that I think all that hook stuff can actually just go away. I sent a patch to this effect once, but since the Insight source repository situation isn't currently resolved there wasn't a convenient way to test it. 2014-07-30 Tom Tromey <tromey@redhat.com> * corefile.c (hook_type, call_extra_exec_file_hooks) (specify_exec_file_hook): Constify. * exec.c (exec_file_attach): Make "filename" const. * gdbcore.h (deprecated_exec_file_display_hook) (specify_exec_file_hook, exec_file_attach): Constify. * main.c (captured_main): Use catch_command_errors_const.
2014-07-30fix to_open debug settingTom Tromey2-13/+32
This is a follow-on to the patch to auto-generate target debug methods. While working on that patch I noticed that the to_open debug setting will never work. There is no path by which debug_to_open can be called. This patch fixes the problem by using a generic function as the implementation of the various "target" subcommands, and then putting the debug printing there. This is also a tiny step toward fixing PR 7250 (and apparently why command contexts were introduced). Built and regtested on x86-64 Fedora 20. 2014-07-30 Tom Tromey <tromey@redhat.com> * target.c (open_target): New function. (add_target_with_completer, add_deprecated_target_alias): Use set_cmd_sfunc, set_cmd_context. (debug_to_open): Remove. (setup_target_debug): Update.