summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* re-run update-gnulib.shusers/palves/gnulib-strtok_rPedro Alves2015-04-0810-6/+314
|
* add strtok_r to gnulib module listPedro Alves2015-04-081-0/+1
|
* work around bad perl warningPedro Alves2015-04-081-1/+1
|
* Fix gdb.trace/{actions,infotrace,while-stepping}.exp with extended-remotePedro Alves2015-04-084-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent actions.exp change to check gdb_run_cmd succeeded caught further problems. The test now fails like this with --target_board=native-extended-gdbserver: FAIL: gdb.trace/actions.exp: Can't run to main gdb.log shows: (gdb) run Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.trace/actions Running the default executable on the remote target failed; try "set remote exec-file"? (gdb) FAIL: gdb.trace/actions.exp: Can't run to main The problem is that a gdb_load call is missing. Grepping around for similar problems in other tests, I found that infotrace.exp and while-stepping.exp should be likewise affected. And indeed this is what we get today: FAIL: gdb.trace/infotrace.exp: tstart FAIL: gdb.trace/infotrace.exp: continue to end (the program is no longer running) FAIL: gdb.trace/infotrace.exp: tstop FAIL: gdb.trace/infotrace.exp: 2.6: info tracepoints (trace buffer usage) FAIL: gdb.trace/while-stepping.exp: tstart FAIL: gdb.trace/while-stepping.exp: tstop FAIL: gdb.trace/while-stepping.exp: tfile: info tracepoints FAIL: gdb.trace/while-stepping.exp: ctf: info tracepoints while-stepping.exp even has the same race bug actions.exp had. After this, {actions,infotrace,while-stepping}.exp all pass cleanly with the native-extended-gdbserver board. gdb/testsuite/ChangeLog: 2015-04-08 Pedro Alves <palves@redhat.com> * gdb.trace/actions.exp: Use gdb_load before gdb_run_cmd. * gdb.trace/infotrace.exp: Use gdb_load before gdb_run_cmd. Use gdb_breakpoint instead of gdb_test that doesn't expect anything. Return early if running to main fails. * gdb.trace/while-stepping.exp: Likewise.
* Add AArch32 support for arm gold linker.Han Shen2015-04-074-2/+34
|
* Automatic date update in version.inGDB Administrator2015-04-081-1/+1
|
* Initialize variable on gdb/linux-tdep.c:decode_vmflagsSergio Durigan Junior2015-04-072-1/+5
| | | | | | | | This obvious commit initializes the 'saveptr' variable on gdb/linux-tdep.c:decode_vmflags. This was causing a build failure on Fedora 21 x86_64, caught by the BuildBot here: <https://sourceware.org/ml/gdb-testers/2015-q2/msg00450.html>
* gdb.base/interrupt.exp: Use send_inferior/$inferior_spawn_idPedro Alves2015-04-072-19/+43
| | | | | | | | | | | | | The gdb.base/interrupt.exp test is important for testing system call restarting, but because it depends on inferior I/O, it ends up skipped against gdbserver. This patch adjusts the test to use send_inferior and $inferior_spawn_id so it works against GDBserver. gdb/testsuite/ChangeLog: 2015-04-07 Pedro Alves <palves@redhat.com> * gdb.base/interrupt.exp: Don't skip if $inferior_spawn_id != $gdb_spawn_id. Use send_inferior and $inferior_spawn_id to interact with inferior program.
* testsuite: Introduce $inferior_spawn_idPedro Alves2015-04-073-4/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some important tests, like gdb.base/interrupt.exp end up skipped against gdbserver, because they depend on inferior I/O, which gdbserver doesn't do. This patch adds a mechanism that makes it possible to make them work. It adds a new "inferior_spawn_id" global that is the spawn ID used for I/O interaction with the inferior. By default, for native targets, or remote targets that can do I/O through GDB (semi-hosting) this will be the same as the gdb/host spawn ID. Otherwise, the board may set this to some other spawn ID. When debugging with GDBserver, this will be set to GDBserver's spawn ID. Then tests can use send_inferior instead of send_gdb to send input to the inferior, and use expect's "-i" switch to select which spawn ID to use for matching input/output. That is, something like this will now work: send_inferior "echo me\n" gdb_test_multiple "continue" "test msg" { -i "$inferior_spawn_id" -re "echo me\r\necho\r\n" { ... } } Or even: gdb_test_multiple "continue" "test msg" { -i "$inferior_spawn_id" -re "hello world" { ... } -i "$gdb_spawn_id" -re "error.*$gdb_prompt $" { ... } } Of course, by default, gdb_test_multiple still matches with $gdb_spawn_id. gdb/testsuite/ChangeLog: 2015-04-07 Pedro Alves <palves@redhat.com> * lib/gdb.exp (inferior_spawn_id): New global. (gdb_test_multiple): Handle "-i". Reset the spawn id to GDB's spawn id after processing the user code. (default_gdb_start): Set inferior_spawn_id. (send_inferior): New procedure. * lib/gdbserver-support.exp (gdbserver_start): Set inferior_spawn_id. (close_gdbserver, gdb_exit): Unset inferior_spawn_id.
* testsuite: Don't use expect_background to reap gdbserverPedro Alves2015-04-073-27/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I adjusted a test to do 'expect -i $server_spawn_id -re ...', and saw really strange behavior. Whether that expect would work, depended on whether GDB would also send output and the same expect matched it too (on $gdb_spawn_id). I was perplexed until I noticed that gdbserver_spawn spawns gdbserver and then uses expect_background to reap gdbserver. That expect_background conflicts/races with any "expect -i $server_spawn_id" done anywhere else in parallel... In order to make it possible for tests to read inferior I/O out of $server_spawn_id, we to get rid of that expect_background. This patch makes us instead reap gdbserver's spawn id when GDB exits. If GDB is still around, this gives a chance for gdbserver to exit cleanly. The current code in gdb_finish uses "kill", but that doesn't work with extended-remote (gdbserver doesn't exit). We now use "monitor exit" instead which works in both remote and extended-remote modes. gdb/testsuite/ChangeLog: 2015-04-07 Pedro Alves <palves@redhat.com> * lib/gdb.exp (gdb_finish): Delete persistent gdbserver handling. * lib/gdbserver-support.exp (gdbserver_start): Make $server_spawn_id global. (gdbserver_start): Don't wait for gdbserver's spawn id with expect_background. (close_gdbserver): New procedure. (gdb_exit): Rename the default version and reimplement.
* gdb_test_multiple: Fix user code argument processingPedro Alves2015-04-072-1/+6
| | | | | | | | | | | | | | | | | | | | While teaching gdb_test_multiple to forward "-i" to gdb_expect, I found that with: gdb_test_multiple (...) { -i $some_variable -re "..." {} } $some_variable was not getting expanded in the gdb_test_multiple caller's scope. This is a bug inside gdb_test_multiple. When processing an argument in passed in user code, it was appending the original argument literally, instead of appending the uplist'ed argument. gdb/testsuite/ChangeLog: 2015-04-07 Pedro Alves <palves@redhat.com> * lib/gdb.exp (gdb_test_multiple): When processing an argument, append the substituted item, not the original item.
* gdb.base/interrupt.exp: Use gdb_test_multiple instead of gdb_expectPedro Alves2015-04-072-40/+54
| | | | | | | gdb/testsuite/ChangeLog: 2015-04-07 Pedro Alves <palves@redhat.com> * gdb.base/interrupt.exp: Use gdb_test_multiple instead of gdb_expect.
* gdb.base/interrupt.exp: Fix racePedro Alves2015-04-072-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Working on splitting gdb and inferior output handling in this test, I noticed a race that happens to be masked out today. The test sends "a\n" to the inferior, and then inferior echoes back "a\n". If expect manages to read only the first "a\r\n" into its buffer, then this matches: -re "^a\r\n(|a\r\n)$" { and leaves the second "a\r\n" in output. Then the next test that processes inferior I/O sends "data\n", and expects: -re "^(\r\n|)data\r\n(|data\r\n)$" which fails given the anchor and given "a\r\n" is still in the buffer. This is masked today because the test relies on inferior I/O being done on GDB's terminal, and there are tested GDB commands in between, which consume the "a\r\n" that was left in the output. We don't support SunOS4 anymore, so just remove the workaround. gdb/testsuite/ChangeLog 2015-04-07 Pedro Alves <palves@redhat.com> * gdb.base/interrupt.exp: Don't handle the case of the inferior output appearing once only.
* [AArch64] use subseg_text_p to check .textRenlin Li2015-04-072-9/+15
| | | | | | | | | 2015-04-07 Renlin Li <renlin.li@arm.com> gas/ * config/tc-aarch64.c (mapping_state): Use subseg_text_p. (s_aarch64_inst): Likewise. (md_assemble): Likewise.
* Fix gdb.trace/actions.exp racePedro Alves2015-04-072-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I saw this on PPC64 once: not installed on target (gdb) PASS: gdb.trace/actions.exp: 5.10a: verify teval actions set for two tracepoints break main Breakpoint 4 at 0x10000c6c: file ../../../src/gdb/testsuite/gdb.trace/actions.c, line 139. (gdb) PASS: gdb.trace/actions.exp: break main run Starting program: /home/palves/gdb/build/gdb/testsuite/outputs/gdb.trace/actions/actions tstatus Breakpoint 4, main (argc=1, argv=0x3fffffffebb8, envp=0x3fffffffebc8) at ../../../src/gdb/testsuite/gdb.trace/actions.c:139 139 begin (); (gdb) tstatus Trace can not be run on this target. (gdb) actions 1 Enter actions for tracepoint 1, one per line. End with a line saying just "end". >collect $regs >end (gdb) PASS: gdb.trace/actions.exp: set actions for first tracepoint tstart You can't do that when your target is `native' (gdb) FAIL: gdb.trace/actions.exp: tstart info tracepoints 1 Num Type Disp Enb Address What 1 tracepoint keep y 0x00000000100007c8 in gdb_c_test at ../../../src/gdb/testsuite/gdb.trace/actions.c:74 collect $regs not installed on target ... followed by a cascade of FAILs. The "tstatus" was supposed to detect that this target (native) can't do tracepoints, but, alas, it didn't. That detection failed because 'gdb_test "break main"' doesn't expect anything, and then the output was slow enough that 'gdb_test "" "Breakpoint .*"' matched the output of "break main"... The fix is to use gdb_breakpoint instead. Also check the result of gdb_test while at it. Tested on x86-64 Fedora 20, native and gdbserver. gdb/testsuite/ChangeLog: 2015-04-07 Pedro Alves <palves@redhat.com> * gdb.trace/actions.exp: Use gdb_breakpoint instead of gdb_test that doesn't expect anything. Return early if running to main fails.
* Add new linker option: --warn-orphan which generates warning messages when ↵Nick Clifton2015-04-0710-0/+67
| | | | | | | | | | | | | | | | | | orphan sections are detected. ld * ld.h (struct ld_config_type): Add new field: warn_orphan. * ldlex.h (enum option_values): Add OPTION_WARN_ORPHAN and OPTION_NO_WARN_ORPHAN. * lexsup.c (ld_options): Add --warn-orphan and --no-warn-orphan. (parse_args): Handle the new options. * ldemul.c (ldemul_place_orphan): If requested, generate a warning message when an orphan section is placed in the output file. * ld.texinfo: Document the new option. * NEWS: Mention the new feature. tests * ld-elf/orphan-5.l: New test - checks the linker's output with --warn-orphan enabled. * ld-elf/elf.exp: Run the new test.
* update thread list, delete exited threadsPedro Alves2015-04-076-10/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On GNU/Linux, if the running kernel supports clone events, then linux-thread-db.c defers thread listing to the target beneath: static void thread_db_update_thread_list (struct target_ops *ops) { ... if (target_has_execution && !thread_db_use_events ()) ops->beneath->to_update_thread_list (ops->beneath); else thread_db_update_thread_list_td_ta_thr_iter (ops); ... } However, when live debugging, the target beneath, linux-nat.c, does not implement the to_update_thread_list method. The result is that if a thread is marked exited (because it can't be deleted right now, e.g., it was the selected thread), then it won't ever be deleted, until the process exits or is killed/detached. A similar thing happens with the remote.c target. Because its target_update_thread_list implementation skips exited threads when it walks the current thread list looking for threads that no longer exits on the target side, using ALL_NON_EXITED_THREADS_SAFE, stale exited threads are never deleted. This is not a big deal -- I can't think of any way this might be user visible, other than gdb's memory growing a tiny bit whenever a thread gets stuck in exited state. Still, might as well clean things up properly. All other targets use prune_threads, so are unaffected. The fix adds a ALL_THREADS_SAFE macro, that like ALL_NON_EXITED_THREADS_SAFE, walks the thread list and allows deleting the iterated thread, and uses that in places that are walking the thread list in order to delete threads. Actually, after converting linux-nat.c and remote.c to use this, we find the only other user of ALL_NON_EXITED_THREADS_SAFE is also walking the list to delete threads. So we convert that too, and end up deleting ALL_NON_EXITED_THREADS_SAFE. Tested on x86_64 Fedora 20, native and gdbserver. gdb/ChangeLog 2015-04-07 Pedro Alves <palves@redhat.com> * gdbthread.h (ALL_NON_EXITED_THREADS_SAFE): Rename to ... (ALL_THREADS_SAFE): ... this, and don't skip exited threads. (delete_exited_threads): New declaration. * infrun.c (follow_exec): Use ALL_THREADS_SAFE. * linux-nat.c (linux_nat_update_thread_list): New function. (linux_nat_add_target): Install it. * remote.c (remote_update_thread_list): Use ALL_THREADS_SAFE. * thread.c (prune_threads): Use ALL_THREADS_SAFE. (delete_exited_threads): New function.
* Modify get_reloc_section for targets that map .got.plt to .gotAlan Modra2015-04-0713-10/+37
| | | | | | | | | | | | | | | | | | | | | | Fixes tic6x testsuite failures due to .rela.plt having a zero sh_info. I considered passing link_info to get_reloc_section so we could directly return the .got.plt output section, but we need the fallback to name lookup anyway for objcopy. bfd/ * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being mapped to output .got section. ld/testsuite/ * ld-arm/tls-gdesc-nlazy.g: Adjust for readelf note. * ld-tic6x/shlib-1.rd: Expect corrected .rela.plt sh_info. * ld-tic6x/shlib-1b.rd: Likewise. * ld-tic6x/shlib-1r.rd: Likewise. * ld-tic6x/shlib-1rb.rd: Likewise. * ld-tic6x/shlib-app-1.rd: Likewise. * ld-tic6x/shlib-app-1b.rd: Likewise. * ld-tic6x/shlib-app-1r.rd: Likewise. * ld-tic6x/shlib-app-1rb.rd: Likewise. * ld-tic6x/shlib-noindex.rd: Likewise.
* Cast shift expressionAlan Modra2015-04-072-1/+6
| | | | | PR ld/18176 * ldlang.c (lang_size_sections): Cast shift expression.
* PowerPC non-PIC to PIC editing for protected var accessAlan Modra2015-04-075-41/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a linker-only solution to the incompatibility between shared library protected visibility variables and using .dynbss and copy relocs for non-PIC access to shared library variables. bfd/ * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha and has_addr16_lo. Make has_sda_refs a bitfield. (ppc_elf_check_relocs): Set new flags. (ppc_elf_link_hash_table_create): Update default_params. (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases where we won't be making .dynbss entries or editing code. Set params->pic_fixup when we'll edit code for protected var access. (allocate_dynrelocs): Allocate got entry for edited code and discard dyn_relocs. (struct ppc_elf_relax_info): Add picfixup_size. (ppc_elf_relax_section): Rename struct one_fixup to struct one_branch_fixup. Rename fixups to branch_fixups. Size space for pic fixups. (ppc_elf_relocate_section): Edit non-PIC accessing protected visibility variables to PIC. Don't emit dyn_relocs for code we've edited. * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup. ld/ * emultempl/ppc32elf.em: Handle --no-pic-fixup. (params): Init new field. (ppc_before_allocation): Enable relaxation for pic_fixup.
* Displaced stepping debug: fetch the right regcachePedro Alves2015-04-072-1/+6
| | | | | | | | | | | | Although not currently possible in practice when we get here, 'resume_ptid' can also be a wildcard throughout this function. It's clearer to fetch the regcache using the thread's ptid. gdb/ChangeLog: 2015-04-07 Pedro Alves <pedro@codesourcery.com> * infrun.c (resume) <displaced stepping debug output>: Get the leader thread's regcache, not resume_ptid's.
* Properly set alarm value in gdb.threads/non-stop-fair-events.expYao Qi2015-04-073-3/+17
| | | | | | | | | | | | | | | | | Nowadays, the alarm value is 60, and alarm is generated on some slow boards. This patch is to pass DejaGNU timeout value to the program, and move the alarm call before going to infinite loop. If any thread has activities, the alarm is reset. gdb/testsuite: 2015-04-07 Yao Qi <yao.qi@linaro.org> * gdb.threads/non-stop-fair-events.c (SECONDS): New macro. (child_function): Call alarm. (main): Move call to alarm into the loop. * gdb.threads/non-stop-fair-events.exp: Build program with -DTIMEOUT=$timeout.
* Treat assembler generated local labels as local.Nick Clifton2015-04-072-0/+9
| | | | | * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated local labels as local.
* sim: move sim-engine.o/sim-hrw.o to the common listMike Frysinger2015-04-0646-35/+100
| | | | This makes these two objects available to all sims by default.
* Automatic date update in version.inGDB Administrator2015-04-071-1/+1
|
* Fix the signature of a virtual method to match the one in the parent class.Rafael Ávila de Espíndola2015-04-062-6/+8
|
* Avoid a call to find by using the return value of insert.Rafael Ávila de Espíndola2015-04-062-9/+7
|
* Avoid a copy constructor call.Rafael Ávila de Espíndola2015-04-062-2/+8
|
* Remove is_zlib_supportedH.J. Lu2015-04-0611-36/+21
| | | | | | | | | | | | | | | | | | | | | | Since zlib is always supported, there is no need for is_zlib_supported. binutils/testsuite/ * binutils-all/compress.exp: Remove is_zlib_supported check. * binutils-all/objdump.exp: Likewise. * binutils-all/readelf.exp (readelf_compressed_wa_test): Likewise. * lib/utils-lib.exp (run_dump_test): Likewise. * lib/binutils-common.exp (is_zlib_supported): Removed. gas/testsuite/ * lib/gas-defs.exp (run_dump_test): Remove is_zlib_supported check. ld/testsuite/ * ld-elf/compress.exp: Remove is_zlib_supported check. Fail if --compress-debug-sections doesn't work. * lib/ld-lib.exp (run_dump_test): Remove is_zlib_supported check.
* x86: Use individual prefix control for each opcode.Ilya Tocar2015-04-063-1914/+1941
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2015-04-06 Ilya Tocar <ilya.tocar@intel.com> H.J. Lu <hongjiu.lu@intel.com> * i386-dis-evex.h (evex_table): Fill prefix_requirement field. * i386-dis.c (PREFIX_MANDATORY_REPZ, PREFIX_MANDATORY_REPNZ, PREFIX_MANDATORY_DATA, PREFIX_MANDATORY_ADDR, PREFIX_MANDATORY_LOCK, PREFIX_UD_SHIFT, PREFIX_UD_REPZ, REFIX_UD_REPNZ, PREFIX_UD_DATA, PREFIX_UD_ADDR, PREFIX_UD_LOCK, PREFIX_OPTIONAL, PREFIX_MANDATORY): Define. (Bad_Opcode, FLOAT, DIS386, DIS386_PREFIX, THREE_BYTE_TABLE_PREFIX): Fill prefix_requirement field. (struct dis386): Add prefix_requirement field. (dis386): Fill prefix_requirement field. (dis386_twobyte): Ditto. (twobyte_has_mandatory_prefix_: Remove. (reg_table): Fill prefix_requirement field. (prefix_table): Ditto. (x86_64_table): Ditto. (three_byte_table): Ditto. (xop_table): Ditto. (vex_table): Ditto. (vex_len_table): Ditto. (vex_w_table): Ditto. (mod_table): Ditto. (bad_opcode): Ditto. (print_insn): Use prefix_requirement. (FGRPd9_2, FGRPd9_4, FGRPd9_5, FGRPd9_6, FGRPd9_7, FGRPda_5, FGRPdb_4, FGRPde_3, FGRPdf_4): Fill prefix_requirement field. (float_reg): Ditto.
* Use bfd_putb64/bfd_getb64H.J. Lu2015-04-064-39/+16
| | | | | | | | | | | | | | | bfd/ * compress.c (get_uncompressed_size): Removed. (bfd_compress_section_contents): Use bfd_putb64 to write uncompressed section size. (bfd_init_section_decompress_status): Replace get_uncompressed_size with bfd_getb64. gas/ * write.c (compress_debug): Use bfd_putb64 to write uncompressed section size.
* Remove "/dev/null" from remote_execH.J. Lu2015-04-062-1/+6
| | | | | | | We should catch all errors/warnings from cmp. * binutils-all/compress.exp (compression_used): Remove "/dev/null" from remote_exec.
* Add testcase for stub-method reading in stabs.Doug Evans2015-04-063-1/+65
| | | | | | | | | | | | | | This patch is based on the testcase provided here: https://sourceware.org/ml/gdb-patches/2015-02/msg00181.html I've verified that it catches the internal error discovered here: https://sourceware.org/ml/gdb-patches/2015-02/msg00139.html gdb/testsuite/ChangeLog: * lib/gdb.exp (clean_restart): Return result of gdb_load. * gdb.pascal/stub-method.exp: New file. * gdb.pascal/stub-method.pas: New file.
* * lib/pascal.exp (gpc_compile): Rename dest arg to destfile.Doug Evans2015-04-062-8/+19
| | | | | | | | | | | | | | | The "dest" parameter to fpc_compile/gpc_compile is the name of compilation destination file, not a board name. This patch fixes this by using names consistent with lib/future.exp:gdb_default_target_compile. gdb/testsuite/ChangeLog: * lib/pascal.exp (gpc_compile): Rename dest arg to destfile. Fix dest parameter to board_info. (fpc_compile): Ditto. (gdb_compile_pascal): Rename dest arg to destfile.
* symtab.c (hash_symbol_entry): Hash STRUCT_DOMAIN symbols as VAR_DOMAIN.Doug Evans2015-04-062-9/+27
| | | | | | | | | gdb/ChangeLog: * symtab.c (hash_symbol_entry): Hash STRUCT_DOMAIN symbols as VAR_DOMAIN. (symbol_cache_lookup): Clarify use of bsc_ptr, slot_ptr parameters. Include symbol domain in debugging output.
* Fallback to stub-termcap.c on all hostsPedro Alves2015-04-064-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently building gdb is impossible without an installed termcap or curses library. But, GDB already has a very minimal termcap in the tree to handle this situation for Windows -- gdb/stub-termcap.c. This patch makes that the fallback for all hosts. Testing this on GNU/Linux (by simply hacking away the termcap/curses detection in gdb/configure.ac), we trip on: ../readline/libreadline.a(terminal.o): In function `_rl_init_terminal_io': /home/pedro/gdb/mygit/src/readline/terminal.c:527: undefined reference to `PC' /home/pedro/gdb/mygit/src/readline/terminal.c:528: undefined reference to `BC' /home/pedro/gdb/mygit/src/readline/terminal.c:529: undefined reference to `UP' /home/pedro/gdb/mygit/src/readline/terminal.c:538: undefined reference to `PC' /home/pedro/gdb/mygit/src/readline/terminal.c:539: undefined reference to `BC' /home/pedro/gdb/mygit/src/readline/terminal.c:540: undefined reference to `UP' These are globals that are normally defined by termcap (or ncurses' termcap emulation). Now, we could just define replacements in stub-termcap.c, but readline/terminal.c (at least the copy in our tree) has this: #if !defined (__linux__) && !defined (NCURSES_VERSION) # if defined (__EMX__) || defined (NEED_EXTERN_PC) extern # endif /* __EMX__ || NEED_EXTERN_PC */ char PC, *BC, *UP; #endif /* !__linux__ && !NCURSES_VERSION */ which can result in readline defining the globals too. That will usually work out in C, given that "-fcommon" is usually the default for C compilers, but that won't work for C++, or C with -fno-common (link fails with "multiple definition" errors)... Mirroring those #ifdef conditions in the stub termcap screams "brittle" to me -- I can see them changing in latter readline versions. Work around that by simply using __attribute__((weak)). Windows/PE/COFF's do support weak, but not on gcc 3.4 based toolchains (4.8.x does work). Given the file never needed the variables while it was Windows-only, just continue not defining them there. All other supported hosts should support this. gdb/ChangeLog: 2015-04-06 Pedro Alves <palves@redhat.com> Bernd Edlinger <bernd.edlinger@hotmail.de> * configure.ac: Remove the mingw32-specific stub-termcap.o fallback, and instead fallback to the stub termcap on all hosts. * configure: Regenerate. * stub-termcap.c [!__MINGW32__] (PC, BC, UP): Define as weak symbols.
* [Gold,x86_64] Convert mov foo@GOTPCREL(%rip), %reg to lea foo(%rip), %regIlya Tocar2015-04-068-6/+275
| | | | | | | | | | | | | | | | | | | 2015-04-06 Ilya Tocar <ilya.tocar@intel.com> PR gold/17641 * x86_64.cc (Target_x86_64::can_convert_mov_to_lea): New. (Target_x86_64::Scan::local): Don't create GOT entry, when we can convert mov to lea. (Target_x86_64::Scan::global): Ditto. (Target_x86_64::Relocate::relocate): Convert mov foo@GOTPCREL(%rip), %reg to lea foo(%rip), %reg if possible. * testsuite/Makefile.am (x86_64_mov_to_lea): New test. * testsuite/x86_64_mov_to_lea1.s: New. * testsuite/x86_64_mov_to_lea2.s: Ditto. * testsuite/x86_64_mov_to_lea3.s: Ditto. * testsuite/x86_64_mov_to_lea4.s: Ditto. * testsuite/x86_64_mov_to_lea.sh: Ditto. ---
* Automatic date update in version.inGDB Administrator2015-04-061-1/+1
|
* Add SHF_COMPRESSED support to readelfH.J. Lu2015-04-052-6/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates readelf to dump compression header with readelf -S -W: [ 4] .debug_info PROGBITS 00000000 000038 00007d 00 C 0 0 1 readelf -t -W: [ 4] .debug_info PROGBITS 00000000 000038 00007d 00 0 0 1 [00000800]: COMPRESSED ZLIB, 0000009d, 1 It also checks the compression header when decompressing the compressed section. * readelf.c (get_elf_section_flags): Support SHF_COMPRESSED. (get_compression_header): New. (process_section_headers): Dump compression header if needed. (uncompress_section_contents): Don't free compressed_buffer here. (load_specific_debug_section): Free the compressed buffer, update the section buffer and the section size if uncompress is successful.
* Xfail the compressed debug sectionsH.J. Lu2015-04-054-1/+23
| | | | | | | | | | | | | | | | | | There is no need to generate compressed debug section if compressed section size is the same as before compression. We should xfail the compressed debug section test if there are no compressed sections binutils/testsuite/ * binutils-all/compress.exp (compression_used): New. Xfail test if compression didn't make the section smaller. gas/ 2015-04-05 H.J. Lu <hongjiu.lu@intel.com> * write.c (compress_debug): Don't write the zlib header if compressed section size is the same as before compression.
* sim: moxie: fix running after nrun conversionMike Frysinger2015-04-057-25/+102
| | | | | | | | The nrun conversion was slightly incorrect in how it stopped when an exception occurred. We still set cpu.asregs.exception, but nothing was checking it anymore. Convert all of that to sim_engine_halt. To keep things from regressing again, add a basic testsuite too.
* sim: mn10300: add a basic testsuiteMike Frysinger2015-04-054-0/+88
|
* sim: m68hc11: add a basic testsuiteMike Frysinger2015-04-054-0/+78
|
* sim: iq2000: add a basic testsuiteMike Frysinger2015-04-054-0/+78
|
* sim: lm32: add a basic testsuiteMike Frysinger2015-04-054-0/+84
|
* Automatic date update in version.inGDB Administrator2015-04-051-1/+1
|
* Also preserve the SHF_COMPRESSED bitH.J. Lu2015-04-042-0/+10
| | | | | | | | For objcopy and relocatable link, we should also preserve the SHF_COMPRESSED bit if not decompress. * elf.c (_bfd_elf_init_private_section_data): Also preserve the SHF_COMPRESSED bit if not decompress.
* Replace uncompressed_size_buffer with compressed_size_bufferH.J. Lu2015-04-041-9/+9
|
* Extract get_uncompressed_sizeH.J. Lu2015-04-042-9/+27
| | | | | * compress.c (get_uncompressed_size): New. Extracted from ... (bfd_init_section_decompress_status): This. Use it.
* Add a dw2-3.S testH.J. Lu2015-04-046-26/+544
| | | | | | | | | | | | | | | | | | This patch adds a dw2-3.S test for upcoming SHF_COMPRESSED test. The existing dw2-1.S/dw2-2.S tests generate non-compressed debug sections for SHF_COMPRESSED since SHF_COMPRESSED compressed debug sections are bigger. * binutils-all/compress.exp (testfile): Remove suffix. (compressedfile): Likewise. (compressedfile2): Likewise. (libfile): Likewise. (testfile3): New. (compressedfile3): Likewise. Updated. Add a dw2-3.S test. * binutils-all/dw2-3.S: New file. * binutils-all/dw2-3.W: Likewise.