The branch, jankratochvil/gdbserverbuildid has been updated discards 3171af3f0d52566436bfbb544758fd8e5372f53c (commit) discards 8cb61941a03a2647fa2680a981e86e077500bcdf (commit) discards 3097279b4a4c4590317d36f489efc29b1e217ce6 (commit) discards dbc6fdd2968330772747db4ea3b024a9a925c958 (commit) discards 6b0dd754694c53ec5278274abe7778616b830667 (commit) discards e7c6f467f1374abd2d0516445719a68a7ba64992 (commit) discards d4b93cdd9c284f0de78f94496134df4bda26f623 (commit) discards 79113b1d6bb776b368bc8dce5d0c24069483b031 (commit) discards 93541ffefede68436032e9c36d43fb5f70080845 (commit) via 15a8a61a24feec0d72fb9b2ac595a692a7b319ae (commit) via 4a392695fafb09376ba4af36a063ca5f1e073ac0 (commit) via d20ab6c71dbc82c0054cefe7172221f4f988b130 (commit) via 7118d91db83eea8936692946870089f62214b24c (commit) via 77f6badca315bafdccdc669b77c72c82eb4dcea0 (commit) via a4f0f78dea4bc7c217f37eeb96d152c94d17144f (commit) via f648db58d39a4ca74a2d88fb29f6a07fb9293ad8 (commit) via b337babae0bc75fbc5edc6fb5127ab061ffc86ac (commit) via fe920c7544f49c8cbb3c386bba7dbf697e88f5e1 (commit) via c24cf8b6e831967c353f0c518e180cea689c0b58 (commit) via ec92c392f7d6b4f43d6191a0d3fa1cd47db9f738 (commit) via 999bf65c4b277ffc40dc32f377cf99de0f9684b3 (commit) via 05adc73e8266faab5abd485237cb59bb69a4f936 (commit) via 6048b9501dec2a621a336bffdc6675646437a000 (commit) via 8bcfb00a77f64a4496de90355f8c46b0da643e84 (commit) via 884e37dceb64daa1c6d33f007fb294e809c47847 (commit) via 148e57e2327e27e3d8bb6040138ea0843cf55e33 (commit) via f48088c7de251319d9f874d07317d867e0cf66cb (commit) via e2f6c966284e2f204779e9c7becf260bd4fe5117 (commit) via c30568d4d17d1a1efa62d2f36651fd0228b0b8e5 (commit) via 6caf711179d96da75860b79434bc792c92c0fa4c (commit) via 288c6b306e6e5531647968bdcd99594bf0483802 (commit) via 2e6976a881711242cc151971b83e36844edbc310 (commit) via e57190430e09d0df5c2277a527eb2bed4328fd6c (commit) via b41c812c966de02326a9df6c57db648feb26dceb (commit) via b8985e5c0e880ddaac7dd42171fca4359f85ea95 (commit) via 1d63324c56f29034782396ce7f25c09edd0cdc6e (commit) via 0172b6a7deca953ff33b4458da2f4e666bee7e51 (commit) via 1d09f4731b514c2e9b352639329a82189e0590ff (commit) via 06c868a8dc5ef46ab7dd6601c8bc2f417e415af9 (commit) via dea80df0999ae0bad56e79af2a88a30be38bb8e4 (commit) via 0c7e1a4602a41a1caf637823f67948be31d27732 (commit) via a52e6fd34add3dbf267ac78e4d7912a0a3f65ece (commit) via d68d7e6b82b5dbdcc98dcb8c03530f3ed1f6173a (commit) via c24ff48c7517fb7d435e22568add0f12d8b00d16 (commit) via 9c1fcd01cf4f222b7065af353cedc3f9701c739c (commit) via c712f1e3f711d0f3b694cdfcf4a965d8419fde94 (commit) via 1f5afe1cc03bb2cd50b75a21d491a349d7011ea1 (commit) via f7c77d9323a3dcd6e52a8038d0cdab0748e5bc62 (commit) via 11aa919a07114ba99a99a7dcd43079440bbe5161 (commit) via d4ccb5e05c99c4006fe43ab08ebe13b7a74fc111 (commit) via a2a0d05662961e9d59fe2ddf9026319d53022ac0 (commit) via 167e1c1f1fde89cb29a9dae05a9c6cac5d27fdb2 (commit) via fbe383b9ee1b597e294ee41b795308d504fd09f5 (commit) via 49f2e27ce40a556955e70b6fa70ac6d17d6756de (commit) via 49840f2a6669ae2366c522da41edf615785b3626 (commit) via c296d686edc052490d31385f9a2712462b33f648 (commit) via 2b8118237ae25785e3afddafd9c554b1ad03d424 (commit) via ed4123e58e954741e724872b509b5fc89415cbb5 (commit) via 182a105a387c08da7daaba548d84bc42f73edd87 (commit) via 8d052926671eb0e8c83ffab6d15a98790c215a36 (commit) via b9366cf3955d81e26537ea1932b183dbdf237361 (commit) via e5b98723a5f36c5bc32d465deefd20c334627f5a (commit) via 5a026fc9a26fa613b67cffe87f8cf3b91bb186b4 (commit) via dc6ae99692892c869dc068c0cfd842168078305c (commit) via c3301df1daed30afd62d8d2f8895d5aadfafb514 (commit) via d4ae5fb0b5d1ae4270b3343509e8bd2d529aa291 (commit) via d6b6434614d9752d705d4f3199c3d59330938c66 (commit) via 221c28eceaa29411ef2f54f02f329c39c757e4ca (commit) via df359aa7ab836525492570af920654f46dc005ba (commit) via 5a1e8c7a83c17df130a48fb0a736cde6f22bfca9 (commit) via 350e1a768cca6deab7aeca8adcff9561faeb1f35 (commit) via c307e84195f4cc97bf73fcefcb947f73a17b1141 (commit) via a69900ae4ef5a53f7709c15a4aead39417196dce (commit) via 5db9f0bdb5e676187a13300b26383a01aa0f89dd (commit) via 167ad85bf06582759e8dfe021aac9da79b81340d (commit) via 5e3a2c38d793123e32547f165f18b362438ce603 (commit) via 0021d171fa6d986c1fd6ba73308e7387fbaabcd8 (commit) via 8bc2fe488957946d2cdccda3ce8d4f39e4003ea0 (commit) via 638c5f496205e1209547f3f6303f773270882173 (commit) via 6d03af93d24ffd30f19e66753106fc85ea0a51e4 (commit) via b3ccfe11d3b0fc84f8ccd4e4fa25b75d1dc71cfc (commit) via 55d9b4c146716a683d9fea769e5f4106eadb30fc (commit) via 646f4417760ab12c0d955dabf821d8737d94335a (commit) via 288c211f8c66a8d065cfd59f110e2fbc33ccce25 (commit) via e0c0f156b4b0a32293c1a48c296d8035244e3951 (commit) via 0e5c45554bc3d274809e688d3bfb8e5438cc3539 (commit) via c792917cdc10a5ada2f4f73ecb39c764756bf994 (commit) via 8a1373cc51a55646633a9bedefbf722e5a3486ed (commit) via 91f83b0228f795e4acb8ac6e6690c6276cbec599 (commit) via f1aea813c89e437501f00617279b99b939a4b889 (commit) via ee8e9165af41505e5b33397afdbe5c424d5aa52c (commit) via 51a9c8c5f8931d601a67494e8a65450083b35f92 (commit) via 5893c83a47db6f00e183a271f3b330dcd8efd069 (commit) via 7701725167853ea4fcb9698e29e466d3b6541ddd (commit) via c63043aae739e147ad1da015d48ecceeb8b3fef9 (commit) via fa47fa924667f5d668faf24412dea39150e14a2a (commit) via bbefd0a9264348d04783d3d374c2104ae468c799 (commit) via 32ed590d7eb359de7bf8da2e8fd3f43f1cfe0bcf (commit) via 3c865fca872570ba07c4a16fb262e0487b66bf0a (commit) via c1966e261a3c0e0a32639d464a5ebee83aa31144 (commit) via f32d1b7f589d70c6f5e15f83b0f6f94ef18bb1dd (commit) via 7b0278dcad72af1db86e6ecf91751dbc45e3b071 (commit) via a3271a3e6c841729a9ece40af973e275ea2de875 (commit) via 60d847df0b9691b7cb38bfba41b9d6aafd97efc2 (commit) via 61d1ce24e894c08a701efc5794012161ef101a60 (commit) via 9b12c500635117c977f5b64bc0fe23749aaf9acd (commit) via beacaa966be202228a7905474013dfb199f36e14 (commit) via 800d982336156359cad5f98ba26a249a94f13108 (commit) via 918fc1f8d23c634227c871b67ccb4ed32d0df83c (commit) via 98ff9231545f9ba7221ad64ec1ff17cf52cafc07 (commit) via ce15efd88c41c2b323ef37aed9c24f0557d8b2ca (commit) via 023db19c6b0dc1345631d708425a9cb694cafa92 (commit) via 8668be63cff2c8efe312e1d6a354fd8b69cd2d89 (commit) via 5ec18f2b48ab74bbbaf436324ce3947df3bc048e (commit) via 7d03f2eb64305b386f2ae8b733e0a2a143fd4ffd (commit) via 592fdf42efd9a583248e4e61bdf71a23ad60d284 (commit) via c5cec84eb377b0f378ccd840d3eb048c084c8d8a (commit) from 3171af3f0d52566436bfbb544758fd8e5372f53c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 15a8a61a24feec0d72fb9b2ac595a692a7b319ae Author: Jan Kratochvil Date: Sun Mar 9 19:51:37 2014 +0100 Tests for validate symbol file using build-id Hi, new testcase. Jan gdb/testsuite/ 2014-02-26 Aleksandar Ristovski Date: Wed Mar 19 21:39:22 2014 +0100 Validate symbol file using build-id Hi, consumer part of the "build-id" attribute. Jan gdb/ 2014-02-26 Aleksandar Ristovski Validate symbol file using build-id. * NEWS (Changes since GDB 7.7): Add 'set solib-build-id-force' and 'show solib-build-id-force'. Add build-id attribute. * solib-darwin.c (_initialize_darwin_solib): Assign validate value. * solib-dsbt.c (_initialize_dsbt_solib): Ditto. * solib-frv.c (_initialize_frv_solib): Ditto. * solib-ia64-hpux.c (ia64_hpux_target_so_ops): Ditto. * solib-irix.c (_initialize_irix_solib): Ditto. * solib-osf.c (_initialize_osf_solib): Ditto. * solib-pa64.c (_initialize_pa64_solib): Ditto. * solib-som.c (_initialize_som_solib): Ditto. * solib-spu.c (set_spu_solib_ops): Ditto. * solib-svr4.c: Include rsp-low.h. (NOTE_GNU_BUILD_ID_NAME): New define. (svr4_validate): New function. (library_list_start_library): Parse 'build-id' attribute. (svr4_library_attributes): Add 'build-id' attribute. (_initialize_svr4_solib): Assign validate value. * solib-target.c (solib.h): Include. (_initialize_solib_target): Assign validate value. * solib.c (solib_build_id_force, show_solib_build_id_force): New. (solib_map_sections): Use ops->validate. (clear_so): Free build_id. (default_solib_validate): New function. (_initialize_solib): Add "solib-build-id-force". * solib.h (default_solib_validate): New declaration. * solist.h (struct so_list): New fields 'build_idsz' and 'build_id'. (target_so_ops): New field 'validate'. gdb/doc/ 2014-03-02 Jan Kratochvil * gdb.texinfo (Files): Add 'set solib-build-id-force' and 'show solib-build-id-force'. commit d20ab6c71dbc82c0054cefe7172221f4f988b130 Author: Jan Kratochvil Date: Wed Mar 19 21:39:21 2014 +0100 gdbserver build-id attribute generator Hi, producer part of the new "build-id" XML attribute. Jan gdb/ 2014-02-26 Aleksandar Ristovski Date: Wed Mar 19 21:39:21 2014 +0100 Move linux_find_memory_regions_full & co. Hi, this should be just a move with no changes. Jan gdb/ 2014-02-26 Aleksandar Ristovski Date: Wed Mar 19 21:39:21 2014 +0100 Prepare linux_find_memory_regions_full & co. for move Hi, prepare code for move into gdb/common/. Jan gdb/ 2014-02-26 Aleksandar Ristovski Date: Wed Mar 19 21:39:20 2014 +0100 Create empty common/linux-maps.[ch] and common/common-target.[ch] Hi, prepare new files for later move. Jan gdb/ 2014-02-26 Aleksandar Ristovski Date: Wed Mar 19 21:39:20 2014 +0100 Merge multiple hex conversions Hi, here most of the patch has been reimplemented in the meantime and this is only a small remaint. Jan gdb/ 2014-02-26 Aleksandar Ristovski Date: Wed Mar 19 21:39:20 2014 +0100 Move utility functions to common/ Hi, some parts of the former patch have been reimplemented in the meantime by other patches so this is only a part of the former cleanup. Jan gdb/ 2014-02-26 Aleksandar Ristovski Date: Wed Mar 19 21:39:20 2014 +0100 +README.archer commit c24cf8b6e831967c353f0c518e180cea689c0b58 Author: Nick Clifton Date: Wed Mar 19 16:48:02 2014 +0000 This is a fix for PR binutils/16723, where a corrupt .gnu.version_r section could send readelf into an infinite loop. * readelf.c (process_version_sections): Prevent an infinite loop when the vn_next field is zero but there are still entries to be processed. commit ec92c392f7d6b4f43d6191a0d3fa1cd47db9f738 Author: Jose E. Marchesi Date: Wed Mar 19 16:43:41 2014 +0000 This patch adds support for the hyperprivileged registers %hstick_offset and %hstick_enable to the Sparc assembler. * config/tc-sparc.c (hpriv_reg_table): Added entries for %hstick_offset and %hstick_enable. * doc/c-sparc.texi (Sparc-Regs): Document the %hstick_offset and %hstick_enable hyperprivileged registers. * sparc-dis.c (v9_hpriv_reg_names): Names for %hstick_offset and %hstick_enable added. * gas/sparc/rdhpr.s: Test rd %hstick_offset and %hstick_enable. * gas/sparc/rdhpr.d: Likewise. * gas/sparc/wrhpr.s: Test wr %hstick_offset and %hstick_enable. * gas/sparc/wrhpr.d: Likewise. commit 999bf65c4b277ffc40dc32f377cf99de0f9684b3 Author: Jose E. Marchesi Date: Wed Mar 19 16:22:31 2014 +0000 Fix Sparc test which was failing in the presence of new v9 opcodes. * gas/sparc/ldd_std.d: Fix objdump invocation in order to get the old opcodes for the ldtw, ldtwa, stw and stwa instructions. commit 05adc73e8266faab5abd485237cb59bb69a4f936 Author: Pedro Alves Date: Wed Mar 19 13:05:43 2014 +0000 gdb.base/async.exp: Enable it. There's no reason not to enable this test anymore. Even if the current output isn't ideal (we mess up the prompt), it's what we have today. We can adjust the test if the output improves. gdb/testsuite/ 2014-03-19 Pedro Alves * gdb.base/async.exp: Remove early return. commit 6048b9501dec2a621a336bffdc6675646437a000 Author: Pedro Alves Date: Wed Mar 19 15:22:45 2014 +0000 gdb.base/async.exp: Make test messages unique. $ cat gdb.sum| grep PASS| sort | uniq -c |sort -n 1 PASS: gdb.base/async.exp: finish& 1 PASS: gdb.base/async.exp: jump& 1 PASS: gdb.base/async.exp: next& 1 PASS: gdb.base/async.exp: nexti& 1 PASS: gdb.base/async.exp: set exec-done-display off 1 PASS: gdb.base/async.exp: set exec-done-display on 1 PASS: gdb.base/async.exp: set target-async on 1 PASS: gdb.base/async.exp: stepi& 1 PASS: gdb.base/async.exp: until& 2 PASS: gdb.base/async.exp: step& gdb/testsuite/ 2014-03-19 Pedro Alves * gdb.base/async.exp (step& tests): Pass explicit test messages. commit 8bcfb00a77f64a4496de90355f8c46b0da643e84 Author: Pedro Alves Date: Wed Mar 19 15:22:45 2014 +0000 gdb.base/async.exp: Fix races. This test is currently racy: PASS: gdb.base/async.exp: step& stepi& (gdb) 0x0000000000400547 14 x = 5; x = 5; completed. PASS: gdb.base/async.exp: stepi& nexti& (gdb) 15 y = 3; completed.FAIL: gdb.base/async.exp: nexti& The problem is here: -re "^$command\r\n${before_prompt}${gdb_prompt}${after_prompt}completed\.\r\n" { pass "$command" } -re "$gdb_prompt.*completed\.$" { fail "$command" } Note how the fail pattern is a subset of the pass pattern. If the expect buffer happens to end up with: "^$command\r\n${before_prompt}${gdb_prompt}${after_prompt}completed\." that is, the final "\r\n" has't reached the expect buffer yet, but "completed." has, then the fail pattern matches... gdb/testsuite/ 2014-03-19 Pedro Alves * gdb.base/async.exp (test_background): Expect \r\n after "completed." in the fail pattern. commit 884e37dceb64daa1c6d33f007fb294e809c47847 Author: Pedro Alves Date: Wed Mar 19 15:22:45 2014 +0000 gdb.base/async.exp: Factor out test pattern to a procedure. All the tests here follow the same pattern (and they all have the same problem, not fixed here yet). Add a new procedure, factoring out the pattern to a simple place. gdb/testsuite/ 2014-03-19 Pedro Alves * gdb.base/async.exp (test_background): New procedure. Use it for all background execution command tests. commit 148e57e2327e27e3d8bb6040138ea0843cf55e33 Author: Pedro Alves Date: Wed Mar 19 15:22:44 2014 +0000 gdb.base/async.exp: Use prepare_for_testing. gdb/testsuite/ 2014-03-19 Pedro Alves * gdb.base/async.exp: Use prepare_for_testing. commit f48088c7de251319d9f874d07317d867e0cf66cb Author: Pedro Alves Date: Wed Mar 19 15:22:44 2014 +0000 gdb.base/async.exp: Fix stepi& test. Currently the test assumes that "stepi" over: 13 x = 5; end up somewhere midline. But, (at least) on x86, that assignment ends up compiled as just one movl instruction, so a stepi stops at the next line already: completed. PASS: gdb.base/async.exp: step & step& (gdb) foo () at ../../../src/gdb/testsuite/gdb.base/async.c:13 13 x = 5; completed. PASS: gdb.base/async.exp: step & stepi& (gdb) 14 y = 3; completed. FAIL: gdb.base/async.exp: (timeout) stepi & nexti& (gdb) 16 return x + y; completed. FAIL: gdb.base/async.exp: (timeout) nexti & finish& Run till exit from #0 foo () at ../../../src/gdb/testsuite/gdb.base/async.c:16 This patch fixes it, by making sure there's more than one instruction in that line. gdb/testsuite/ 2014-03-19 Pedro Alves * gdb.base/async.c (foo): Make 'x' volatile. Write to it twice in the same line. commit e2f6c966284e2f204779e9c7becf260bd4fe5117 Author: Pedro Alves Date: Wed Mar 19 15:22:44 2014 +0000 gdb.base/async.exp: Don't hardcode line numbers. gdb/testsuite/ 2014-03-19 Pedro Alves * gdb.base/async.c (main): Add "jump here" and "until here" line marker comments. * gdb.base/async.exp (jump_here): New global. (jump& test): Use it. (until_here): New global. (until& test): Use it. commit c30568d4d17d1a1efa62d2f36651fd0228b0b8e5 Author: Pedro Alves Date: Wed Mar 19 15:22:44 2014 +0000 gdb.base/async.exp: Leave gdb_protocol alone. Many eons ago, async was only implemented in the remote target, and you'd activate it by doing "target async" rather than "target remote". That's long gone now, replaced by "set target-async on". gdb/testsuite/ 2014-03-19 Pedro Alves * gdb.base/async.exp: Don't frob gdb_protocol. commit 6caf711179d96da75860b79434bc792c92c0fa4c Author: Nick Clifton Date: Wed Mar 19 14:46:15 2014 +0000 Improve .rsrc section merging again. This time with an algorithm that should work for all types of input .rsrc section. * peXXigen.c (rsrc_process_section): Add code to scan input sections and record their lengths. Use these lengths to find the start of each merged .rsrc section. * scripttempl/pe.sc (R_RSRC): Fix default-manifest exclusion. (.rsrc): Add SUBALIGN(4). Remove SORT. * scripttempl/pep.sc: Likewise. commit 288c6b306e6e5531647968bdcd99594bf0483802 Author: Nick Clifton Date: Wed Mar 19 14:43:00 2014 +0000 Remove spurious character. commit 2e6976a881711242cc151971b83e36844edbc310 Author: Daniel Gutson Date: Wed Mar 19 14:31:25 2014 +0000 Add support for ARM assembler produced by CodeCompositor Studio. * config/tc-arm.c (codecomposer_syntax): New flag that states whether the CCS syntax compatibility mode is on or off. (asmfunc_states): New enum to represent the asmfunc directive state. (asmfunc_state): New variable holding the asmfunc directive state. (comment_chars): Rename to arm_comment_chars. (line_separator_chars): Rename to arm_line_separator_chars. (s_ccs_ref): New function that handles the .ref directive. (asmfunc_debug): New function. (s_ccs_asmfunc): New function that handles the .asmfunc directive. (s_ccs_endasmfunc): New function that handles the .endasmfunc directive. (s_ccs_def): New function that handles the .def directive. (tc_start_label_without_colon): New function. (md_pseudo_table): Added new CCS directives. (arm_ccs_mode): New function that handles the -mccs command line option. (arm_long_opts): Added new -mccs command line option. * config/tc-arm.h (LABELS_WITHOUT_COLONS): New macro. (TC_START_LABEL_WITHOUT_COLON): New macro. (tc_start_label_without_colon): Added extern function declaration. (tc_comment_chars): Define. (tc_line_separator_chars): Define. * app.c (do_scrub_begin): Use tc_line_separator_chars, if defined. * read.c (read_begin): Likewise. * doc/as.texinfo: Add documentation for the -mccs command line option. * doc/c-arm.texi: Likewise. * doc/internals.texi: Document tc_line_separator_chars. * NEWS: Mention the new feature. * gas/arm/ccs.s: New test case. * gas/arm/ccs.d: New expected disassembly. commit e57190430e09d0df5c2277a527eb2bed4328fd6c Author: Nick Clifton Date: Wed Mar 19 12:21:39 2014 +0000 Fix RX linker testsuite failures by making the assembler use conventional section names. * config/default.exp (ASFLAGS): For the RX target add: -muse-conventional-section-names. commit b41c812c966de02326a9df6c57db648feb26dceb Author: Nick Clifton Date: Wed Mar 19 09:40:21 2014 +0000 Fix typo in changelog entry. commit b8985e5c0e880ddaac7dd42171fca4359f85ea95 Author: Nick Clifton Date: Wed Mar 19 09:38:25 2014 +0000 Fix RX gas testsuite failures by accounting for new variations in the disassembler's output. * rx-decode.opc (bwl): Allow for bogus instructions with a size field of 3. (sbwl, ubwl, SCALE): Likewise. * rx-decode.c: Regenerate. * gas/rx/mov.d: Update expected disassembly. commit 1d63324c56f29034782396ce7f25c09edd0cdc6e Author: Nick Clifton Date: Wed Mar 19 08:51:20 2014 +0000 Improve .rsrc section merging with better handling of the alignment adjustments made between merged .rsrc sections. * peXXigen.c (rsrc_align): New function. Attempts to cope with alignment variances when .rsrc sections are merged. (rsrc_process_section): Use rsrc_align. * Makefile.am (default-manifest.o): Use WINDRES_FOR_TARGET. * Makefile.in: Regenerate. * emultempl/default-manifest.rc: Fix typo. * scripttempl/pe.sc (R_RSRC): Fix default-manifest exclusion. (.rsrc): Add SUBALIGN(4). * scripttempl/pep.sc: Likewise. commit 0172b6a7deca953ff33b4458da2f4e666bee7e51 Author: Doug Evans Date: Tue Mar 18 19:19:51 2014 -0400 * gdb.base/async.exp: Whitespace fixes. Turn on target-async. Fix spelling of exec-done-display. commit 1d09f4731b514c2e9b352639329a82189e0590ff Author: Alan Modra Date: Wed Mar 19 09:30:42 2014 +1030 daily update commit 06c868a8dc5ef46ab7dd6601c8bc2f417e415af9 Author: Jan Kratochvil Date: Tue Mar 18 22:48:06 2014 +0100 Fix SIGTERM signal safety (PR gdb/15358). gdb/ 2014-03-18 Jan Kratochvil PR gdb/15358 * defs.h (sync_quit_force_run): New declaration. (QUIT): Check also SYNC_QUIT_FORCE_RUN. * event-top.c (async_sigterm_handler): New declaration. (async_sigterm_token): New variable. (async_init_signals): Create also async_sigterm_token. (async_sigterm_handler): New function. (sync_quit_force_run): New variable. (handle_sigterm): Replace quit_force call by other calls. * utils.c (quit): Call quit_force if SYNC_QUIT_FORCE_RUN. gdb/testsuite/ 2014-03-18 Jan Kratochvil PR gdb/15358 * gdb.base/gdb-sigterm.c: New file. * gdb.base/gdb-sigterm.exp: New file. Message-ID: <20140316135334.GA30698@host2.jankratochvil.net> commit dea80df0999ae0bad56e79af2a88a30be38bb8e4 Author: Maciej W. Rozycki Date: Tue Mar 18 19:39:41 2014 +0000 Power: Correct little-endian e500v2 GPR frame offsets This change corrects GPR frame offset calculation for the e500v2 processor. On this target, featuring the SPE APU, GPRs are 64-bit and are held in stack frames whole with the use of `evstdd' and `evldd' instructions. Their integer 32-bit part occupies the low-order word and therefore its offset varies between the two endiannesses possible. * rs6000-tdep.c (rs6000_frame_cache): Correct little-endian GPR offset into SPE pseudo registers. commit 0c7e1a4602a41a1caf637823f67948be31d27732 Author: Pedro Alves Date: Tue Mar 18 17:50:28 2014 +0000 PR gdb/13860: make "-exec-foo"'s MI output equal to "foo"'s MI output. Part of PR gdb/13860 is about the mi-solib.exp test's output being different in sync vs async modes. sync: >./gdb -nx -q ./testsuite/gdb.mi/solib-main -ex "set stop-on-solib-events 1" -ex "set target-async off" -i=mi =thread-group-added,id="i1" ~"Reading symbols from /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main..." ~"done.\n" (gdb) &"start\n" ~"Temporary breakpoint 1 at 0x400608: file ../../../src/gdb/testsuite/gdb.mi/solib-main.c, line 21.\n" =breakpoint-created,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x0000000000400608",func="main",file="../../../src/gdb/testsuite/gdb.mi/solib-main.c",fullname="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/solib-main.c",line="21",times="0",original-location="main"} ~"Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main \n" =thread-group-started,id="i1",pid="17724" =thread-created,id="1",group-id="i1" ^running *running,thread-id="all" (gdb) =library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1" ~"Stopped due to shared library event (no libraries added or removed)\n" *stopped,reason="solib-event",frame={addr="0x000000379180f990",func="_dl_debug_state",args=[],from="/lib64/ld-linux-x86-64.so.2"},thread-id="1",stopped-threads="all",core="3" (gdb) async: >./gdb -nx -q ./testsuite/gdb.mi/solib-main -ex "set stop-on-solib-events 1" -ex "set target-async on" -i=mi =thread-group-added,id="i1" ~"Reading symbols from /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main..." ~"done.\n" (gdb) start &"start\n" ~"Temporary breakpoint 1 at 0x400608: file ../../../src/gdb/testsuite/gdb.mi/solib-main.c, line 21.\n" =breakpoint-created,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x0000000000400608",func="main",file="../../../src/gdb/testsuite/gdb.mi/solib-main.c",fullname="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/solib-main.c",line="21",times="0",original-location="main"} ~"Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main \n" =thread-group-started,id="i1",pid="17729" =thread-created,id="1",group-id="i1" ^running *running,thread-id="all" =library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1" (gdb) *stopped,reason="solib-event",thread-id="1",stopped-threads="all",core="1" For now, let's focus only on the *stopped event. We see that the async output is missing frame info. And this causes a test failure in async mode, as "mi_expect_stop solib-event" wants to see the frame info. However, if we compare the event output when a real MI execution command is used, compared to a CLI command (e.g., run vs -exec-run, next vs -exec-next, etc.), we see: >./gdb -nx -q ./testsuite/gdb.mi/solib-main -ex "set stop-on-solib-events 1" -ex "set target-async off" -i=mi =thread-group-added,id="i1" ~"Reading symbols from /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main..." ~"done.\n" (gdb) r &"r\n" ~"Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main \n" =thread-group-started,id="i1",pid="17751" =thread-created,id="1",group-id="i1" ^running *running,thread-id="all" (gdb) =library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1" ~"Stopped due to shared library event (no libraries added or removed)\n" *stopped,reason="solib-event",frame={addr="0x000000379180f990",func="_dl_debug_state",args=[],from="/lib64/ld-linux-x86-64.so.2"},thread-id="1",stopped-threads="all",core="3" (gdb) -exec-run =thread-exited,id="1",group-id="i1" =thread-group-exited,id="i1" =library-unloaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",thread-group="i1" =thread-group-started,id="i1",pid="17754" =thread-created,id="1",group-id="i1" ^running *running,thread-id="all" (gdb) =library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1" *stopped,reason="solib-event",thread-id="1",stopped-threads="all",core="1" =thread-selected,id="1" (gdb) As seen above, with MI commands, the *stopped event _doesn't_ have frame info. This is because normal_stop, as commanded by the result of bpstat_print, skips printing frame info in this case (it's an "event", not a "breakpoint"), and when the interpreter is MI, mi_on_normal_stop skips calling print_stack_frame, as the normal_stop call was already done with the MI uiout. This explains why the async output is different even with a CLI command. Its because in async mode, the mi_on_normal_stop path is always taken; it is always reached with the MI uiout, because the stop is handled from the event loop, instead of from within `proceed -> wait_for_inferior -> normal_stop' with the interpreter overridden, as in sync mode. This patch fixes the issue by making all cases output the same *stopped event, by factoring out the print code from normal_stop, and using it from mi_on_normal_stop as well. I chose the *stopped output without a frame, mainly because that is what you already get if you use MI execution commands, the commands frontends are supposed to use (except when implementing a console). This patch makes it simpler to tweak the MI output differently if desired, as we only have to change the centralized print_stop_event (taking into account whether the uiout is MI-like), and all different modes will change accordingly. Tested on x86_64 Fedora 17, no regressions. The mi-solib.exp test no longer fails in async mode with this patch, so the patch removes the kfail. 2014-03-18 Pedro Alves PR gdb/13860 * inferior.h (print_stop_event): Declare. * infrun.c (print_stop_event): New, factored out from ... (normal_stop): ... this. * mi/mi-interp.c (mi_on_normal_stop): Use print_stop_event instead of bpstat_print/print_stack_frame. 2014-03-18 Pedro Alves PR gdb/13860 * gdb.mi/mi-solib.exp: Remove gdb/13860 kfail. * lib/mi-support.exp (mi_expect_stop): Add special handling for solib-event. commit a52e6fd34add3dbf267ac78e4d7912a0a3f65ece Author: Yufeng Zhang Date: Tue Mar 18 17:41:43 2014 +0000 Enable verbose error messages by default for AArch64 gas. gas/ * config/tc-aarch64.c (aarch64_opts): Add new option "mno-verbose-error". (verbose_error_p): Initialize to 1. * doc/c-aarch64.texi (AArch64 Options): Document -mverbose-error and -mno-verbose-error. gas/testsuite/ * gas/aarch64/illegal.d: Pass -mno-verbose-error. * gas/aarch64/verbose-error.s: Add more verbose message testcases. * gas/aarch64/verbose-error.l: Ditto. commit d68d7e6b82b5dbdcc98dcb8c03530f3ed1f6173a Author: Nick Clifton Date: Tue Mar 18 14:16:54 2014 +0000 Convert function declarations to ISO C format. Remove redundant code. * wrapper.c: Convert function declarations to ISO C format. (sim_open): Delete code for handling t,d and z command line options. commit c24ff48c7517fb7d435e22568add0f12d8b00d16 Author: Alan Modra Date: Tue Mar 18 09:30:50 2014 +1030 daily update commit 9c1fcd01cf4f222b7065af353cedc3f9701c739c Author: Tom Tromey Date: Mon Mar 17 19:02:13 2014 +0000 fix latent bugs in ui-out.c The destructor code in ui-out.c has a latent bug, which is hidden by the fact that nothing uses this right now. This patch fixes the problem. The bug is that we don't always clear a pointer in the ui-out object, leading to a bad free. 2014-03-17 Tom Tromey * ui-out.c (clear_table, ui_out_new): Clear uiout->table.id. commit c712f1e3f711d0f3b694cdfcf4a965d8419fde94 Author: Chris Faylor Date: Mon Mar 17 13:09:15 2014 -0400 2014-03-17 Christopher Faylor * Makefile.am: Use host version of windres. * Makefile.in: Regenerate. commit 1f5afe1cc03bb2cd50b75a21d491a349d7011ea1 Author: Nick Clifton Date: Mon Mar 17 16:30:30 2014 +0000 Add support for parsing VFP register names in .cfi_offset directives. PR gas/16694 * config/tc-arm.c (tc_arm_regname_to_dw2regnum): Parse VFP registers as well. * gas/cfi/cfi-arm-1.s: Add checks of VFP registers. * gas/cfi/cfi-arm-1.d: Update expected output. commit f7c77d9323a3dcd6e52a8038d0cdab0748e5bc62 Author: Joel Brobecker Date: Mon Mar 17 08:41:48 2014 -0700 [testsuite/Ada] New testcase for packed array renaming. gdb/testsuite/ChangeLog: * gdb.ada/pckd_arr_ren: New testcase. commit 11aa919a07114ba99a99a7dcd43079440bbe5161 Author: Pierre-Marie de Rodat Date: Fri Mar 14 14:55:42 2014 +0100 [Ada] Crash with references to GNAT packed arrays handling Consider the following declarations: type Packed_Array is array (Natural range <>) of Boolean; pragma Pack (Packed_Array); function Make (H, L : Natural) return Packed_Array is begin return (H .. L => False); end Make; A1 : Packed_Array := Make (1, 2); A2 : Packed_Array renames A1; One possible DWARF translation for A2 is: <3><1e4>: Abbrev Number: 21 (DW_TAG_variable) <1e5> DW_AT_name : a2 <1ea> DW_AT_type : <0x1d9> <3><1d9>: Abbrev Number: 22 (DW_TAG_const_type) <1da> DW_AT_type : <0x1de> <3><1de>: Abbrev Number: 23 (DW_TAG_reference_type) <1e0> DW_AT_type : <0x1a3> <3><1a3>: Abbrev Number: 17 (DW_TAG_array_type) <1a4> DW_AT_name : foo__Ta1S___XP1 <1a8> DW_AT_GNAT_descriptive_type: <0x16b> <3><16b>: Abbrev Number: 6 (DW_TAG_typedef) <16c> DW_AT_name : foo__Ta1S <172> DW_AT_type : <0x176> <3><176>: Abbrev Number: 17 (DW_TAG_array_type) <177> DW_AT_name : foo__Ta1S <17b> DW_AT_GNAT_descriptive_type: <0x223> Here, foo__Ta1S___XP1 is the type used for the code generation while foo__Ta1S is the source-level type. Both form a valid GNAT encoding for a packed array type. Trying to print A2 (1) can make GDB crash. This is because A2 is defined as a reference to a GNAT encoding for a packed array. When decoding constrained packed arrays, the ada_coerce_ref subprogram follows references and returns a fixed type from the target type, peeling the GNAT encoding for packed arrays. The remaining code assumes that the resulting type is still such an encoding while we only have a standard GDB array type, hence the crash: arr = ada_coerce_ref (arr); [...] type = decode_constrained_packed_array_type (value_type (arr)); decode_constrained_packed_array_type assumes that its argument is such an encoding. From its front comment: /* The array type encoded by TYPE, where ada_is_constrained_packed_array_type (TYPE). */ This patch simply replaces the call to ada_coerce_ref with a call to coerce_ref in order to avoid prematurely transforming the packed array type as a side-effect. This way, the remaining code will always work with a GNAT encoding. gdb/ChangeLog: * ada-lang.c (decode_constrained_packed_array): Perform a minimal coercion for reference with coerce_ref instead of ada_coerce_ref. commit d4ccb5e05c99c4006fe43ab08ebe13b7a74fc111 Author: Tristan Gingold Date: Mon Mar 17 14:01:02 2014 +0100 darwin: handle recent version of dyld gdb/ * solib-darwin.c (DYLD_VERSION_MAX): Increase value. (darwin_solib_create_inferior_hook): Emit a warning if version is unhandled. commit a2a0d05662961e9d59fe2ddf9026319d53022ac0 Author: Nick Clifton Date: Mon Mar 17 11:00:32 2014 +0000 readelf -s test: Skip extra symbols produced by MSP430 assembler. * binutils-all/readelf.ss: Add skip of MSP430 defined symbols. commit 167e1c1f1fde89cb29a9dae05a9c6cac5d27fdb2 Author: Tristan Gingold Date: Mon Mar 17 09:46:36 2014 +0100 od-macho: dump compact unwind info. binutils/ * od-macho.c (dump_section_header): Renames of dump_section. (dump_segment): Adjust after renaming. (OPT_COMPACT_UNWIND): Define. (options): Add compact unwind. (mach_o_help): Document compact_unwind. (unwind_x86_64_regs, unwind_x86_regs): New arrays. (dump_unwind_encoding_x86, dump_unwind_encoding) (dump_obj_compact_unwind, dump_exe_compact_unwind) (dump_section_content): New functions. (mach_o_dump): Handle compact unwind. include/mach-o/ * unwind.h: New file. commit fbe383b9ee1b597e294ee41b795308d504fd09f5 Author: Tristan Gingold Date: Mon Mar 17 09:46:07 2014 +0100 mach-o: handle lasz load dylib command. bfd/ * mach-o.c (bfd_mach_o_read_dylib): Handle lazy load dylib. (bfd_mach_o_read_command): Ditto. binutils/ * od-macho.c (dump_load_command): Handle lazy load dylib. commit 49f2e27ce40a556955e70b6fa70ac6d17d6756de Author: Alan Modra Date: Mon Mar 17 09:30:41 2014 +1030 daily update commit 49840f2a6669ae2366c522da41edf615785b3626 Author: Ulrich Weigand Date: Sun Mar 16 15:01:24 2014 +0100 Fix Python 2.4 build break This fixes a build failure against Python 2.4 by casting away "const" on the second argument to PyObject_GetAttrString. Similar casts to support Python 2.4 were already present in a number of other places. gdb/ 2014-03-16 Ulrich Weigand  * python/py-value.c (get_field_flag): Cast flag_name argument to PyObject_GetAttrString to support Python 2.4. commit c296d686edc052490d31385f9a2712462b33f648 Author: Alan Modra Date: Sun Mar 16 09:30:42 2014 +1030 daily update commit 2b8118237ae25785e3afddafd9c554b1ad03d424 Author: Alan Modra Date: Sat Mar 15 09:30:57 2014 +1030 daily update commit ed4123e58e954741e724872b509b5fc89415cbb5 Author: Jan Kratochvil Date: Fri Mar 14 19:54:08 2014 +0100 Step down from being global maintainer. gdb/ 2014-03-14 Jan Kratochvil * MAINTAINERS (The Official FSF-appointed GDB Maintainers) (Global Maintainers): Remove Jan Kratochvil. commit 182a105a387c08da7daaba548d84bc42f73edd87 Author: Anthony Green Date: Fri Mar 14 12:56:12 2014 -0400 Check fwrite return code commit 8d052926671eb0e8c83ffab6d15a98790c215a36 Author: Nick Clifton Date: Fri Mar 14 15:21:23 2014 +0000 Add support for instruction level tracing to the ARM simulator. * wrapper.c (op_print): New function. (sim_dis_read): New function. (print_insn): New function - disassembles the given instruction. (sim_trace): Note that tracing is now allowed. (sim_create_inferior): Default to emulating v6. Initialise the disassembler machinery. (sim_target_parse_command_line): Add support for -t -d and -z options. (sim_target_display_usage): Note existence of -d and -z options. (sim_open): Parse -t -d and -z options. * armemu.h: Add exports of trace, disas and trace_funcs. Add prototype for print_insn. * armemu.c (ARMul_Emulate26): Add tracing code. Delete unused variables. * thumbemu (handle_v6_thumb_insn): Delete unused variable Rd. Move Rm variable into switch cases. Add tracing code. * armcopro.c (XScale_cp15_init): Add a return value. (XScale_cp13_init): Likewise. (XScale_cp14_init): Likewise. (XScale_cp15_LDC): Delete unused function. (XScale_cp15_STC): Likewise. * maverick.c: Delete comment inside comment. (DSPInit): Delete unused function. (DSPMCR4): Fix compile time warning about missing parenthesis. (DSPMCR5): Likewise. (DSPCDP6): Delete unused variable opcode2. commit b9366cf3955d81e26537ea1932b183dbdf237361 Author: David McQuillan Date: Fri Mar 14 14:03:29 2014 +0000 Prevent writes to R15 via LDR or LDM from changing the ARM/Thumb state in pre-v5 architectures. PR sim/8388 * armemu.c (WriteR15Load): New function. Determines if the state can be changed upon a write to R15. (LoadMult): Use WriteR15Load. * armemu.h (WRITEDESTB): Use WriteR15Load. commit e5b98723a5f36c5bc32d465deefd20c334627f5a Author: Alan Modra Date: Sat Mar 15 00:10:14 2014 +1030 Correct ld-powerpc/vle-reloc-2 test * ld-powerpc/vle-reloc-3.d: Remove addresses. commit 5a026fc9a26fa613b67cffe87f8cf3b91bb186b4 Author: Nick Clifton Date: Fri Mar 14 11:21:00 2014 +0000 Fix build time problem with MingGW hosts, which do not have a strnlen() function. 2014-03-13 Meador Inge * configure.in: Add strnlen to AC_CHECK_DECLS. * config.in: Regenerate. * configure: Regenerate. * sysdep.h (strnlen): Add prototype. * dwarf.c (strnlen): Move prototype ... * sysdep.h (strnlen): ... to here. commit dc6ae99692892c869dc068c0cfd842168078305c Author: Joel Brobecker Date: Fri Mar 14 08:55:26 2014 +0100 Fix guit.texi CL entry. commit c3301df1daed30afd62d8d2f8895d5aadfafb514 Author: Alan Modra Date: Fri Mar 14 15:01:53 2014 +1030 Fix overflow handling of VLE_SDA21 bfd/ * elf32-ppc.c (ppc_elf_relocate_section): Correct overflow handling for VLE_SDA21 relocs. ld/testsuite/ * ld-powerpc/vle.ld: Place .PPC.EMB.sdata0 within 32k of 0. * ld-powerpc/vle-reloc-3.d: Update. commit d4ae5fb0b5d1ae4270b3343509e8bd2d529aa291 Author: Alan Modra Date: Fri Mar 14 11:25:59 2014 +1030 Remove search path from -l:namespec DT_NEEDED For libraries without a soname, -l:libfoo.so set DT_NEEDED to the search dir plus filename, while gold and -lfoo just use the filename. This patch fixes the inconsistency. * ldlang.h (full_name_provided): New input flag. * ldlang.c (new_afile): Don't use lang_input_file_is_search_file_enum for -l:namespec. Instead use lang_input_file_is_l_enum with full_name_provided flag. * ldlfile.c (ldfile_open_file_search): Don't complete lib name if full_name_provided flag is set. * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): Handle full_name_provided libraries. Tidy EXTRA_SHLIB_EXTENSION support. Set DT_NEEDED for -l:namespec as namespec. * emultempl/aix.em (ppc_after_open_output): Handle full_name_provided. * emultempl/linux.em (gld${EMULATION_NAME}_open_dynamic_archive): Don't handle full_name_provided libraries. * emultempl/pe.em (gld${EMULATION_NAME}_open_dynamic_archive): Ditto. * emultempl/pep.em (gld${EMULATION_NAME}_open_dynamic_archive): Ditto. * emultempl/vms.em (gld${EMULATION_NAME}_open_dynamic_archive): Ditto. commit d6b6434614d9752d705d4f3199c3d59330938c66 Author: Pedro Alves Date: Fri Mar 14 00:06:45 2014 +0000 Rename native-only terminal related functions. Looking at target_terminal_inferior etc. in async mode, I realized that the naming of the terminal_inferior, terminal_ours, etc. functions doesn't really give a clue that they're meant for the native target only. This patch renames them. There's already child_terminal_info using the child_ prefix, and, they're most prominently installed by inf-child.c, so I went with the child_ prefix. I dropped "inferior" from a couple to make the name match the corresponding target method. Tested on x86_64 Fedora 17, and cross built for mingw. I didn't test gnu-nat.c, but I think the change is as obvious as it gets. I grepped the tree looking for other potential spots that would need adjustment but this is all I found. If something breaks, it should be trivial to fix. gdb/ 2014-03-14 Pedro Alves * inferior.h (terminal_ours_for_output): Rename to ... (child_terminal_ours_for_output): ... this. (terminal_save_ours): Rename to ... (child_terminal_save_ours): ... this. (terminal_ours): Rename to ... (child_terminal_ours): ... this. (terminal_inferior): Rename to ... (child_terminal_inferior): ... this. (terminal_init_inferior): Rename to ... (child_terminal_init_inferior): ... this. (terminal_init_inferior_with_pgrp): Rename to ... (child_terminal_init_inferior_with_pgrp): ... this. * inflow.c (terminal_init_inferior_with_pgrp): Rename to ... (child_terminal_init_with_pgrp): ... this. (terminal_save_ours): Rename to ... (child_terminal_save_ours): ... this. (terminal_init_inferior): Rename to ... (child_terminal_init): ... this. Adjust. (terminal_inferior): Rename to ... (child_terminal_inferior): ... this. (terminal_ours_for_output): Rename to ... (child_terminal_ours_for_output): ... this. Adjust. (terminal_ours): Rename to ... (child_terminal_ours): ... this. (terminal_ours_1): Rename to ... (child_terminal_ours_1): ... this. Adjust. * linux-nat.c (linux_nat_terminal_inferior): Adjust. * windows-nat.c (do_initial_windows_stuff): Adjust. * gnu-nat.c (gnu_terminal_init_inferior): Rename to ... (gnu_terminal_init): ... this. Adjust. (gnu_target): Adjust. * inf-child.c (inf_child_target): Adjust. commit 221c28eceaa29411ef2f54f02f329c39c757e4ca Author: Alan Modra Date: Fri Mar 14 09:31:24 2014 +1030 daily update commit df359aa7ab836525492570af920654f46dc005ba Author: Richard Earnshaw Date: Thu Mar 13 17:10:04 2014 +0000 AArch64: Clean up docs and document -mcpu and -march. 2014-03-13 Richard Earnshaw Jiong Wang * doc/c-aarch64.texi: Clean up some formatting issues. (AArch64 Options): Document -mcpu and -march. (AArch64 Extensions): New node. commit 5a1e8c7a83c17df130a48fb0a736cde6f22bfca9 Author: Doug Evans Date: Thu Mar 13 09:55:12 2014 -0700 Fix pr 16612. * guile/scm-type.c (tyscm_copy_type_recursive): Move type to its new eq?-hashtab. testsuite/ * gdb.guile/scm-value.ep (test_value_after_death): Do a garbage collect after discarding symbols. commit 350e1a768cca6deab7aeca8adcff9561faeb1f35 Author: Doug Evans Date: Thu Mar 13 09:24:19 2014 -0700 Fix segv when referencing a value added to history after a Guile garbage collect. * value.c (record_latest_value): Call release_value_or_incref instead of release_value. testsuite/ * gdb.guile/scm-value.exp (test_value_in_inferior): Verify value added to history survives a gc. commit c307e84195f4cc97bf73fcefcb947f73a17b1141 Author: Nick Clifton Date: Thu Mar 13 12:47:05 2014 +0000 Make the new aarch64 bignum test endian agnostic. * gas/aarch64/litpool.s: Make the test endian agnostic. * gas/aarch64/litpool.d: Update expected disassembly. commit a69900ae4ef5a53f7709c15a4aead39417196dce Author: Pedro Alves Date: Wed Mar 12 12:40:40 2014 +0000 Rename Solaris's target to "target child" like most other ports. Note that "target procfs" is used by QNX, but the test must be failing there, as nto-procfs.c overrides to_open with a method that doesn't throw the error being tested. So I'm just removing the test completely. gdb/ 2014-03-13 Pedro Alves * procfs.c (procfs_target): Don't override to_shortname, to_longname or to_doc. gdb/testsuite/ 2014-03-13 Pedro Alves * gdb.base/default.exp: Don't test "target procfs". commit 5db9f0bdb5e676187a13300b26383a01aa0f89dd Author: Pedro Alves Date: Thu Mar 13 12:02:24 2014 +0000 Don't mention "Unix" in native target name. I find the mention of "Unix" unnecessary (and really slightly a lie) on GNU/Linux in a couple of places: (gdb) maint print target-stack The current target stack is: - multi-thread (multi-threaded child process.) - child (Unix child process) - exec (Local exec file) - None (None) (gdb) help target child Unix child process (started by the "run" command). (gdb) target child Use the "run" command to start a Unix child process. It's also odd that e.g., the Windows port says "Unix" in reaction to "target child" (it was already that way before Windows used inf-child.c): (gdb) target child Use the "run" command to start a Unix child process. (gdb) So drop "Unix", going in the direction of saying mostly the same on all native targets: (gdb) maint print target-stack The current target stack is: - multi-thread (multi-threaded child process.) - - child (Unix child process) + - child (Child process) - exec (Local exec file) - None (None) (gdb) help target child - Unix child process (started by the "run" command). + Child process (started by the "run" command). (gdb) target child -Use the "run" command to start a Unix child process. +Use the "run" command to start a child process. gdb/ 2014-03-13 Pedro Alves * inf-child.c (inf_child_open, inf_child_target): Don't mention Unix in user visible strings. gdb/testsuite/ 2014-03-13 Pedro Alves * gdb.base/default.exp: Update "target child" and "target procfs" tests to not expect "Unix". commit 167ad85bf06582759e8dfe021aac9da79b81340d Author: Tristan Gingold Date: Mon Dec 2 14:30:32 2013 +0100 Add pe/x86_64 bigobj file format. bfd/ * peicode.h (pe_ILF_object_p): Adjust, as the version number has been read. (pe_bfd_object_p): Also read version number to detect ILF. * pe-x86_64.c (COFF_WITH_PE_BIGOBJ): Define. (x86_64pe_bigobj_vec): Define * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_max_nscns field. (bfd_coff_max_nscns): New macro. (coff_compute_section_file_positions): Use unsigned int for target_index. Compare with bfd_coff_max_nscns. (bfd_coff_std_swap_table, ticoff0_swap_table, ticoff1_swap_table): Set a value for _bfd_coff_max_nscns. (header_bigobj_classid): New constant. (coff_bigobj_swap_filehdr_in, coff_bigobj_swap_filehdr_out) (coff_bigobj_swap_sym_in, coff_bigobj_swap_sym_out) (coff_bigobj_swap_aux_in, coff_bigobj_swap_aux_out): New functions. (bigobj_swap_table): New table. * libcoff.h: Regenerate. * coff-sh.c (bfd_coff_small_swap_table): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Add value for _bfd_coff_max_nscns. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coff-rs6000.c (bfd_xcoff_backend_data) (bfd_pmac_xcoff_backend_data): Likewise. * coff64-rs6000.c (bfd_xcoff_backend_data) (bfd_xcoff_aix5_backend_data): Likewise. * targets.c (x86_64pe_bigobj_vec): Declare. * configure.in (x86_64pe_bigobj_vec): New vector. * configure: Regenerate. * config.bfd: Add bigobj object format for Windows targets. gas/ * config/tc-i386.c (use_big_obj): Declare. (OPTION_MBIG_OBJ): Define. (md_longopts): Add -mbig-obj option. (md_parse_option): Handle it. (md_show_usage): Display help for this option. (i386_target_format): Use bigobj for x86-64 if -mbig-obj. * doc/c-i386.texi: Document the option. gas/testsuite/ * gas/pe/big-obj.d, gas/pe/big-obj.s: Add test. * gas/pe/pe.exp: Add test. include/coff/ * pe.h (struct external_ANON_OBJECT_HEADER_BIGOBJ): Declare. (FILHSZ_BIGOBJ): Define. (struct external_SYMBOL_EX): Declare. (SYMENT_BIGOBJ, SYMESZ_BIGOBJ): Define. (union external_AUX_SYMBOL_EX): Declare. (AUXENT_BIGOBJ, AUXESZ_BIGOBJ): Define. * internal.h (struct internal_filehdr): Change type of f_nscns. commit 5e3a2c38d793123e32547f165f18b362438ce603 Author: Stan Shebs Date: Wed Mar 12 19:36:45 2014 -0700 Doxygenate gdbtypes.h commit 0021d171fa6d986c1fd6ba73308e7387fbaabcd8 Author: Alan Modra Date: Thu Mar 13 09:31:14 2014 +1030 daily update commit 8bc2fe488957946d2cdccda3ce8d4f39e4003ea0 Author: Pedro Alves Date: Wed Mar 12 20:32:53 2014 +0000 Factor out foreground/background execution command preparation. All execution commands currently have this pattern: /* If we must run in the background, but the target can't do it, error out. */ if (async_exec && !target_can_async_p ()) error (_("Asynchronous execution not supported on this target.")); /* If we are not asked to run in the bg, then prepare to run in the foreground, synchronously. */ if (!async_exec && target_can_async_p ()) { /* Simulate synchronous execution. */ async_disable_stdin (); } This patch factors that into a shared function. attach_command installs a cleanup to re-enable stdin, but that's not necessary, as per the comment in prepare_execution_command. In any case, if someday it turns out necessary, we have a single place to install it now. Tested on x86_64 Fedora 17, sync and async modes. gdb/ 2014-03-12 Pedro Alves * infcmd.c (prepare_execution_command): New function, factored out from several execution commands. (run_command_1, continue_command, step_1, jump_command) (signal_command, until_command, advance_command, finish_command) (attach_command): Use prepare_execution_command. commit 638c5f496205e1209547f3f6303f773270882173 Author: Omair Javaid Date: Thu Mar 13 01:23:55 2014 +0500 Support for HWbreak/watchpoint across fork/vfork on arm-native This patch updates arm native support for hwbreak-/watchpoints to enable support for hwbreak-/watchpoints across fork/vfork. This involves changes to hwbreak-/watchpoint insertion mechanism to the modern way, by marking debug registers as needing update, but only really updating them on resume, which is necessary for supporting watchpoints in non-stop mode. This also updates a previously maintained per thread hwbreak-/watchpoint cache to a per process cache which allows target specific code to come in sync with gdb-linux calls to threads create/destroy and process fork/exit hooks. commit 6d03af93d24ffd30f19e66753106fc85ea0a51e4 Author: Pedro Alves Date: Wed Mar 12 19:40:52 2014 +0000 Make 'make check TESTS="..."' work from GDB's build dir. I noticed 'make check TESTS="..."' works when ran from gdb/testsuite/, but TESTS is ignored when "make check" is ran from gdb/. The issue is that TESTS isn't being passed to the testsuite subdir make invocation. gdb/ 2014-03-12 Pedro Alves * Makefile.in (TARGET_FLAGS_TO_PASS): Add TESTS. commit b3ccfe11d3b0fc84f8ccd4e4fa25b75d1dc71cfc Author: Tom Tromey Date: Fri Feb 28 09:47:34 2014 -0700 fix regressions with target-async A patch in the target cleanup series caused a regression when using record with target-async. Version 4 of the patch is here: https://sourceware.org/ml/gdb-patches/2014-03/msg00159.html The immediate problem is that record supplies to_can_async_p and to_is_async_p methods, but does not supply a to_async method. So, when target-async is set, record claims to support async -- but if the underlying target does not support async, then the to_async method call will end up in that method's default implementation, namely tcomplain. This worked previously because the record target used to provide a to_async method; one that (erroneously, only at push time) checked the other members of the target stack, and then simply dropped to_async calls in the "does not implement async" case. My first thought was to simply drop tcomplain as the default for to_async. This works, but Pedro pointed out that the only reason record has to supply to_can_async_p and to_is_async_p is that these default to using the find_default_run_target machinery -- and these defaults are only needed by "run" and "attach". So, a nicer solution presents itself: change run and attach to explicitly call into the default run target when needed; and change to_is_async_p and to_can_async_p to default to "return 0". This makes the target stack simpler to use and lets us remove the method implementations from record. This is also in harmony with other plans for the target stack; namely trying to reduce the impact of find_default_run_target. This approach makes it clear that find_default_is_async_p is not needed -- it is asking whether a target that may not even be pushed is actually async, which seems like a nonsensical question. While an improvement, this approach proved to introduce the same bug when using the core target. Looking a bit deeper, the issue is that code in "attach" and "run" may need to use either the current target stack or the default run target -- but different calls into the target API in those functions could wind up querying different targets. This new patch makes the target to use more explicit in "run" and "attach". Then these commands explicitly make the needed calls against that target. This ensures that a single target is used for all relevant operations. This lets us remove a couple find_default_* functions from various targets, including the dummy target. I think this is a decent understandability improvement. One issue I see with this patch is that the new calls in "run" and "attach" are not very much like the rest of the target API. I think fundamentally this is due to bad factoring in the target API, which may need to be fixed for multi-target. Tackling that seemed ambitious for a regression fix. While working on this I noticed that there don't seem to be any test cases that involve both target-async and record, so this patch changes break-precsave.exp to add some. It also changes corefile.exp to add some target-async tests; these pass with current trunk and with this patch applied, but fail with the v1 patch. This patch differs from v4 in that it moves initialization of to_can_async_p and to_supports_non_stop into inf-child, adds some assertions to complete_target_initialization, and adds some comments to target.h. Built and regtested on x86-64 Fedora 20. 2014-03-12 Tom Tromey * inf-child.c (return_zero): New function. (inf_child_target): Set to_can_async_p, to_supports_non_stop. * aix-thread.c (aix_thread_inferior_created): New function. (aix_thread_attach): Remove. (init_aix_thread_ops): Don't set to_attach. (_initialize_aix_thread): Register inferior_created observer. * corelow.c (init_core_ops): Don't set to_attach or to_create_inferior. * exec.c (init_exec_ops): Don't set to_attach or to_create_inferior. * infcmd.c (run_command_1): Use find_run_target. Make direct target calls. (attach_command): Use find_attach_target. Make direct target calls. * record-btrace.c (init_record_btrace_ops): Don't set to_create_inferior. * record-full.c (record_full_can_async_p, record_full_is_async_p): Remove. (init_record_full_ops, init_record_full_core_ops): Update. Don't set to_create_inferior. * target.c (complete_target_initialization): Add assertion. (target_create_inferior): Remove. (find_default_attach, find_default_create_inferior): Remove. (find_attach_target, find_run_target): New functions. (find_default_is_async_p, find_default_can_async_p) (target_supports_non_stop, target_attach): Remove. (init_dummy_target): Don't set to_create_inferior or to_supports_non_stop. * target.h (struct target_ops) : Add comment. Remove TARGET_DEFAULT_FUNC. : Add comment. : Use TARGET_DEFAULT_RETURN. : Add comments. (find_attach_target, find_run_target): Declare. (target_create_inferior): Remove. (target_has_execution_1): Update comment. (target_supports_non_stop): Remove. * target-delegates.c: Rebuild. 2014-03-12 Tom Tromey * gdb.base/corefile.exp (corefile_test_run, corefile_test_attach): New procs. Add target-async tests. * gdb.reverse/break-precsave.exp (precsave_tests): New proc. Add target-async tests. commit 55d9b4c146716a683d9fea769e5f4106eadb30fc Author: Nick Clifton Date: Wed Mar 12 15:44:09 2014 +0000 The value of a bignum expression is held in a single global array. This means that if multiple bignum values are encountered only the most recent is valid. If such expressions are cached, eg to be emitted into a literal pool later on in the assembly, then only one expression - the last - will be correct. This patch fixes the problem for the AArch64 target by caching each bignum value locally. PR gas/16688 * config/tc-aarch64.c (literal_expression): New structure. (literal_pool): Replace exp array with literal_expression array. (add_to_lit_pool): When adding a bignum cache the big value. (s_ltorg): When emitting a bignum initialise the global bignum array from the cached value. * gas/aarch64/litpool.s: New test case. * gas/aarch64/litpool.d: Expected disassembly. commit 646f4417760ab12c0d955dabf821d8737d94335a Author: Andreas Arnez Date: Fri Mar 7 12:23:47 2014 +0000 Fix dw2-ifort-parameter.exp on PPC64 On PPC64, 'func' and 'main' are function descriptors and don't point to the actual code. Thus the usage of these symbols in the DWARF assembler source was broken. The patch introduces new labels func_start and func_end for this purpose. commit 288c211f8c66a8d065cfd59f110e2fbc33ccce25 Author: Andreas Arnez Date: Fri Mar 7 11:52:54 2014 +0000 Migrate dw2-ifort-parameter.exp to Dwarf::assemble A "side effect" of the migration to Dwarf::assemble is that the DWARF address size is now automatically adjusted to the target architecture. The original assembler source hard-coded the DWARF address size to 4, even on 64-bit architectures. This address size mismatch caused a test case failure on s390x due to a wrong result from DW_OP_deref. commit e0c0f156b4b0a32293c1a48c296d8035244e3951 Author: Andreas Arnez Date: Fri Mar 7 11:45:49 2014 +0000 Exploit 'prepare_for_testing' etc. for 'Dwarf::assemble'-generated files Now that prepare_for_testing etc. can cope with absolute path names, this can be exploited for test cases with generated source files. This is just to simplify the code and shouldn't cause any functional change. commit 0e5c45554bc3d274809e688d3bfb8e5438cc3539 Author: Andreas Arnez Date: Fri Mar 7 10:23:42 2014 +0000 gdb.exp: Support absolute path name args in 'prepare_for_testing' etc. Test cases that produce source files in the build directory have not been able to use prepare_for_testing and friends. This was because build_executable_from_specs unconditionally prepended the source directory path name to its arguments. commit c792917cdc10a5ada2f4f73ecb39c764756bf994 Author: Nick Clifton Date: Wed Mar 12 13:12:37 2014 +0000 Prevent the linker from generaing a seg-fault when the user attempts to link an ARM ELF binary into an AARCH64 ELF executable. PR ld/16671 * elf32-arm.c (elf32_arm_add_symbol_hook): Check for ARM format before testing for vxworks. commit 8a1373cc51a55646633a9bedefbf722e5a3486ed Author: Nick Clifton Date: Wed Mar 12 12:00:27 2014 +0000 Update the documentation for the AR command so that it shows the --plugin option coming *after* the command option not before it. PR binutils/16652 * doc/binutils.texi (ar cmdline): Move --plugin command line option to after the command option. commit 91f83b0228f795e4acb8ac6e6690c6276cbec599 Author: Pedro Alves Date: Wed Mar 12 11:55:02 2014 +0000 inf-child.h: Update comment. Like inf-child.c, this file is no longer used exclusively by Unix targets anymore. gdb/ 2014-03-12 Pedro Alves * inf-child.h: Update comment to not mention Unix. commit f1aea813c89e437501f00617279b99b939a4b889 Author: Pedro Alves Date: Wed Mar 12 11:33:59 2014 +0000 inf-child.c: Update comments. This file is no longer used exclusively by Unix targets anymore. gdb/ 2014-03-12 Pedro Alves * inf-child.c: Update top comment to not mention Unix. Add generic comment describing how this target is meant to be used. (inf_child_post_attach, inf_child_post_startup_inferior) (inf_child_follow_fork, inf_child_pid_to_exec_file): Don't mention Unix in comment. commit ee8e9165af41505e5b33397afdbe5c424d5aa52c Author: Pedro Alves Date: Wed Mar 12 11:21:36 2014 +0000 Make the nto-procfs.c target inherit inf-child.c. So that all native targets inherit a single "superclass". Target methods that are set to or do the same as inf-child.c's are removed. Not tested. gdb/ 2014-03-12 Pedro Alves * nto-procfs.c: Include inf-child.h. (procfs_ops): Delete global. (procfs_can_run): Delete method. (procfs_detach, procfs_mourn_inferior): Unpush the passed in target pointer instead of referencing procfs_ops. (procfs_prepare_to_store): Delete. (init_procfs_ops): Delete function. (procfs_target): New function, based on init_procfs_ops, but inherit inf_child_target. (_initialize_procfs): Use procfs_target. commit 51a9c8c5f8931d601a67494e8a65450083b35f92 Author: Pedro Alves Date: Wed Mar 12 11:21:36 2014 +0000 Make the windows-nat.c target inherit inf-child.c. So that all native targets inherit a single "superclass". Target methods that are set to or do the same as inf-child.c's are removed. Tested by cross building on Fedora 17, and then confirming that ./gdb.exe ./gdb.exe -ex "set pagination off" -ex "start" under Wine still works. Also, Joel tested this with Adacore's internal testsuite. gdb/ 2014-03-12 Pedro Alves * windows-nat.c: Include inf-child.h. (windows_ops): Delete global. (windows_open, windows_prepare_to_store, windows_can_run): Delete methods. (init_windows_ops): Delete function. (windows_target): New function, based on init_windows_ops, but inherit inf_child_target. (_initialize_windows_nat): Use windows_target. Install x86 specific target methods here. commit 5893c83a47db6f00e183a271f3b330dcd8efd069 Author: Pedro Alves Date: Wed Mar 12 11:07:37 2014 +0000 Mention PR gdb/16696 in corresponding ChangeLog entry. commit 7701725167853ea4fcb9698e29e466d3b6541ddd Author: Nick Clifton Date: Wed Mar 12 11:02:57 2014 +0000 Add myself as the maintainer for the MSP430 sim. commit c63043aae739e147ad1da015d48ecceeb8b3fef9 Author: Dmitry Gorbachev Date: Wed Mar 12 10:56:17 2014 +0000 Fix compile time warnings about unused variables 'yyinput' and 'input'. PR binutils/16567 * deflex.l: Add noinput and nounput options. commit fa47fa924667f5d668faf24412dea39150e14a2a Author: Alan Modra Date: Wed Mar 12 15:02:00 2014 +1030 autoreconf Regenerate Makefile.in in bfd, binutils, gas, gold, gprof, ld, opcodes. Regenerate gas/config.in. commit bbefd0a9264348d04783d3d374c2104ae468c799 Author: Alan Modra Date: Wed Mar 12 10:33:26 2014 +1030 objcopy/strip ELF program header p_vaddr confusion copy_elf_program_header has logic to reject non-alloc sections when calculating p_vaddr offset for padding, but blithely assumed the first section in a segment was allocated. PR 16690 * elf.c (copy_elf_program_header): Ignore first section lma if non-alloc. commit 32ed590d7eb359de7bf8da2e8fd3f43f1cfe0bcf Author: Alan Modra Date: Wed Mar 12 09:31:13 2014 +1030 daily update commit 3c865fca872570ba07c4a16fb262e0487b66bf0a Author: Alan Modra Date: Tue Mar 11 15:42:46 2014 +1030 intptr_t type definition needed coffcode.h uses an intptr_t cast inside an #ifdef RS6000COFF_C, so ensure that intptr_t is defined. We don't see this when cross-compiling from linux due to intptr_t being provided by unistd.h. PR 16686 * coff-rs6000.c: Include stdint.h. * coff64-rs6000.c: Likewise. commit c1966e261a3c0e0a32639d464a5ebee83aa31144 Author: Doug Evans Date: Tue Mar 11 00:02:19 2014 -0400 * guile/guile.c (call_initialize_gdb_module): New function. (initialize_guile): Replace call to scm_init_guile with call to scm_with_guile. commit f32d1b7f589d70c6f5e15f83b0f6f94ef18bb1dd Author: Mike Frysinger Date: Sat Mar 8 00:21:13 2014 -0500 sim: msp430: start a test framework The current sim lacks any sort of tests. Start a basic framework and add a simple one to test the add insn. commit 7b0278dcad72af1db86e6ecf91751dbc45e3b071 Author: Mike Frysinger Date: Sat Mar 8 00:20:11 2014 -0500 sim: msp430: set initial PC to ELF entry if available If we want to run a simple ELF, the reset vector isn't set up, so starting at address 0 doesn't make sense. Use the ELF's entry point instead. commit a3271a3e6c841729a9ece40af973e275ea2de875 Author: Mike Frysinger Date: Thu Mar 6 23:29:37 2014 -0500 sim: msp430: fix build time warnings This fix is simple: msp430-sim.c: In function 'maybe_perform_syscall': msp430-sim.c:898:10: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long int' [-Wformat] This one we change to use casts like everyone else does in the code base: msp430-sim.c: In function 'msp430_step_once': msp430-sim.c:985:7: warning: passing argument 3 of 'init_disassemble_info' from incompatible pointer type [enabled by default] include/dis-asm.h:368:13: note: expected 'fprintf_ftype' but argument is of type 'int (*)(struct FILE * __restrict__, const char * __restrict__)' commit 60d847df0b9691b7cb38bfba41b9d6aafd97efc2 Author: Mike Frysinger Date: Thu Feb 20 00:28:17 2014 -0500 sim: constify arg to sim_do_command It is rare for people to want to modify the cmd arg. In general, they really shouldn't be, but a few still do. For those who misbehave, dupe the string locally so they can bang on it. commit 61d1ce24e894c08a701efc5794012161ef101a60 Author: Alan Modra Date: Tue Mar 11 09:30:40 2014 +1030 daily update commit 9b12c500635117c977f5b64bc0fe23749aaf9acd Author: Cary Coutant Date: Mon Mar 10 13:38:20 2014 -0700 Add function to set non-visibility part of st_other. 2014-03-10 Sasa Stankovic gold/ * symtab.h (Symbol::set_nonvis): New function. commit beacaa966be202228a7905474013dfb199f36e14 Author: Cary Coutant Date: Mon Mar 10 13:36:40 2014 -0700 Add explicit instantiations for Sized_symbol::init_output_data. 2014-03-10 Sasa Stankovic gold/ * symtab.cc (Sized_symbol<32>::init_output_data): Instantiate the template. (Sized_symbol<64>::init_output_data): Likewise. commit 800d982336156359cad5f98ba26a249a94f13108 Author: Cary Coutant Date: Mon Mar 10 13:35:53 2014 -0700 Allow target to adjust dynamic symbol value. 2014-03-10 Sasa Stankovic gold/ * symtab.cc (Symbol_table::sized_write_globals): Allow a target to adjust dynamic symbol value. * target.h (Target::adjust_dyn_symbol): New function. (Target::do_adjust_dyn_symbol): New function. commit 918fc1f8d23c634227c871b67ccb4ed32d0df83c Author: Cary Coutant Date: Mon Mar 10 13:34:53 2014 -0700 Allow target to add custom dynamic table entries. 2014-03-10 Sasa Stankovic gold/ * output.cc (Output_data_dynamic::Dynamic_entry::write): Get the value of DYNAMIC_CUSTOM dynamic entry. * output.h (Output_data_dynamic::add_custom): New function. (Dynamic_entry::Dynamic_entry): New constructor for DYNAMIC_CUSTOM dynamic entry. (enum Dynamic_entry::Classification): Add DYNAMIC_CUSTOM. * target.h (Target::dynamic_tag_custom_value): New function. (Target::do_dynamic_tag_custom_value): New function. commit 98ff9231545f9ba7221ad64ec1ff17cf52cafc07 Author: Cary Coutant Date: Mon Mar 10 13:33:20 2014 -0700 Allow target to set dynsym indexes. 2014-03-10 Sasa Stankovic gold/ * symtab.cc (Symbol_table::set_dynsym_indexes): Allow a target to set dynsym indexes. * target.h (Target::has_custom_set_dynsym_indexes): New function. (Target::do_has_custom_set_dynsym_indexes): New function. (Target::set_dynsym_indexes): New function. (Target::do_set_dynsym_indexes): New function. commit ce15efd88c41c2b323ef37aed9c24f0557d8b2ca Author: Tristan Gingold Date: Mon Mar 10 15:10:27 2014 +0100 Remove bfd/ticoff.h (unused) 2013-12-03 Tristan Gingold * ticoff.h: Remove. commit 023db19c6b0dc1345631d708425a9cb694cafa92 Author: Joel Brobecker Date: Mon Mar 10 14:45:26 2014 +0100 Missing space before '(' in ada-lang.c::ada_evaluate_subexp gdb/ChangeLog: * ada-lang.c (ada_evaluate_subexp): Add missing space before '(' in call to TYPE_CODE macro. commit 8668be63cff2c8efe312e1d6a354fd8b69cd2d89 Author: Joel Brobecker Date: Mon Mar 10 14:44:30 2014 +0100 Minor style change in the previous commits' ChangeLog entry. commit 5ec18f2b48ab74bbbaf436324ce3947df3bc048e Author: Jerome Guitton Date: Wed Feb 12 12:08:23 2014 +0100 [Ada] Full view of tagged type with ptype When evaluating an expression, if it is of a tagged type, GDB reads the tag in memory and deduces the full view. At parsing time, however, this operation is done only in the case of OP_VAR_VALUE. ptype does not go through a full evaluation of expressions so it may return some odd results: (gdb) print c.menu_name $1 = 0x0 (gdb) ptype $ type = system.strings.string_access (gdb) ptype c.menu_name type = This change removes this peculiarity by extending the tag resolution to UNOP_IND and STRUCTOP_STRUCT. As in the case of OP_VAR_VALUE, this implies switching from EVAL_AVOID_SIDE_EFFECTS to EVAL_NORMAL when a tagged type is dereferenced. gdb/ * ada-lang.c (ada_evaluate_subexp): Resolve tagged types to full view in the case of UNOP_IND and STRUCTOP_STRUCT. gdb/testsuite/ * gdb.ada/tagged_access: New testcase. commit 7d03f2eb64305b386f2ae8b733e0a2a143fd4ffd Author: Hui Zhu Date: Mon Mar 10 15:42:26 2014 +0800 Remove "hardware" from comments of "target_insert_breakpoint" This function is for simple breakpoint. So I post a patch to remove "hardware". Thanks, Hui 2014-03-10 Hui Zhu * target.h (target_insert_breakpoint): Remove "hardware" from its comments. commit 592fdf42efd9a583248e4e61bdf71a23ad60d284 Author: Alan Modra Date: Mon Mar 10 09:30:41 2014 +1030 daily update commit c5cec84eb377b0f378ccd840d3eb048c084c8d8a Author: Alan Modra Date: Sun Mar 9 09:31:12 2014 +1030 daily update ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 83 ++ bfd/Makefile.in | 2 +- bfd/coff-alpha.c | 2 +- bfd/coff-mips.c | 2 +- bfd/coff-rs6000.c | 3 + bfd/coff-sh.c | 1 + bfd/coff64-rs6000.c | 3 + bfd/coffcode.h | 258 ++++- bfd/config.bfd | 2 +- bfd/config.in | 4 + bfd/configure | 12 + bfd/configure.in | 2 + bfd/doc/ChangeLog | 4 + bfd/doc/Makefile.in | 2 +- bfd/elf.c | 5 +- bfd/elf32-arm.c | 3 + bfd/elf32-ppc.c | 12 +- bfd/libcoff.h | 4 + bfd/mach-o.c | 2 + bfd/pe-x86_64.c | 54 + bfd/peXXigen.c | 77 +- bfd/peicode.h | 19 +- bfd/sysdep.h | 4 + bfd/targets.c | 2 + bfd/ticoff.h | 121 -- bfd/version.h | 2 +- binutils/ChangeLog | 49 + binutils/Makefile.in | 2 +- binutils/deflex.l | 4 +- binutils/doc/Makefile.in | 2 +- binutils/doc/binutils.texi | 4 +- binutils/dwarf.c | 4 - binutils/objcopy.c | 7 +- binutils/od-macho.c | 447 +++++++- binutils/readelf.c | 6 + binutils/sysdep.h | 4 + binutils/testsuite/ChangeLog | 4 + binutils/testsuite/binutils-all/readelf.ss | 2 + gas/ChangeLog | 84 ++ gas/Makefile.in | 2 +- gas/NEWS | 3 + gas/app.c | 5 +- gas/config.in | 18 + gas/config/tc-aarch64.c | 69 +- gas/config/tc-arm.c | 186 +++- gas/config/tc-arm.h | 13 + gas/config/tc-i386.c | 24 +- gas/config/tc-sparc.c | 2 + gas/doc/Makefile.in | 2 +- gas/doc/as.texinfo | 2 + gas/doc/c-aarch64.texi | 92 ++- gas/doc/c-arm.texi | 4 + gas/doc/c-i386.texi | 5 + gas/doc/c-sparc.texi | 12 +- gas/doc/internals.texi | 9 + gas/read.c | 5 +- gas/testsuite/ChangeLog | 49 + gas/testsuite/gas/aarch64/illegal.d | 2 +- gas/testsuite/gas/aarch64/litpool.d | 30 + gas/testsuite/gas/aarch64/litpool.s | 7 + gas/testsuite/gas/aarch64/verbose-error.l | 132 +++ gas/testsuite/gas/aarch64/verbose-error.s | 42 + gas/testsuite/gas/arm/ccs.d | 25 + gas/testsuite/gas/arm/ccs.s | 33 + gas/testsuite/gas/cfi/cfi-arm-1.d | 9 +- gas/testsuite/gas/cfi/cfi-arm-1.s | 6 + gas/testsuite/gas/pe/big-obj.d | 11 + gas/testsuite/gas/pe/big-obj.s | 16 + gas/testsuite/gas/pe/pe.exp | 8 + gas/testsuite/gas/rx/mov.d | 678 ++++++------ gas/testsuite/gas/sparc/ldd_std.d | 2 +- gas/testsuite/gas/sparc/rdhpr.d | 4 +- gas/testsuite/gas/sparc/rdhpr.s | 4 +- gas/testsuite/gas/sparc/wrhpr.d | 4 +- gas/testsuite/gas/sparc/wrhpr.s | 4 +- gdb/ChangeLog | 255 ++++ gdb/MAINTAINERS | 2 - gdb/Makefile.in | 3 +- gdb/ada-lang.c | 65 +- gdb/aix-thread.c | 14 +- gdb/arm-linux-nat.c | 401 +++++-- gdb/corelow.c | 2 - gdb/defs.h | 5 +- gdb/doc/ChangeLog | 6 +- gdb/doc/Doxyfile-gdb-api.in | 1 + gdb/event-top.c | 27 +- gdb/exec.c | 2 - gdb/gdbtypes.h | 800 +++++++------ gdb/gnu-nat.c | 6 +- gdb/guile/guile.c | 28 +- gdb/guile/scm-type.c | 19 + gdb/inf-child.c | 52 +- gdb/inf-child.h | 2 +- gdb/infcmd.c | 205 ++--- gdb/inferior.h | 18 +- gdb/inflow.c | 36 +- gdb/infrun.c | 118 +- gdb/linux-nat.c | 8 +- gdb/mi/mi-interp.c | 3 +- gdb/nto-procfs.c | 119 +-- gdb/procfs.c | 4 - gdb/python/py-value.c | 3 +- gdb/record-btrace.c | 1 - gdb/record-full.c | 19 - gdb/rs6000-tdep.c | 6 +- gdb/solib-darwin.c | 7 +- gdb/solib-svr4.c | 57 +- gdb/solib.c | 21 +- gdb/solib.h | 2 +- gdb/solist.h | 7 +- gdb/target-delegates.c | 42 +- gdb/target.c | 129 +-- gdb/target.h | 66 +- gdb/testsuite/ChangeLog | 125 ++ .../pckd_arr_ren.exp} | 29 +- gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb | 24 + gdb/testsuite/gdb.ada/pckd_arr_ren/pck.adb | 26 + gdb/testsuite/gdb.ada/pckd_arr_ren/pck.ads | 24 + .../tagged_access.exp} | 31 +- gdb/testsuite/gdb.ada/tagged_access/p.adb | 22 + gdb/testsuite/gdb.ada/tagged_access/pack.adb | 30 + gdb/testsuite/gdb.ada/tagged_access/pack.ads | 31 + gdb/testsuite/gdb.base/async.c | 9 +- gdb/testsuite/gdb.base/async.exp | 136 +-- gdb/testsuite/gdb.base/corefile.exp | 115 ++- gdb/testsuite/gdb.base/default.exp | 5 +- .../gdb-sigterm.c} | 15 +- gdb/testsuite/gdb.base/gdb-sigterm.exp | 96 ++ gdb/testsuite/gdb.dwarf2/arr-stride.exp | 15 +- gdb/testsuite/gdb.dwarf2/arr-subrange.exp | 15 +- .../gdb.dwarf2/dw2-ifort-parameter-debug.S | 122 -- gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c | 8 +- gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp | 44 +- gdb/testsuite/gdb.dwarf2/dwz.exp | 15 +- gdb/testsuite/gdb.dwarf2/implptrconst.exp | 13 +- gdb/testsuite/gdb.dwarf2/implptrpiece.exp | 13 +- gdb/testsuite/gdb.dwarf2/method-ptr.exp | 15 +- gdb/testsuite/gdb.dwarf2/missing-sig-type.exp | 15 +- gdb/testsuite/gdb.dwarf2/nostaticblock.exp | 15 +- gdb/testsuite/gdb.dwarf2/subrange.exp | 15 +- gdb/testsuite/gdb.guile/scm-value.exp | 7 + gdb/testsuite/gdb.mi/mi-solib.exp | 4 - gdb/testsuite/gdb.reverse/break-precsave.exp | 115 +- gdb/testsuite/lib/gdb.exp | 11 +- gdb/testsuite/lib/mi-support.exp | 18 +- gdb/ui-out.c | 5 +- gdb/utils.c | 6 + gdb/value.c | 6 +- gdb/windows-nat.c | 124 +-- gold/ChangeLog | 41 + gold/Makefile.in | 3 +- gold/output.cc | 4 + gold/output.h | 14 +- gold/symtab.cc | 47 + gold/symtab.h | 5 + gold/target.h | 49 + gprof/ChangeLog | 4 + gprof/Makefile.in | 2 +- include/coff/ChangeLog | 11 + include/coff/internal.h | 2 +- include/coff/pe.h | 79 ++ include/gdb/ChangeLog | 4 + include/gdb/remote-sim.h | 2 +- include/mach-o/ChangeLog | 4 + include/mach-o/unwind.h | 199 ++++ ld/ChangeLog | 47 + ld/Makefile.am | 2 +- ld/Makefile.in | 8 +- ld/emultempl/aix.em | 8 +- ld/emultempl/default-manifest.rc | 2 +- ld/emultempl/elf32.em | 49 +- ld/emultempl/linux.em | 2 +- ld/emultempl/pe.em | 2 +- ld/emultempl/pep.em | 2 +- ld/emultempl/vms.em | 2 +- ld/ldfile.c | 2 +- ld/ldlang.c | 15 +- ld/ldlang.h | 3 + ld/scripttempl/pe.sc | 13 +- ld/scripttempl/pep.sc | 13 +- ld/testsuite/ChangeLog | 14 + ld/testsuite/config/default.exp | 5 + ld/testsuite/ld-powerpc/vle-reloc-3.d | 8 +- ld/testsuite/ld-powerpc/vle.ld | 3 +- opcodes/ChangeLog | 16 + opcodes/Makefile.in | 2 +- opcodes/rx-decode.c | 1223 ++++++++++---------- opcodes/rx-decode.opc | 11 +- opcodes/sparc-dis.c | 2 +- sim/ChangeLog | 9 + sim/MAINTAINERS | 1 + sim/arm/ChangeLog | 49 + sim/arm/armcopro.c | 34 +- sim/arm/armemu.c | 67 +- sim/arm/armemu.h | 10 +- sim/arm/maverick.c | 23 +- sim/arm/thumbemu.c | 70 +- sim/arm/wrapper.c | 249 +++-- sim/avr/ChangeLog | 4 + sim/avr/interp.c | 2 +- sim/common/ChangeLog | 6 + sim/common/sim-command.c | 2 +- sim/common/sim-options.c | 2 +- sim/common/sim-options.h | 2 +- sim/configure | 1 + sim/configure.tgt | 1 + sim/cr16/ChangeLog | 4 + sim/cr16/interp.c | 2 +- sim/d10v/ChangeLog | 4 + sim/d10v/interp.c | 2 +- sim/erc32/ChangeLog | 4 + sim/erc32/interf.c | 2 +- sim/m32c/ChangeLog | 5 + sim/m32c/gdb-if.c | 10 +- sim/mcore/ChangeLog | 4 + sim/mcore/interp.c | 2 +- sim/microblaze/ChangeLog | 4 + sim/microblaze/interp.c | 2 +- sim/moxie/ChangeLog | 4 + sim/moxie/interp.c | 2 +- sim/msp430/ChangeLog | 10 + sim/msp430/msp430-sim.c | 11 +- sim/ppc/ChangeLog | 4 + sim/ppc/sim_calls.c | 2 +- sim/rl78/ChangeLog | 5 + sim/rl78/gdb-if.c | 9 +- sim/rx/ChangeLog | 5 + sim/rx/gdb-if.c | 10 +- sim/sh/ChangeLog | 5 + sim/sh/interp.c | 8 +- sim/testsuite/ChangeLog | 4 + sim/testsuite/configure | 1 + sim/testsuite/sim/msp430/ChangeLog | 3 + sim/testsuite/sim/msp430/add.s | 20 + sim/testsuite/sim/msp430/allinsn.exp | 15 + sim/testsuite/sim/msp430/testutils.inc | 70 ++ 236 files changed, 6347 insertions(+), 3045 deletions(-) delete mode 100644 bfd/ticoff.h create mode 100644 gas/testsuite/gas/aarch64/litpool.d create mode 100644 gas/testsuite/gas/aarch64/litpool.s create mode 100644 gas/testsuite/gas/arm/ccs.d create mode 100644 gas/testsuite/gas/arm/ccs.s create mode 100644 gas/testsuite/gas/pe/big-obj.d create mode 100644 gas/testsuite/gas/pe/big-obj.s copy gdb/testsuite/{gdb.dwarf2/dw2-ifort-parameter.exp => gdb.ada/pckd_arr_ren.exp} (55%) create mode 100644 gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb create mode 100644 gdb/testsuite/gdb.ada/pckd_arr_ren/pck.adb create mode 100644 gdb/testsuite/gdb.ada/pckd_arr_ren/pck.ads copy gdb/testsuite/{gdb.dwarf2/dw2-ifort-parameter.exp => gdb.ada/tagged_access.exp} (54%) create mode 100644 gdb/testsuite/gdb.ada/tagged_access/p.adb create mode 100644 gdb/testsuite/gdb.ada/tagged_access/pack.adb create mode 100644 gdb/testsuite/gdb.ada/tagged_access/pack.ads copy gdb/testsuite/{gdb.dwarf2/dw2-ifort-parameter.c => gdb.base/gdb-sigterm.c} (83%) create mode 100644 gdb/testsuite/gdb.base/gdb-sigterm.exp delete mode 100644 gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter-debug.S create mode 100644 include/mach-o/unwind.h create mode 100644 sim/testsuite/sim/msp430/ChangeLog create mode 100644 sim/testsuite/sim/msp430/add.s create mode 100644 sim/testsuite/sim/msp430/allinsn.exp create mode 100644 sim/testsuite/sim/msp430/testutils.inc First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e2c12ec..40f3bed 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,85 @@ +2014-03-19 Nick Clifton + + * peXXigen.c (rsrc_process_section): Add code to scan input + sections and record their lengths. Use these lengths to find the + start of each merged .rsrc section. + +2014-03-17 Tristan Gingold + + * mach-o.c (bfd_mach_o_read_dylib): Handle lazy load dylib. + (bfd_mach_o_read_command): Ditto. + +2014-03-14 Meador Inge + + * configure.in: Add strnlen to AC_CHECK_DECLS. + * config.in: Regenerate. + * configure: Regenerate. + * sysdep.h (strnlen): Add prototype. + +2014-03-14 Alan Modra + + * elf32-ppc.c (ppc_elf_relocate_section): Correct overflow + handling for VLE_SDA21 relocs. + +2014-03-13 Tristan Gingold + + * peicode.h (pe_ILF_object_p): Adjust, as the version number + has been read. + (pe_bfd_object_p): Also read version number to detect ILF. + * pe-x86_64.c (COFF_WITH_PE_BIGOBJ): Define. + (x86_64pe_bigobj_vec): Define + * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_max_nscns field. + (bfd_coff_max_nscns): New macro. + (coff_compute_section_file_positions): Use unsigned int for + target_index. Compare with bfd_coff_max_nscns. + (bfd_coff_std_swap_table, ticoff0_swap_table, ticoff1_swap_table): + Set a value for _bfd_coff_max_nscns. + (header_bigobj_classid): New constant. + (coff_bigobj_swap_filehdr_in, coff_bigobj_swap_filehdr_out) + (coff_bigobj_swap_sym_in, coff_bigobj_swap_sym_out) + (coff_bigobj_swap_aux_in, coff_bigobj_swap_aux_out): New + functions. + (bigobj_swap_table): New table. + * libcoff.h: Regenerate. + * coff-sh.c (bfd_coff_small_swap_table): Likewise. + * coff-alpha.c (alpha_ecoff_backend_data): Add value for + _bfd_coff_max_nscns. + * coff-mips.c (mips_ecoff_backend_data): Likewise. + * coff-rs6000.c (bfd_xcoff_backend_data) + (bfd_pmac_xcoff_backend_data): Likewise. + * coff64-rs6000.c (bfd_xcoff_backend_data) + (bfd_xcoff_aix5_backend_data): Likewise. + * targets.c (x86_64pe_bigobj_vec): Declare. + * configure.in (x86_64pe_bigobj_vec): New vector. + * configure: Regenerate. + * config.bfd: Add bigobj object format for Windows targets. + +2014-03-12 Nick Clifton + + PR ld/16671 + * elf32-arm.c (elf32_arm_add_symbol_hook): Check for ARM format + before testing for vxworks. + +2014-03-12 Alan Modra + + * Makefile.in: Regenerate. + +2014-03-12 Alan Modra + + PR 16690 + * elf.c (copy_elf_program_header): Ignore first section lma if + non-alloc. + +2014-03-11 Alan Modra + + PR 16686 + * coff-rs6000.c: Include stdint.h. + * coff64-rs6000.c: Likewise. + +2014-03-10 Tristan Gingold + + * ticoff.h: Removed. + 2014-03-08 Alan Modra * elf32-ppc.c (ppc_elf_howto_raw): Correct overflow check for @@ -22,6 +104,7 @@ 2014-03-07 Pedro Alves + PR gdb/16696 * rs6000-core.c (rs6000coff_core_p): Cast pointers to bfd_vma through ptr_to_uint instead of through long. diff --git a/bfd/Makefile.in b/bfd/Makefile.in index a81da7c..65ab641 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -16,7 +16,7 @@ @SET_MAKE@ # -# Copyright 2012 Free Software Foundation +# Copyright (C) 2012-2014 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c index a7a977c..8c68b56 100644 --- a/bfd/coff-alpha.c +++ b/bfd/coff-alpha.c @@ -2241,7 +2241,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data = alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out, alpha_ecoff_swap_scnhdr_out, FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, - ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, + ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768, alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in, alpha_ecoff_swap_scnhdr_in, NULL, alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c index 454f89a..3a30d83 100644 --- a/bfd/coff-mips.c +++ b/bfd/coff-mips.c @@ -1254,7 +1254,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data = mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out, mips_ecoff_swap_scnhdr_out, FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, - ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, + ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768, mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in, mips_ecoff_swap_scnhdr_in, NULL, mips_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index 1f976d9..d0b8eaf 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -114,6 +114,7 @@ extern int rs6000coff_core_file_failing_signal (bfd *abfd); #define bfd_pe_print_pdata NULL #endif +#include #include "coffcode.h" /* The main body of code is in coffcode.h. */ @@ -4104,6 +4105,7 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = 3, /* _bfd_coff_default_section_alignment_power */ FALSE, /* _bfd_coff_force_symnames_in_strings */ 2, /* _bfd_coff_debug_string_prefix_length */ + 32768, /* _bfd_coff_max_nscns */ coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in, @@ -4284,6 +4286,7 @@ static const struct xcoff_backend_data_rec bfd_pmac_xcoff_backend_data = 3, /* _bfd_coff_default_section_alignment_power */ FALSE, /* _bfd_coff_force_symnames_in_strings */ 2, /* _bfd_coff_debug_string_prefix_length */ + 32768, /* _bfd_coff_max_nscns */ coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in, diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c index aca2b8b..1bf3f21 100644 --- a/bfd/coff-sh.c +++ b/bfd/coff-sh.c @@ -3090,6 +3090,7 @@ static bfd_coff_backend_data bfd_coff_small_swap_table = #else 2, #endif + 32768, coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in, coff_swap_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook, coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c index 0e0f0d4..d660e3a 100644 --- a/bfd/coff64-rs6000.c +++ b/bfd/coff64-rs6000.c @@ -277,6 +277,7 @@ extern int rs6000coff_core_file_failing_signal #define bfd_pe_print_pdata NULL #endif +#include #include "coffcode.h" /* For XCOFF64, the effective width of symndx changes depending on @@ -2541,6 +2542,7 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = 3, /* _bfd_coff_default_section_alignment_power */ TRUE, /* _bfd_coff_force_symnames_in_strings */ 4, /* _bfd_coff_debug_string_prefix_length */ + 32768, /* _bfd_coff_max_nscns */ coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in, @@ -2800,6 +2802,7 @@ static const struct xcoff_backend_data_rec bfd_xcoff_aix5_backend_data = 3, /* _bfd_coff_default_section_alignment_power */ TRUE, /* _bfd_coff_force_symnames_in_strings */ 4, /* _bfd_coff_debug_string_prefix_length */ + 32768, /* _bfd_coff_max_nscns */ coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in, diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 11e70a5..d6fe39f 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -1393,6 +1393,7 @@ Special entry points for gdb to swap in coff symbol table parts: . unsigned int _bfd_coff_default_section_alignment_power; . bfd_boolean _bfd_coff_force_symnames_in_strings; . unsigned int _bfd_coff_debug_string_prefix_length; +. unsigned int _bfd_coff_max_nscns; . . void (*_bfd_coff_swap_filehdr_in) . (bfd *, void *, void *); @@ -1530,6 +1531,9 @@ Special entry points for gdb to swap in coff symbol table parts: . ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable)) .#define bfd_coff_default_section_alignment_power(abfd) \ . (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power) +.#define bfd_coff_max_nscns(abfd) \ +. (coff_backend_info (abfd)->_bfd_coff_max_nscns) +. .#define bfd_coff_swap_filehdr_in(abfd, i,o) \ . ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o)) . @@ -3136,7 +3140,7 @@ coff_compute_section_file_positions (bfd * abfd) asection *current; file_ptr sofar = bfd_coff_filhsz (abfd); bfd_boolean align_adjust; - int target_index; + unsigned int target_index; #ifdef ALIGN_SECTIONS_IN_FILE asection *previous = NULL; file_ptr old_sofar; @@ -3304,7 +3308,7 @@ coff_compute_section_file_positions (bfd * abfd) } #endif /* ! COFF_IMAGE_WITH_PE */ - if (target_index >= 32768) + if (target_index >= bfd_coff_max_nscns (abfd)) { bfd_set_error (bfd_error_file_too_big); (*_bfd_error_handler) @@ -5497,6 +5501,7 @@ static bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED = #else 2, #endif + 32768, coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, coff_SWAP_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook, coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, @@ -5537,6 +5542,7 @@ static bfd_coff_backend_data ticoff0_swap_table = #else 2, #endif + 32768, coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook, coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, @@ -5578,6 +5584,7 @@ static bfd_coff_backend_data ticoff1_swap_table = #else 2, #endif + 32768, coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook, coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, @@ -5591,6 +5598,253 @@ static bfd_coff_backend_data ticoff1_swap_table = }; #endif +#ifdef COFF_WITH_PE_BIGOBJ +/* The UUID for bigobj files. */ + +static const char header_bigobj_classid[16] = +{ + 0xC7, 0xA1, 0xBA, 0xD1, + 0xEE, 0xBA, + 0xa9, 0x4b, + 0xAF, 0x20, + 0xFA, 0xF6, 0x6A, 0xA4, 0xDC, 0xB8 +}; + +/* Swap routines. */ + +static void +coff_bigobj_swap_filehdr_in (bfd * abfd, void * src, void * dst) +{ + struct external_ANON_OBJECT_HEADER_BIGOBJ *filehdr_src = + (struct external_ANON_OBJECT_HEADER_BIGOBJ *) src; + struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; + + filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->Machine); + filehdr_dst->f_nscns = H_GET_32 (abfd, filehdr_src->NumberOfSections); + filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->TimeDateStamp); + filehdr_dst->f_symptr = + GET_FILEHDR_SYMPTR (abfd, filehdr_src->PointerToSymbolTable); + filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->NumberOfSymbols); + filehdr_dst->f_opthdr = 0; + filehdr_dst->f_flags = 0; + + /* Check other magic numbers. */ + if (H_GET_16 (abfd, filehdr_src->Sig1) != IMAGE_FILE_MACHINE_UNKNOWN + || H_GET_16 (abfd, filehdr_src->Sig2) != 0xffff + || H_GET_16 (abfd, filehdr_src->Version) != 2 + || memcmp (filehdr_src->ClassID, header_bigobj_classid, 16) != 0) + filehdr_dst->f_opthdr = 0xffff; + + /* Note that CLR metadata are ignored. */ +} + +static unsigned int +coff_bigobj_swap_filehdr_out (bfd *abfd, void * in, void * out) +{ + struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; + struct external_ANON_OBJECT_HEADER_BIGOBJ *filehdr_out = + (struct external_ANON_OBJECT_HEADER_BIGOBJ *) out; + + memset (filehdr_out, 0, sizeof (*filehdr_out)); + + H_PUT_16 (abfd, IMAGE_FILE_MACHINE_UNKNOWN, filehdr_out->Sig1); + H_PUT_16 (abfd, 0xffff, filehdr_out->Sig2); + H_PUT_16 (abfd, 2, filehdr_out->Version); + memcpy (filehdr_out->ClassID, header_bigobj_classid, 16); + H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->Machine); + H_PUT_32 (abfd, filehdr_in->f_nscns, filehdr_out->NumberOfSections); + H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->TimeDateStamp); + PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, + filehdr_out->PointerToSymbolTable); + H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->NumberOfSymbols); + + return bfd_coff_filhsz (abfd); +} + +static void +coff_bigobj_swap_sym_in (bfd * abfd, void * ext1, void * in1) +{ + SYMENT_BIGOBJ *ext = (SYMENT_BIGOBJ *) ext1; + struct internal_syment *in = (struct internal_syment *) in1; + + if (ext->e.e_name[0] == 0) + { + in->_n._n_n._n_zeroes = 0; + in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset); + } + else + { +#if SYMNMLEN != E_SYMNMLEN +#error we need to cope with truncating or extending SYMNMLEN +#else + memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); +#endif + } + + in->n_value = H_GET_32 (abfd, ext->e_value); + in->n_scnum = H_GET_32 (abfd, ext->e_scnum); + in->n_type = H_GET_16 (abfd, ext->e_type); + in->n_sclass = H_GET_8 (abfd, ext->e_sclass); + in->n_numaux = H_GET_8 (abfd, ext->e_numaux); +} + +static unsigned int +coff_bigobj_swap_sym_out (bfd * abfd, void * inp, void * extp) +{ + struct internal_syment *in = (struct internal_syment *) inp; + SYMENT_BIGOBJ *ext = (SYMENT_BIGOBJ *) extp; + + if (in->_n._n_name[0] == 0) + { + H_PUT_32 (abfd, 0, ext->e.e.e_zeroes); + H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset); + } + else + { +#if SYMNMLEN != E_SYMNMLEN +#error we need to cope with truncating or extending SYMNMLEN +#else + memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); +#endif + } + + H_PUT_32 (abfd, in->n_value, ext->e_value); + H_PUT_32 (abfd, in->n_scnum, ext->e_scnum); + + H_PUT_16 (abfd, in->n_type, ext->e_type); + H_PUT_8 (abfd, in->n_sclass, ext->e_sclass); + H_PUT_8 (abfd, in->n_numaux, ext->e_numaux); + + return SYMESZ_BIGOBJ; +} + +static void +coff_bigobj_swap_aux_in (bfd *abfd, + void * ext1, + int type, + int in_class, + int indx, + int numaux, + void * in1) +{ + AUXENT_BIGOBJ *ext = (AUXENT_BIGOBJ *) ext1; + union internal_auxent *in = (union internal_auxent *) in1; + + switch (in_class) + { + case C_FILE: + if (numaux > 1) + { + if (indx == 0) + memcpy (in->x_file.x_fname, ext->File.Name, + numaux * sizeof (AUXENT_BIGOBJ)); + } + else + memcpy (in->x_file.x_fname, ext->File.Name, sizeof (ext->File.Name)); + break; + + case C_STAT: + case C_LEAFSTAT: + case C_HIDDEN: + if (type == T_NULL) + { + in->x_scn.x_scnlen = H_GET_32 (abfd, ext->Section.Length); + in->x_scn.x_nreloc = + H_GET_16 (abfd, ext->Section.NumberOfRelocations); + in->x_scn.x_nlinno = + H_GET_16 (abfd, ext->Section.NumberOfLinenumbers); + in->x_scn.x_checksum = H_GET_32 (abfd, ext->Section.Checksum); + in->x_scn.x_associated = H_GET_16 (abfd, ext->Section.Number) + | (H_GET_16 (abfd, ext->Section.HighNumber) << 16); + in->x_scn.x_comdat = H_GET_8 (abfd, ext->Section.Selection); + return; + } + break; + + default: + in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->Sym.WeakDefaultSymIndex); + /* Characteristics is ignored. */ + break; + } +} + +static unsigned int +coff_bigobj_swap_aux_out (bfd * abfd, + void * inp, + int type, + int in_class, + int indx ATTRIBUTE_UNUSED, + int numaux ATTRIBUTE_UNUSED, + void * extp) +{ + union internal_auxent * in = (union internal_auxent *) inp; + AUXENT_BIGOBJ *ext = (AUXENT_BIGOBJ *) extp; + + memset (ext, 0, AUXESZ); + + switch (in_class) + { + case C_FILE: + memcpy (ext->File.Name, in->x_file.x_fname, sizeof (ext->File.Name)); + + return AUXESZ; + + case C_STAT: + case C_LEAFSTAT: + case C_HIDDEN: + if (type == T_NULL) + { + H_PUT_32 (abfd, in->x_scn.x_scnlen, ext->Section.Length); + H_PUT_16 (abfd, in->x_scn.x_nreloc, + ext->Section.NumberOfRelocations); + H_PUT_16 (abfd, in->x_scn.x_nlinno, + ext->Section.NumberOfLinenumbers); + H_PUT_32 (abfd, in->x_scn.x_checksum, ext->Section.Checksum); + H_PUT_16 (abfd, in->x_scn.x_associated & 0xffff, + ext->Section.Number); + H_PUT_16 (abfd, (in->x_scn.x_associated >> 16), + ext->Section.HighNumber); + H_PUT_8 (abfd, in->x_scn.x_comdat, ext->Section.Selection); + return AUXESZ; + } + break; + } + + H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->Sym.WeakDefaultSymIndex); + H_PUT_32 (abfd, 1, ext->Sym.WeakSearchType); + + return AUXESZ; +} + +static bfd_coff_backend_data bigobj_swap_table = +{ + coff_bigobj_swap_aux_in, coff_bigobj_swap_sym_in, coff_SWAP_lineno_in, + coff_bigobj_swap_aux_out, coff_bigobj_swap_sym_out, + coff_SWAP_lineno_out, coff_SWAP_reloc_out, + coff_bigobj_swap_filehdr_out, coff_SWAP_aouthdr_out, + coff_SWAP_scnhdr_out, + FILHSZ_BIGOBJ, AOUTSZ, SCNHSZ, SYMESZ_BIGOBJ, AUXESZ_BIGOBJ, + RELSZ, LINESZ, FILNMLEN_BIGOBJ, hooks/post-receive -- Repository for Project Archer.