{"push_id":1968813986,"size":153,"distinct_size":1,"ref":"refs/heads/users/hjl/x86","head":"eaaeac29bb451b010577c85c97455d747a9d770f","before":"620677ebc342be415c6571515044bc4b6b871d21","commits":[{"sha":"7c0ed39626e3193adb70aeb98d3633787579d6ec","author":{"name":"H.J. Lu","email":"2b186c3e9563c59778202d8011b384e4a9b5bbaf@gmail.com"},"message":"Call _close_and_cleanup in bfd_close_all_done\n\n\tPR binutils/22032\n\t* opncls.c (bfd_close_all_done): Call _close_and_cleanup.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/7c0ed39626e3193adb70aeb98d3633787579d6ec"},{"sha":"37b2d327512baf2f39020e44958fd1f11db46a91","author":{"name":"Maciej W. Rozycki","email":"006a10158a5aec37e39763a69b0658f4e7f13280@imgtec.com"},"message":"MIPS/GAS: Also respect `-mignore-branch-isa' with MIPS16 code\n\nFix a bug in commit 8b10b0b3e100 (\"MIPS: Add options to control branch\nISA checks\") and with the `-mignore-branch-isa' command-line option also\nlift a GAS check for invalid MIPS16 branches between ISA modes, which is\nmade separately from regular MIPS and microMIPS checks.\n\n\tgas/\n\t* config/tc-mips.c (md_convert_frag): Respect\n\t`mips_ignore_branch_isa'.\n\t* testsuite/gas/mips/branch-local-5.d: New test.\n\t* testsuite/gas/mips/branch-local-n32-5.d: New test.\n\t* testsuite/gas/mips/branch-local-n64-5.d: New test.\n\t* testsuite/gas/mips/branch-local-6.d: New test.\n\t* testsuite/gas/mips/branch-local-n32-6.d: New test.\n\t* testsuite/gas/mips/branch-local-n64-6.d: New test.\n\t* testsuite/gas/mips/branch-local-7.d: New test.\n\t* testsuite/gas/mips/branch-local-n32-7.d: New test.\n\t* testsuite/gas/mips/branch-local-n64-7.d: New test.\n\t* testsuite/gas/mips/branch-local-ignore-5.d: New test.\n\t* testsuite/gas/mips/branch-local-ignore-n32-5.d: New test.\n\t* testsuite/gas/mips/branch-local-ignore-n64-5.d: New test.\n\t* testsuite/gas/mips/branch-local-ignore-6.d: New test.\n\t* testsuite/gas/mips/branch-local-ignore-n32-6.d: New test.\n\t* testsuite/gas/mips/branch-local-ignore-n64-6.d: New test.\n\t* testsuite/gas/mips/branch-local-5.l: New stderr output.\n\t* testsuite/gas/mips/branch-local-6.l: New stderr output.\n\t* testsuite/gas/mips/branch-local-5.s: New test source.\n\t* testsuite/gas/mips/branch-local-6.s: New test source.\n\t* testsuite/gas/mips/branch-local-7.s: New test source.\n\t* testsuite/gas/mips/mips.exp: Run the new tests.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/37b2d327512baf2f39020e44958fd1f11db46a91"},{"sha":"70e65ca8e5d1fc984d58f6137c290e807fe772a5","author":{"name":"Maciej W. Rozycki","email":"006a10158a5aec37e39763a69b0658f4e7f13280@imgtec.com"},"message":"MIPS/BFD: Correct microMIPS cross-mode BAL to JALX relaxation\n\nFix a bug in commit a6ebf6169a1b (\"MIPS: Convert cross-mode BAL to\nJALX\") and in BFD linker relaxation correct the microMIPS interpretation\nof the branch offset, which is supposed to be shifted by 1 bit, rather\nthan 2 as in the regular MIPS case.\n\n\tbfd/\n\t* elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS\n\tbranch offset interpretation.\n\n\tgas/\n\t* testsuite/gas/mips/branch-addend-micromips.d: New test.\n\t* testsuite/gas/mips/branch-addend-micromips-n32.d: New test.\n\t* testsuite/gas/mips/branch-addend-micromips-n64.d: New test.\n\t* testsuite/gas/mips/branch-addend-micromips.s: New test source.\n\t* testsuite/gas/mips/mips.exp: Run the new tests.\n\n\tld/\n\t* testsuite/ld-mips-elf/bal-jalx-addend-micromips.d: New test.\n\t* testsuite/ld-mips-elf/bal-jalx-addend-micromips-n32.d: New\n\ttest.\n\t* testsuite/ld-mips-elf/bal-jalx-addend-micromips-n64.d: New\n\ttest.\n\t* testsuite/ld-mips-elf/bal-jalx-local-micromips.d: New test.\n\t* testsuite/ld-mips-elf/bal-jalx-local-micromips-n32.d: New\n\ttest.\n\t* testsuite/ld-mips-elf/bal-jalx-local-micromips-n64.d: New\n\ttest.\n\t* testsuite/ld-mips-elf/bal-jalx-pic-micromips.d: New test.\n\t* testsuite/ld-mips-elf/bal-jalx-pic-micromips-n32.d: New test.\n\t* testsuite/ld-mips-elf/bal-jalx-pic-micromips-n64.d: New test.\n\t* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips.d: New\n\ttest.\n\t* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n32.d: New\n\ttest.\n\t* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n64.d: New\n\ttest.\n\t* testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/70e65ca8e5d1fc984d58f6137c290e807fe772a5"},{"sha":"765e526c75506a7d9644bc7c137ac1923fdb1369","author":{"name":"H.J. Lu","email":"2b186c3e9563c59778202d8011b384e4a9b5bbaf@gmail.com"},"message":"x86: Add _bfd_x86_elf_link_hash_table_create\n\nShare _bfd_x86_elf_link_hash_table_create in elf32-i386.c and\nelf64-x86-64.c by:\n\n1. Replace elf_i386_lazy_plt_layout, elf_i386_non_lazy_plt_layout,\nelf_i386_plt_layout, elf_x86_64_lazy_plt_layout,\nelf_x86_64_non_lazy_plt_layout and elf_x86_64_plt_layout with\nelf_x86_lazy_plt_layout, elf_x86_non_lazy_plt_layout and\nelf_x86_plt_layout.\n2. Move plt, lazy_plt, non_lazy_plt, srelplt2 and next_tls_desc_index\nfrom elf_i386_link_hash_table to elf_x86_link_hash_table.\n3. Remove elf_i386_link_hash_table and elf_x86_64_link_hash_table.\n\n\t* elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.\n\t(elf_i386_lazy_plt_layout): Likewise.\n\t(elf_i386_non_lazy_plt_layout): Likewise.\n\t(elf_i386_plt_layout): Likewise.\n\t(elf_i386_link_hash_table): Likewise.\n\t(elf_i386_next_tls_desc_index): Likewise.\n\t(elf_i386_srelplt2): Likewise.\n\t(elf_i386_plt): Likewise.\n\t(elf_i386_lazy_plt): Likewise.\n\t(elf_i386_non_lazy_plt): Likewise.\n\t(elf_i386_link_hash_table_create): Likewise.\n\t(bfd_elf32_bfd_link_hash_table_create): Likewise.\n\t(elf_i386_lazy_plt): Updated.\n\t(elf_i386_non_lazy_plt): Likewise.\n\t(elf_i386_lazy_ibt_plt): Likewise.\n\t(elf_i386_non_lazy_ibt_plt): Likewise.\n\t(elf_i386_allocate_dynrelocs): Likewise.\n\t(elf_i386_size_dynamic_sections): Likewise.\n\t(elf_i386_relocate_section): Likewise.\n\t(elf_i386_finish_dynamic_symbol): Likewise.\n\t(elf_i386_finish_dynamic_sections): Likewise.\n\t(elf_i386_get_synthetic_symtab): Likewise.\n\t(elf_i386_link_setup_gnu_properties): Likewise.\n\t(elf_i386_nacl_plt): Likewise.\n\t* elf64-x86-64.c (ABI_64_P): Removed.\n\t(ELF64_DYNAMIC_INTERPRETER): Likewise.\n\t(ELF32_DYNAMIC_INTERPRETER): Likewise.\n\t(elf_x86_64_lazy_plt_layout): Likewise.\n\t(elf_x86_64_non_lazy_plt_layout): Likewise.\n\t(elf_x86_64_plt_layout): Likewise.\n\t(elf_x86_64_link_hash_table): Likewise.\n\t(elf_x86_64_plt): Likewise.\n\t(elf_x86_64_lazy_plt): Likewise.\n\t(elf_x86_64_non_lazy_plt): Likewise.\n\t(elf_x86_64_link_hash_table_create): Likewise.\n\t(bfd_elf64_bfd_link_hash_table_create): Likewise.\n\t(bfd_elf32_bfd_link_hash_table_create): Likewise.\n\t(elf_x86_64_lazy_plt): Updated.\n\t(elf_x86_64_non_lazy_plt): Likewise.\n\t(elf_x86_64_lazy_bnd_plt): Likewise.\n\t(elf_x86_64_non_lazy_bnd_plt): Likewise.\n\t(elf_x86_64_lazy_ibt_plt): Likewise.\n\t(elf_x32_lazy_ibt_plt): Likewise.\n\t(elf_x86_64_non_lazy_ibt_plt): Likewise.\n\t(elf_x32_non_lazy_ibt_plt): Likewise.\n\t(elf_x86_64_allocate_dynrelocs): Likewise.\n\t(elf_x86_64_size_dynamic_sections): Likewise.\n\t(elf_x86_64_relocate_section): Likewise.\n\t(elf_x86_64_finish_dynamic_symbol): Likewise.\n\t(elf_x86_64_finish_dynamic_sections): Likewise.\n\t(elf_x86_64_get_synthetic_symtab): Likewise.\n\t(elf_x86_64_link_setup_gnu_properties): Likewise.\n\t(elf_x86_64_nacl_plt): Likewise.\n\t* elfxx-x86.c: Include \"objalloc.h\", \"elf/i386.h\" and\n\t\"elf/x86-64.h\".\n\t(ELF32_DYNAMIC_INTERPRETER): New.\n\t(ELF64_DYNAMIC_INTERPRETER): Likewise.\n\t(ELFX32_DYNAMIC_INTERPRETER): Likewise.\n\t(_bfd_x86_elf_link_hash_table_create): Likewise.\n\t(_bfd_x86_elf_link_hash_table_free): Renamed to ...\n\t(elf_x86_link_hash_table_free): This.  Make it static.\n\t* elfxx-x86.h: Don't include \"objalloc.h\".\n\t(ABI_64_P): New.\n\t(elf_x86_lazy_plt_layout): Likewise.\n\t(elf_x86_non_lazy_plt_layout): Likewise.\n\t(elf_x86_plt_layout): Likewise.\n\t(_bfd_x86_elf_link_hash_table_create): Likewise.\n\t(bfd_elf64_bfd_link_hash_table_create): Likewise.\n\t(bfd_elf32_bfd_link_hash_table_create): Likewise.\n\t(elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,\n\tsrelplt2 and next_tls_desc_index.\n\t(_bfd_x86_elf_link_hash_table_free): Removed.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/765e526c75506a7d9644bc7c137ac1923fdb1369"},{"sha":"5b86dbf4549af98c4428da4764182e03f22c58ab","author":{"name":"H.J. Lu","email":"2b186c3e9563c59778202d8011b384e4a9b5bbaf@gmail.com"},"message":"x86: Check target_id instead of elf_machine_code\n\nSince both elf32-i386.c and elf64-x86-64.c support targets with\ndifferent ELF_MACHINE_CODEs, _bfd_x86_elf_link_hash_table_create\nshould check target_id instead of elf_machine_code.\n\n\t* elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check\n\ttarget_id instead of elf_machine_code.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/5b86dbf4549af98c4428da4764182e03f22c58ab"},{"sha":"f493882dab762fb49ecb8685c18a85edfab5e6d3","author":{"name":"H.J. Lu","email":"2b186c3e9563c59778202d8011b384e4a9b5bbaf@gmail.com"},"message":"x86: Add _bfd_x86_elf_get_synthetic_symtab\n\nMove the common codes in elf_i386_get_synthetic_symtab and\nelf_x86_64_get_synthetic_symtab to _bfd_x86_elf_get_synthetic_symtab.\n\n\t* elf32-i386.c (elf_i386_plt_type): Removed.\n\t(elf_i386_plt): Likewise.\n\t(elf_i386_get_synthetic_symtab): Updated.   Call\n\t_bfd_x86_elf_get_synthetic_symtab.\n\t* elf64-x86-64.c (elf_x86_64_plt_type): Removed.\n\t(elf_x86_64_plt): Likewise.\n\t(elf_x86_64_get_synthetic_symtab): Updated.  Call\n\t_bfd_x86_elf_get_synthetic_symtab.\n\t* elfxx-x86.c (elf_i386_get_plt_got_vma): New function.\n\t(elf_x86_64_get_plt_got_vma): Likewise.\n\t(elf_i386_valid_plt_reloc_p): Likewise.\n\t(elf_x86_64_valid_plt_reloc_p): Likewise.\n\t(_bfd_x86_elf_get_synthetic_symtab): Likewise.\n\t* elfxx-x86.h (elf_x86_plt_type): New.\n\t(elf_x86_plt): Likewise.\n\t(_bfd_x86_elf_get_synthetic_symtab): Likewise.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/f493882dab762fb49ecb8685c18a85edfab5e6d3"},{"sha":"5dda32094f668a3e9738ea9b3aaea530d2bba7cb","author":{"name":"Maciej W. Rozycki","email":"006a10158a5aec37e39763a69b0658f4e7f13280@imgtec.com"},"message":"LD/testsuite: Also discard `.MIPS.options' in orphan tests\n\nComplement commit 5b5f4e6f8cd2 (\"ld: Early detection of orphans we know\nwill be discarded\") and add `.MIPS.options' to the list of sections\ndiscarded with orphan tests, removing failures like:\n\n./ld-new: error: unplaced orphan section `.MIPS.options' from `tmpdir/orphan-11.o'.\nFAIL: ld-elf/orphan-11\n\nand:\n\n./ld-new: error: unplaced orphan section `.MIPS.options' from `tmpdir/orphan-12.o'.\nFAIL: ld-elf/orphan-12\n\nfrom n64 MIPS testing.\n\n\tld/\n\t* testsuite/ld-elf/orphan-11.ld: Also discard `.MIPS.options'\n\tsections.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/5dda32094f668a3e9738ea9b3aaea530d2bba7cb"},{"sha":"e69f32654ac724c46c0f4f645c8a49189c7b43e4","author":{"name":"GDB Administrator","email":"11ecb00f5f667eff143dbb3d0b19c76373a421f1@sourceware.org"},"message":"Automatic date update in version.in","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/e69f32654ac724c46c0f4f645c8a49189c7b43e4"},{"sha":"e234de6be5cc96286e0efb90e8d9fce51239e901","author":{"name":"Alan Modra","email":"3aed519d178e2cda00510b9335fdf9c9798caeee@gmail.com"},"message":"bfd_close_all_done calling _close_and_cleanup\n\nelf64_vms_close_and_cleanup calls bfd_get_size, which calls\niovec->bstat.  cache_bstat ends up adding the bfd to the cache lru\nlist, negating the bfd_cache_close call in bfd_close_all_done.  So\nthere is a dangling pointer into the freed and then reused bfd.  Thus,\nbfd_cache_close must be called after _close_and_cleanup, or better,\nvia iovec->bclose.\n\n\tPR binutils/22032\n\t* opncls.c (bfd_close_all_done): Don't call bfd_cache_close\n\tbefore _close_and_cleanup.  Call iovec->bclose after.\n\t(bfd_close): Remove code common to, and call, bfd_close_all_done.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/e234de6be5cc96286e0efb90e8d9fce51239e901"},{"sha":"ef32532f22be7e98c25480449fbc7a80d1030e1e","author":{"name":"James Bowman","email":"3a6e9cb556c75dcea91d4abd368449649867b315@excamera.com"},"message":"FT32: Permit R_FT32_18 overflow\n\nThe howto for R_FT32_18 was using complain_overflow_signed. But some\nvalid address calculations exceed the range of this reloc.  Changing it\nto complain_overflow_dont allows them.\n\nbfd/ChangeLog:\n\n\t* elf32-ft32.c (ft32_elf_howto_table): Use\n\tcomplain_overflow_dont for R_FT32_18.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/ef32532f22be7e98c25480449fbc7a80d1030e1e"},{"sha":"59e8523bf8f92db8371d3a10bd7e4d7fe03d417d","author":{"name":"James Bowman","email":"3a6e9cb556c75dcea91d4abd368449649867b315@excamera.com"},"message":"FT32: improve disassembly readability\n\nFor opcode fields that are not addresses, display as\nintegers instead of using print_address_func.\n\nopcodes/ChangeLog:\n\n2017-08-31  James Bowman  <james.bowman@ftdichip.com>\n\n\t* ft32-dis.c (print_insn_ft32): Correct display of non-address\n\tfields.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/59e8523bf8f92db8371d3a10bd7e4d7fe03d417d"},{"sha":"3321e42bf2b5819b76ca36e8964fe7cf9a8ae9a2","author":{"name":"H.J. Lu","email":"2b186c3e9563c59778202d8011b384e4a9b5bbaf@gmail.com"},"message":"Add elf64.lo together with elfxx-x86.lo for 64-bit BFD\n\nSince elfxx-x86.lo needs elf64.lo with 64-bit BFD, add elf64.lo together\nwith elfxx-x86.lo to bfd_backends for 64-bit BFD.\n\n\t* configure.ac (bfd_backends): Add elf64.lo together with\n\telfxx-x86.lo for 64-bit BFD.\n\t* configure: Regenerated.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/3321e42bf2b5819b76ca36e8964fe7cf9a8ae9a2"},{"sha":"af471f828cc74d65b50a7531ba2c69522266cfe9","author":{"name":"Alan Modra","email":"3aed519d178e2cda00510b9335fdf9c9798caeee@gmail.com"},"message":"PR22048, Incorrect .eh_frame section in libc.so\n\n\tPR 21441\n\tPR 22048\n\t* elflink.c (bfd_elf_discard_info): Don't pad embedded zero\n\tterminators.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/af471f828cc74d65b50a7531ba2c69522266cfe9"},{"sha":"654670a4f0928e3eddc6395d6804deb2e61a0614","author":{"name":"Weimin Pan","email":"52a37ebceda88ec016c327aeda1c97207597fcbb@oracle.com"},"message":"Unbreak gdb build on 32-bit host with ADI support\n\nThe problem of failing to build with arm-linux-gnueabihf-g++-4.8 was\nthat type CORE_ADDR is of \"unsigned long\" on a 64-bit machine so it's\nOK to use %lx but is of type \"unsigned long long\" on a 32 bit system.\n\nFixed the problem in three places - (1) use a temp variable of type\nCORE_ADDR as argument 3 when calling target_auxv_search() then assign\nits value to \"blksize\" and \"nbits\" in 2 calls; (2) redo\nadi_normalize_address() using masks and xor operators to calculate\nnormalized address; (3) call paddress() to print CORE_ADDR in either\nprintf_filtered() or error(). Thank you, Pedro, for all your\nsuggestions.\n\ngdb/ChangeLog:\n2017-08-31  Weimin Pan  <weimin.pan@oracle.com>\n\n\t* sparc64-tdep.c (adi_stat_t): Fix comment formatting.\n\t(adi_available): Use a temp variable of type CORE_ADDR as argument\n\t3 when calling target_auxv_search.\n\t(adi_normalize_address): Use masks and xor operators to calculate\n\tnormalized address.\n\t(adi_read_versions, adi_write_versions, adi_print_versions)\n\t(do_examine, do_assign): Use paddress.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/654670a4f0928e3eddc6395d6804deb2e61a0614"},{"sha":"9866ffe25a0fe73f5153f2720650baf0dd9cc828","author":{"name":"Alan Modra","email":"3aed519d178e2cda00510b9335fdf9c9798caeee@gmail.com"},"message":"Remove .eh_frame zero terminators\n\nThe machinery to do this was there, but not enabled if the terminator\nwas the only thing in the section.\n\nbfd/\n\t* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early\n\tfor a section containing just a terminator.  Allow multiple\n\tterminators at end of section.\n\t* elflink.c (bfd_elf_discard_info): Iterate over .eh_frame\n\tsections when not adding alignment.  Assert on terminator in\n\tthe middle of FDEs.\nld/\n\t* testsuite/ld-elf/eh3.d: Update.\n\t* testsuite/ld-elf/eh4.d: Update.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/9866ffe25a0fe73f5153f2720650baf0dd9cc828"},{"sha":"686335cd3c7d4eef6ce4e3e54ef0e75929b5e4fb","author":{"name":"Alan Modra","email":"3aed519d178e2cda00510b9335fdf9c9798caeee@gmail.com"},"message":"Regen SRC-POTFILES.in\n\n\t* po/SRC-POTFILES.in: Regenerate.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/686335cd3c7d4eef6ce4e3e54ef0e75929b5e4fb"},{"sha":"d7de64088c7ce0d642c73feb66f408c601cffb0d","author":{"name":"H.J. Lu","email":"2b186c3e9563c59778202d8011b384e4a9b5bbaf@gmail.com"},"message":"Add a test for PR ld/22048\n\n\tPR ld/22048\n\t* testsuite/ld-x86-64/pr22048.d: New file.\n\t* testsuite/ld-x86-64/pr22048a.s: Likewise.\n\t* testsuite/ld-x86-64/pr22048b.s: Likewise.\n\t* testsuite/ld-x86-64/x86-64.exp: Run pr22048.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/d7de64088c7ce0d642c73feb66f408c601cffb0d"},{"sha":"b55f3386e45d8ba4af1a70f0684bc0089060d600","author":{"name":"Nick Clifton","email":"d22ea499f82b201eae54096af285f8bf7349fed4@redhat.com"},"message":"Add updated French translations for opcodes and gprof","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/b55f3386e45d8ba4af1a70f0684bc0089060d600"},{"sha":"e4f2723003859dc6b33ca0dadbc4a7659ebf1643","author":{"name":"Nick Clifton","email":"d22ea499f82b201eae54096af285f8bf7349fed4@redhat.com"},"message":"Fix buffer read overrun by ensuring that DWARF sections containing strings always end in a NUL byte.\n\n\tPR 22047\n\t* dwarf2.c (read_section): If necessary add a terminating NUL byte\n\tto dwarf string sections.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/e4f2723003859dc6b33ca0dadbc4a7659ebf1643"},{"sha":"0a2dde4a321d2f7bd2ded9a558b9ae92892de0e2","author":{"name":"Sergio Durigan Junior","email":"ac63229c4ec27abdb18b81523bb84a52e0b1e851@redhat.com"},"message":"Implement the ability to set/unset environment variables to GDBserver when starting the inferior\n\nThis patch implements the ability to set/unset environment variables\non the remote target, mimicking what GDB already offers to the user.\nThere are two features present here: user-set and user-unset\nenvironment variables.\n\nUser-set environment variables are only the variables that are\nexplicitly set by the user, using the 'set environment' command.  This\nmeans that variables that were already present in the environment when\nstarting GDB/GDBserver are not transmitted/considered by this feature.\n\nUser-unset environment variables are variables that are explicitly\nunset by the user, using the 'unset environment' command.\n\nThe idea behind this patch is to store user-set and user-unset\nenvironment variables in two separate sets, both part of gdb_environ.\nThen, when extended_remote_create_inferior is preparing to start the\ninferior, it will iterate over the two sets and set/unset variables\naccordingly.  Three new packets are introduced:\n\n- QEnvironmentHexEncoded, which is used to set environment variables,\n  and contains an hex-encoded string in the format \"VAR=VALUE\" (VALUE\n  can be empty if the user set a variable with a null value, by doing\n  'set environment VAR=').\n\n- QEnvironmentUnset, which is used to unset environment variables, and\n  contains an hex-encoded string in the format \"VAR\".\n\n- QEnvironmentReset, which is always the first packet to be\n  transmitted, and is used to reset the environment, i.e., discard any\n  changes made by the user on previous runs.\n\nThe QEnvironmentHexEncoded packet is inspired on LLDB's extensions to\nthe RSP.  Details about it can be seen here:\n\n  <https://raw.githubusercontent.com/llvm-mirror/lldb/master/docs/lldb-gdb-remote.txt>\n\nI decided not to implement the QEnvironment packet because it is\nconsidered deprecated by LLDB.  This packet, on LLDB, serves the same\npurpose of QEnvironmentHexEncoded, but sends the information using a\nplain text, non-hex-encoded string.\n\nThe other two packets are new.\n\nThis patch also includes updates to the documentation, testsuite, and\nunit tests, without introducing regressions.\n\ngdb/ChangeLog:\n2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>\n\n\t* NEWS (Changes since GDB 8.0): Add entry mentioning new support\n\tfor setting/unsetting environment variables on the remote target.\n\t(New remote packets): Add entries for QEnvironmentHexEncoded,\n\tQEnvironmentUnset and QEnvironmentReset.\n\t* common/environ.c (gdb_environ::operator=): Extend method to\n\thandle m_user_set_env_list and m_user_unset_env_list.\n\t(gdb_environ::clear): Likewise.\n\t(match_var_in_string): Change type of first parameter from 'char\n\t*' to 'const char *'.\n\t(gdb_environ::set): Extend method to handle\n\tm_user_set_env_list and m_user_unset_env_list.\n\t(gdb_environ::unset): Likewise.\n\t(gdb_environ::clear_user_set_env): New method.\n\t(gdb_environ::user_set_envp): Likewise.\n\t(gdb_environ::user_unset_envp): Likewise.\n\t* common/environ.h (gdb_environ): Handle m_user_set_env_list and\n\tm_user_unset_env_list on move constructor/assignment.\n\t(unset): Add new default parameter 'update_unset_list = true'.\n\t(clear_user_set_env): New method.\n\t(user_set_envp): Likewise.\n\t(user_unset_envp): Likewise.\n\t(m_user_set_env_list): New std::set.\n\t(m_user_unset_env_list): Likewise.\n\t* common/rsp-low.c (hex2str): New function.\n\t(bin2hex): New overload for bin2hex function.\n\t* common/rsp-low.c (hex2str): New prototype.\n\t(str2hex): New overload prototype.\n\t* remote.c: Include \"environ.h\". Add QEnvironmentHexEncoded,\n\tQEnvironmentUnset and QEnvironmentReset.\n\t(remote_protocol_features): Add QEnvironmentHexEncoded,\n\tQEnvironmentUnset and QEnvironmentReset packets.\n\t(send_environment_packet): New function.\n\t(extended_remote_environment_support): Likewise.\n\t(extended_remote_create_inferior): Call\n\textended_remote_environment_support.\n\t(_initialize_remote): Add QEnvironmentHexEncoded,\n\tQEnvironmentUnset and QEnvironmentReset packet configs.\n\t* unittests/environ-selftests.c (gdb_selftest_env_var):\n\tNew variable.\n\t(test_vector_initialization): New function.\n\t(test_init_from_host_environ): Likewise.\n\t(test_reinit_from_host_environ): Likewise.\n\t(test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):\n\tLikewise.\n\t(test_unset_set_empty_vector): Likewise.\n\t(test_vector_clear): Likewise.\n\t(test_std_move): Likewise.\n\t(test_move_constructor):\n\t(test_self_move): Likewise.\n\t(test_set_unset_reset): Likewise.\n\t(run_tests): Rewrite in terms of the functions above.\n\ngdb/gdbserver/ChangeLog:\n2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>\n\n\t* server.c (handle_general_set): Handle QEnvironmentHexEncoded,\n\tQEnvironmentUnset and QEnvironmentReset packets.\n\t(handle_query): Inform remote that QEnvironmentHexEncoded,\n\tQEnvironmentUnset and QEnvironmentReset are supported.\n\ngdb/doc/ChangeLog:\n2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>\n\n\t* gdb.texinfo (set environment): Add @anchor.  Explain that\n\tenvironment variables set by the user are sent to GDBserver.\n\t(unset environment): Likewise, but for unsetting variables.\n\t(Connecting) <Remote Packet>: Add \"environment-hex-encoded\",\n\t\"QEnvironmentHexEncoded\", \"environment-unset\", \"QEnvironmentUnset\",\n\t\"environment-reset\" and \"QEnvironmentReset\" to the table.\n\t(Remote Protocol) <QEnvironmentHexEncoded, QEnvironmentUnset,\n\tQEnvironmentReset>: New item, explaining the packet.\n\ngdb/testsuite/ChangeLog:\n2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>\n\n\t* gdb.base/share-env-with-gdbserver.c: New file.\n\t* gdb.base/share-env-with-gdbserver.exp: Likewise.","distinct":false,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/0a2dde4a321d2f7bd2ded9a558b9ae92892de0e2"}]}
{"actor":{"display_login":"kraj"}}