From 17d40c6057c88f4c432b0d7bac88e1b84cb7e67f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:03:36 +0200 Subject: Adding upstream version 1.65.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/gimli/.cargo-checksum.json | 2 +- vendor/gimli/CHANGELOG.md | 22 ++++++ vendor/gimli/Cargo.lock | 37 ++------- vendor/gimli/Cargo.toml | 79 +++++++++++++------ vendor/gimli/README.md | 6 +- vendor/gimli/examples/dwarf-validate.rs | 2 +- vendor/gimli/examples/dwarfdump.rs | 45 +++++++---- vendor/gimli/examples/simple.rs | 2 +- vendor/gimli/examples/simple_line.rs | 13 +++- vendor/gimli/fixtures/self/README.md | 2 +- vendor/gimli/src/constants.rs | 2 +- vendor/gimli/src/lib.rs | 2 +- vendor/gimli/src/read/abbrev.rs | 2 +- vendor/gimli/src/read/aranges.rs | 2 +- vendor/gimli/src/read/cfi.rs | 134 ++++++++++++++++++++++++++++++-- vendor/gimli/src/read/line.rs | 2 +- vendor/gimli/src/read/lists.rs | 1 + vendor/gimli/src/read/loclists.rs | 4 +- vendor/gimli/src/read/mod.rs | 2 +- vendor/gimli/src/read/op.rs | 21 ++++- vendor/gimli/src/read/pubnames.rs | 2 +- vendor/gimli/src/read/pubtypes.rs | 2 +- vendor/gimli/src/read/rnglists.rs | 4 +- vendor/gimli/src/read/str.rs | 4 +- vendor/gimli/src/read/unit.rs | 4 +- vendor/gimli/src/read/util.rs | 2 +- vendor/gimli/src/read/value.rs | 2 - vendor/gimli/src/write/cfi.rs | 15 +++- vendor/gimli/src/write/op.rs | 6 +- vendor/gimli/tests/convert_self.rs | 2 +- 30 files changed, 319 insertions(+), 106 deletions(-) (limited to 'vendor/gimli') diff --git a/vendor/gimli/.cargo-checksum.json b/vendor/gimli/.cargo-checksum.json index 5b855e30c..759ec93de 100644 --- a/vendor/gimli/.cargo-checksum.json +++ b/vendor/gimli/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"13bb20c4d7f171cdaf835093237311af52dd979091cbe2c46a6f978c9d783721","CONTRIBUTING.md":"5f513ec06013e4f6f097e9c9492da5a47b9f25c94c6ecadfb655a77405fe912c","Cargo.lock":"9961bcba2db19ce16584ca5cb089568de7ffcbc9668cba37fc3dd851b2e58e56","Cargo.toml":"d607f683bfe0d69d932c331701d54bdf429dbe5280b7cd3b1a5478d9dd9cdc79","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"7b63ecd5f1902af1b63729947373683c32745c16a10e8e6292e2e2dcd7e90ae0","README.md":"03ac1a78a14682d70da4d485d3fa01d0ad819b65b6aed50359ee72af43158ca9","benches/bench.rs":"e0045b989683794951563aa91b37069b2f6ae55f95e288d23f5c984b46e3a7eb","examples/dwarf-validate.rs":"8a322dc48a04bff33a759030f399ca9972ddb103e63851cbb9b8c9672095f645","examples/dwarfdump.rs":"3ef93684d0b417da7dc89751e2f5d1c297b3574b478848cb79b550d4ecd83222","examples/simple.rs":"684dc9785f4aa0714fcb91a3ae1bb7c8612c9b12969be47fe1327447a2101d1c","examples/simple_line.rs":"ec5fa47c1ab019c6cd9d525223f947533f6d65d6add3131a0c40ac18fc1297db","fixtures/self/README.md":"557cd710240a14fdaa5842b216de57f2ed481151b640af09d6877984b3b2389f","fixtures/self/debug_abbrev":"7c0faa940d9c68d196d03ad55a20e5c746040fa428ff323277fa381deff82bba","fixtures/self/debug_aranges":"8c2aeb2335f61d04ecb7b747070d24f83a6517cbee79dc5c96d97fb6c53d6b6d","fixtures/self/debug_info":"42028a5983006e0703f9ca9515cd27d891ae4af70279fae5011d547f581e2661","fixtures/self/debug_inlined":"89d9516f06ff835621936037f5884fc56712bf304c1dcde52251ddd510fe8710","fixtures/self/debug_line":"b29aebcca3b38bb2bb8aa708cbe74a0dce5a3b0c18916b63d6d17282c017bec7","fixtures/self/debug_loc":"8906ccb9c204f233eb74c1d069dee97a19d18c2051f9147795d7b5364a9266aa","fixtures/self/debug_pubnames":"cf58e237f89c68afba724597fa7e260448636b45f2e69dc6f1bfe34006e27c48","fixtures/self/debug_pubtypes":"d43c1bed71c9d14d1683294cdc1833f069cf131d6e95ee808547919b4f352d81","fixtures/self/debug_ranges":"6d765ac18d33accd89186d077eeb505cbdf97d990c9201d63d9463cd7787ce7a","fixtures/self/debug_str":"9ed904b68eee77b8558b80b3b7ca03e8527f6c64483e9d6d845f40270eb21183","fixtures/self/eh_frame":"6dc3d84351cac42cf73d03452fbb532470dd94d08715154c48417e3f62095f17","fixtures/self/eh_frame_hdr":"afba7a0aa233c9a8c81c986495bd2505164844adb93272d6bc0c9e592e684716","rustfmt.toml":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/arch.rs":"1c4cb3e2a322f3f42fe0b82875c9d0ce060d9af2388990139bdce9a4487c32da","src/common.rs":"392f52a58db6101187ca5525bbeafca9bda2342debd058cabca37350cd9db619","src/constants.rs":"ca3169f7a45ff1b6a504966c5627ad5c99193e2d0ec06dc9edfdf37617198093","src/endianity.rs":"1f7e62ae34f540c06bedf1e7948739211556eea7dd83731a5ca52c7d687ed0fc","src/leb128.rs":"996d5c79d027f97c010ca487bc4ff5f8265f4b9e63d62b4e4fa291383c259ee9","src/lib.rs":"427d747b0af62894e3c5ea20aecad33e5f458bec0b50fbe584e1e6aa1e5eb4f8","src/read/abbrev.rs":"c49c47ff607435c9d0b702faf366068cd1e95d175be79358b1e21244151eeab6","src/read/addr.rs":"f63f289edf889e87107bb2090fb1c50b48af7015f31b7c39c3d6ea09630a38e9","src/read/aranges.rs":"dee9500e0428bc34fca58b2dda85aef6bf0293785c4077c1a4c144109e9d87c9","src/read/cfi.rs":"e4dacfb576ecbe9248cbea3c3c682b6fd835d3843bca68bb3e18dbda55728643","src/read/dwarf.rs":"a39c24429b437ae3a1cd17bae2f01c973c9ce39f7b5f2b3435982d6860944e0e","src/read/endian_reader.rs":"320983a859c2bb0dd44a3e6fae55ff0a84dba3fa80c2edbc64aa8135c44eddf0","src/read/endian_slice.rs":"ae1c52499728f6a85648f1bf87c02dcf43bebecb5ad4e835a1246938ba4338bf","src/read/index.rs":"e79b8d591b8e2007a37f5ea85a6d71b69d56ca3739a85cf7bf361724c5b829fa","src/read/line.rs":"47ca5ebb8bd19000045954686d3320b838e9404cba917ec60525f11ea0d87095","src/read/lists.rs":"e473ff419feed9756289e245b7879bd89e7f19098a53162fe6773fac496ae5bc","src/read/loclists.rs":"2a5655c53fb2bf5cfe2df373210217edaa06e4d3addf27df0f724100cbfbe43b","src/read/lookup.rs":"0cf89ba12b9d48b1fe035dd3a497730323acb9427a9457abbc2f7c58c4c71165","src/read/mod.rs":"7ea1d01906db92a31a0915b8d2a84776b2a1b2a6587aac8a4acf5ecc48c019b6","src/read/op.rs":"2de049cdcff6c0a324c5737d3fc93431c729554b3bf38e09777b855d7058b29f","src/read/pubnames.rs":"701c1279aef596ed8eff13f19a5803f9e1070afa20c9bafbf29659d4c294edd4","src/read/pubtypes.rs":"6250112d63120ed283698cb42189b127f624fb453abb1222dfa75fe103ad077e","src/read/reader.rs":"b10ff3e77b54347e96b1f3cff30da104dfdd0c4d7a55b672950788f1f1ae3478","src/read/rnglists.rs":"e7426fa1564cbd7e84871ddd741d6a7f016596633f1ffa097885b6e685fc8da2","src/read/str.rs":"932971a6f6f3453685dbd33ff3c2d31a10820b989a209bdfeca3e8c5012cc4b8","src/read/unit.rs":"305e834d7c14e6855beab411076cb7db2615373fd761396ec253250bb0381a59","src/read/util.rs":"480acb9a1fbae7ce935dd1d1307e6a0ab222e009b63ae7817b4bcdcccb9a9ec4","src/read/value.rs":"9a961a49c43bd05061fce1765bda0da049f26420d1be2ed0584de7d1597ab836","src/test_util.rs":"291eefa6b51c6d934ba2f4a4c9bc7c403046fc1cccf4d43487820f0154bb89e2","src/write/abbrev.rs":"fa02163389e92e804d139cf84f833ab6af932083f0eb2d74464b4a70bd3237ff","src/write/cfi.rs":"5d36c6978d2bda09921f5b71b764a75a58e819551471fb44db23ce5db7c4a8e3","src/write/dwarf.rs":"8a1a0893e31134ad68993994594f3024ad0c8af7c1188b29e0ffc26b42edef21","src/write/endian_vec.rs":"1d5811986648816a677580b22630f5059757a381487d73e9adbb3008c9ae0c58","src/write/line.rs":"df7d2082c71b5e523cd52745700aae3dcfa5800f0b280e831ef5d8eb8035d6a7","src/write/loc.rs":"bb5b750c04f6603e18225db72652ea00239234ba674a8a8627c99d4ab07b47a9","src/write/mod.rs":"d8aa1da854cdee629d470d00d87e00dc6998e4bec1ca951f8d2f277730ab9d69","src/write/op.rs":"fb99e95631e24e46eaddef393281ed4f4c56ebc0713a8cbe1683893f7bdde8c6","src/write/range.rs":"5bac01e372c08e3cc19e1e07e40492d8214cdfa8881737920cb792f4aa2ba80b","src/write/section.rs":"3ce781d5e82ba365ff54fdd36e0ef58c58a2215b09a8861eb0b038efac82b77f","src/write/str.rs":"4850cc2fee55980f9cbb6b4169f9861ab9d05c2b28a85c2b790480b83a66f514","src/write/unit.rs":"213c881736f8c87fcb2f921e379791eaba2915e8d077139965a9c6211001fe44","src/write/writer.rs":"304181287f90445bbfb33349c26b34bd87002d6844fc5686bfc0756fd0a1ecd8","tests/convert_self.rs":"8fba3599ac892a704cbcd5aed53eaef51b040043da04f85f002c597ee7549046","tests/parse_self.rs":"f2da1c7daef7139545c9367c2f26199e8b4623b31d4ec6480ddd851e6980f2dc"},"package":"78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"} \ No newline at end of file +{"files":{"CHANGELOG.md":"789a696803d3f1bed3ff3566cac8e7cf15c4bf9428242d637d0ce7f3a0ad57a3","CONTRIBUTING.md":"5f513ec06013e4f6f097e9c9492da5a47b9f25c94c6ecadfb655a77405fe912c","Cargo.lock":"284bff6b09ef0fd214c34492417778d6d5b9f75dc54557015af01a95696c752a","Cargo.toml":"92dccbeaa61bc8c65da53917fbf32900b3cb2549f90b67b67e1c67672bac205e","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"7b63ecd5f1902af1b63729947373683c32745c16a10e8e6292e2e2dcd7e90ae0","README.md":"57e36d344dabe1c52a9c81eafb28787c309b86c47437abf8589ef17bf383fc5f","benches/bench.rs":"e0045b989683794951563aa91b37069b2f6ae55f95e288d23f5c984b46e3a7eb","examples/dwarf-validate.rs":"4aac1045e3c08bf00878eeff75c0cfc30c06171c5eab2e71d757505786729687","examples/dwarfdump.rs":"d74323c037689b32825efa9bf69614ee26a444513b266e819ecf486956ee3299","examples/simple.rs":"4c3425e8bd1880d9522f5ed2581fb5ccd452d4be678eebc0e147c48722a7be1d","examples/simple_line.rs":"ac795f859a17650dde466b5b23b8c161b2e3b8eb57e32f5b6718a3072f6bfad0","fixtures/self/README.md":"7cfd76031ec5a4b38cc4eb56ccbfe1bb590fb54c333d037550bdeaaeacfc20cb","fixtures/self/debug_abbrev":"7c0faa940d9c68d196d03ad55a20e5c746040fa428ff323277fa381deff82bba","fixtures/self/debug_aranges":"8c2aeb2335f61d04ecb7b747070d24f83a6517cbee79dc5c96d97fb6c53d6b6d","fixtures/self/debug_info":"42028a5983006e0703f9ca9515cd27d891ae4af70279fae5011d547f581e2661","fixtures/self/debug_inlined":"89d9516f06ff835621936037f5884fc56712bf304c1dcde52251ddd510fe8710","fixtures/self/debug_line":"b29aebcca3b38bb2bb8aa708cbe74a0dce5a3b0c18916b63d6d17282c017bec7","fixtures/self/debug_loc":"8906ccb9c204f233eb74c1d069dee97a19d18c2051f9147795d7b5364a9266aa","fixtures/self/debug_pubnames":"cf58e237f89c68afba724597fa7e260448636b45f2e69dc6f1bfe34006e27c48","fixtures/self/debug_pubtypes":"d43c1bed71c9d14d1683294cdc1833f069cf131d6e95ee808547919b4f352d81","fixtures/self/debug_ranges":"6d765ac18d33accd89186d077eeb505cbdf97d990c9201d63d9463cd7787ce7a","fixtures/self/debug_str":"9ed904b68eee77b8558b80b3b7ca03e8527f6c64483e9d6d845f40270eb21183","fixtures/self/eh_frame":"6dc3d84351cac42cf73d03452fbb532470dd94d08715154c48417e3f62095f17","fixtures/self/eh_frame_hdr":"afba7a0aa233c9a8c81c986495bd2505164844adb93272d6bc0c9e592e684716","rustfmt.toml":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/arch.rs":"1c4cb3e2a322f3f42fe0b82875c9d0ce060d9af2388990139bdce9a4487c32da","src/common.rs":"392f52a58db6101187ca5525bbeafca9bda2342debd058cabca37350cd9db619","src/constants.rs":"358cf7924c79bc72de59d23d1fa02b2047d6c763c8fbd8be263ab8cd3e3ba7ec","src/endianity.rs":"1f7e62ae34f540c06bedf1e7948739211556eea7dd83731a5ca52c7d687ed0fc","src/leb128.rs":"996d5c79d027f97c010ca487bc4ff5f8265f4b9e63d62b4e4fa291383c259ee9","src/lib.rs":"6863b9a9d1eddf34b4095dfe60318aae56914fbf515ba5601b29024cc963f27c","src/read/abbrev.rs":"a3f550c32f1eb880d82bdb5257d35e10d32cfd039050e8131cbeedac346cc1d9","src/read/addr.rs":"f63f289edf889e87107bb2090fb1c50b48af7015f31b7c39c3d6ea09630a38e9","src/read/aranges.rs":"ba3302f87cffb7ee15f48b0530ebd707f45ad056934223078d25ae2a1b034f1c","src/read/cfi.rs":"b1064ed9b4b87169a148cc86adc7443c5a771dc2d1799129f7883f1ef6adc165","src/read/dwarf.rs":"a39c24429b437ae3a1cd17bae2f01c973c9ce39f7b5f2b3435982d6860944e0e","src/read/endian_reader.rs":"320983a859c2bb0dd44a3e6fae55ff0a84dba3fa80c2edbc64aa8135c44eddf0","src/read/endian_slice.rs":"ae1c52499728f6a85648f1bf87c02dcf43bebecb5ad4e835a1246938ba4338bf","src/read/index.rs":"e79b8d591b8e2007a37f5ea85a6d71b69d56ca3739a85cf7bf361724c5b829fa","src/read/line.rs":"af7a1520777e56632970fc5fe7377fdcd12d078eb88eeb2b0f2cc95b73ff68a7","src/read/lists.rs":"67ca9e1a36a91feb4996d035211de845205212bfda02163685d217818567ff93","src/read/loclists.rs":"1b4ea85c0dd8c6eae492a60cb70810185d56ba579df7986cb8a36385031b10fd","src/read/lookup.rs":"0cf89ba12b9d48b1fe035dd3a497730323acb9427a9457abbc2f7c58c4c71165","src/read/mod.rs":"3bafc747c31a575bcc92d3e7d5ea5a15f5acc01918a4377cec1dced0f85b5d2b","src/read/op.rs":"e5dce6520dfc90ec74c3b070ca374b89fcf55ff23101471591458175a72c79e6","src/read/pubnames.rs":"ed752ee1a7017e6d3be42d81e4ddaaac960ef08081463a19106c9f041526d4a3","src/read/pubtypes.rs":"5e75b32c0923e827aff0bb2db456797a0e8d38ba46be992558a7990b3196bcf5","src/read/reader.rs":"b10ff3e77b54347e96b1f3cff30da104dfdd0c4d7a55b672950788f1f1ae3478","src/read/rnglists.rs":"af637d283d76514382ee0556463cccab4e6f0ea4d061db9a44a594b5d57d1fd7","src/read/str.rs":"4c2f50014451621fea45969cd313f6840fcd3a99d7a2d081bfa1f8e0e434133a","src/read/unit.rs":"6ed00ba004c329008bf295d9c7d724afe961750f0c7b08430fc213fd5d998003","src/read/util.rs":"0b7d0d2225a98618070dc472ccba49a5411aa8beed5ff6696da079d06156d363","src/read/value.rs":"5a91e03ad3d41f679b264753498434b91948c6b89955e4beb4522498386d9b1d","src/test_util.rs":"291eefa6b51c6d934ba2f4a4c9bc7c403046fc1cccf4d43487820f0154bb89e2","src/write/abbrev.rs":"fa02163389e92e804d139cf84f833ab6af932083f0eb2d74464b4a70bd3237ff","src/write/cfi.rs":"3b04b0ebd82363738199cc673f64e0ceb60506a67c4f18b435a109caa62840f3","src/write/dwarf.rs":"8a1a0893e31134ad68993994594f3024ad0c8af7c1188b29e0ffc26b42edef21","src/write/endian_vec.rs":"1d5811986648816a677580b22630f5059757a381487d73e9adbb3008c9ae0c58","src/write/line.rs":"df7d2082c71b5e523cd52745700aae3dcfa5800f0b280e831ef5d8eb8035d6a7","src/write/loc.rs":"bb5b750c04f6603e18225db72652ea00239234ba674a8a8627c99d4ab07b47a9","src/write/mod.rs":"d8aa1da854cdee629d470d00d87e00dc6998e4bec1ca951f8d2f277730ab9d69","src/write/op.rs":"7b1d49b10c8c92b2d5b259e83119ff7dc95bc552535bb7b1a82ca9556a35c589","src/write/range.rs":"5bac01e372c08e3cc19e1e07e40492d8214cdfa8881737920cb792f4aa2ba80b","src/write/section.rs":"3ce781d5e82ba365ff54fdd36e0ef58c58a2215b09a8861eb0b038efac82b77f","src/write/str.rs":"4850cc2fee55980f9cbb6b4169f9861ab9d05c2b28a85c2b790480b83a66f514","src/write/unit.rs":"213c881736f8c87fcb2f921e379791eaba2915e8d077139965a9c6211001fe44","src/write/writer.rs":"304181287f90445bbfb33349c26b34bd87002d6844fc5686bfc0756fd0a1ecd8","tests/convert_self.rs":"180909b562969e1691b64628ded8654e6e0b10b3357f39917bd8ac288c5826dd","tests/parse_self.rs":"f2da1c7daef7139545c9367c2f26199e8b4623b31d4ec6480ddd851e6980f2dc"},"package":"22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"} \ No newline at end of file diff --git a/vendor/gimli/CHANGELOG.md b/vendor/gimli/CHANGELOG.md index da2ab0fe7..9ca6d70a8 100644 --- a/vendor/gimli/CHANGELOG.md +++ b/vendor/gimli/CHANGELOG.md @@ -2,6 +2,28 @@ -------------------------------------------------------------------------------- +## 0.26.2 + +Released 2022/07/16. + +### Changed + +* Fixed CFI personality encoding when writing. + [#609](https://github.com/gimli-rs/gimli/pull/609) + +* Fixed use of raw pointer for mutation, detected by Miri. + [#614](https://github.com/gimli-rs/gimli/pull/614) + +* Fixed `DW_OP_GNU_implicit_pointer` handling for DWARF version 2. + [#618](https://github.com/gimli-rs/gimli/pull/618) + +### Added + +* Added `read::EhHdrTable::iter`. + [#619](https://github.com/gimli-rs/gimli/pull/619) + +-------------------------------------------------------------------------------- + ## 0.26.1 Released 2021/11/02. diff --git a/vendor/gimli/Cargo.lock b/vendor/gimli/Cargo.lock index d55f428d0..b4a719a0c 100644 --- a/vendor/gimli/Cargo.lock +++ b/vendor/gimli/Cargo.lock @@ -153,14 +153,14 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.1" +version = "0.26.2" dependencies = [ "compiler_builtins", "crossbeam", "fallible-iterator", "getopts", "indexmap", - "memmap", + "memmap2", "num_cpus", "object", "rayon", @@ -216,13 +216,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] -name = "memmap" -version = "0.7.0" +name = "memmap2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +checksum = "3a79b39c93a7a5a27eeaf9a23b5ff43f1b9e0ad6b1cdd441140ae53c35613fc7" dependencies = [ "libc", - "winapi", ] [[package]] @@ -256,9 +255,9 @@ dependencies = [ [[package]] name = "object" -version = "0.27.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ "flate2", "memchr", @@ -357,25 +356,3 @@ name = "wasmparser" version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32fddd575d477c6e9702484139cf9f23dcd554b06d185ed0f56c857dd3a47aa6" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/vendor/gimli/Cargo.toml b/vendor/gimli/Cargo.toml index d5f283c80..f36ccd936 100644 --- a/vendor/gimli/Cargo.toml +++ b/vendor/gimli/Cargo.toml @@ -3,25 +3,37 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies +# to registry (e.g., crates.io) dependencies. # -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "gimli" -version = "0.26.1" -exclude = ["/ci/*", "/releases/*", "/.github"] +version = "0.26.2" +exclude = [ + "/releases/*", + "/.github", +] description = "A library for reading and writing the DWARF debugging format." documentation = "https://docs.rs/gimli" readme = "./README.md" -keywords = ["DWARF", "debug", "ELF", "eh_frame"] -categories = ["development-tools::debugging", "development-tools::profiling", "parser-implementations"] -license = "Apache-2.0/MIT" +keywords = [ + "DWARF", + "debug", + "ELF", + "eh_frame", +] +categories = [ + "development-tools::debugging", + "development-tools::profiling", + "parser-implementations", +] +license = "MIT OR Apache-2.0" repository = "https://github.com/gimli-rs/gimli" + [profile.bench] codegen-units = 1 debug = true @@ -40,11 +52,18 @@ required-features = ["read"] [[example]] name = "dwarfdump" -required-features = ["read", "std"] +required-features = [ + "read", + "std", +] [[example]] name = "dwarf-validate" -required-features = ["read", "std"] +required-features = [ + "read", + "std", +] + [dependencies.alloc] version = "1.0.0" optional = true @@ -72,20 +91,21 @@ optional = true version = "1.1.0" optional = true default-features = false + [dev-dependencies.crossbeam] version = "0.8" [dev-dependencies.getopts] version = "0.2" -[dev-dependencies.memmap] -version = "0.7" +[dev-dependencies.memmap2] +version = "0.5.5" [dev-dependencies.num_cpus] version = "1" [dev-dependencies.object] -version = "0.27.1" +version = "0.29.0" features = ["wasm"] [dev-dependencies.rayon] @@ -101,15 +121,26 @@ version = "0.1.3" version = "2" [features] -default = ["read", "write", "std", "fallible-iterator", "endian-reader"] -endian-reader = ["read", "stable_deref_trait"] +default = [ + "read", + "write", + "std", + "fallible-iterator", + "endian-reader", +] +endian-reader = [ + "read", + "stable_deref_trait", +] read = ["read-core"] read-core = [] -rustc-dep-of-std = ["core", "alloc", "compiler_builtins"] -std = ["fallible-iterator/std", "stable_deref_trait/std"] +rustc-dep-of-std = [ + "core", + "alloc", + "compiler_builtins", +] +std = [ + "fallible-iterator/std", + "stable_deref_trait/std", +] write = ["indexmap"] -[badges.coveralls] -repository = "gimli-rs/gimli" - -[badges.travis-ci] -repository = "gimli-rs/gimli" diff --git a/vendor/gimli/README.md b/vendor/gimli/README.md index 56cee2531..19e7bbd0e 100644 --- a/vendor/gimli/README.md +++ b/vendor/gimli/README.md @@ -6,7 +6,7 @@ [![Coverage Status](https://coveralls.io/repos/github/gimli-rs/gimli/badge.svg?branch=master)](https://coveralls.io/github/gimli-rs/gimli?branch=master) `gimli` is a blazing fast library for consuming the -[DWARF debugging format](http://dwarfstd.org/). +[DWARF debugging format](https://dwarfstd.org/). * **Zero copy:** everything is just a reference to the original input buffer. No copies of the input data get made. @@ -30,7 +30,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -gimli = "0.26.1" +gimli = "0.26.2" ``` The minimum supported Rust version is 1.42.0. @@ -49,7 +49,7 @@ The minimum supported Rust version is 1.42.0. * [An `addr2line` clone](https://github.com/gimli-rs/addr2line) - * [`ddbug`](https://github.com/philipc/ddbug), a utility giving insight into + * [`ddbug`](https://github.com/gimli-rs/ddbug), a utility giving insight into code generation by making debugging information readable. * [`dwprod`](https://github.com/fitzgen/dwprod), a tiny utility to list the diff --git a/vendor/gimli/examples/dwarf-validate.rs b/vendor/gimli/examples/dwarf-validate.rs index 1eabccc11..54d8f3a1d 100644 --- a/vendor/gimli/examples/dwarf-validate.rs +++ b/vendor/gimli/examples/dwarf-validate.rs @@ -52,7 +52,7 @@ fn main() { continue; } }; - let file = match unsafe { memmap::Mmap::map(&file) } { + let file = match unsafe { memmap2::Mmap::map(&file) } { Ok(mmap) => mmap, Err(err) => { eprintln!("Failed to map file '{}': {}", path.display(), &err); diff --git a/vendor/gimli/examples/dwarfdump.rs b/vendor/gimli/examples/dwarfdump.rs index 64b233305..4b61fd572 100644 --- a/vendor/gimli/examples/dwarfdump.rs +++ b/vendor/gimli/examples/dwarfdump.rs @@ -490,7 +490,7 @@ fn main() { process::exit(1); } }; - let mmap = match unsafe { memmap::Mmap::map(&file) } { + let mmap = match unsafe { memmap2::Mmap::map(&file) } { Ok(mmap) => mmap, Err(err) => { eprintln!("Failed to map file '{}': {}", path, err); @@ -531,7 +531,7 @@ fn main() { continue; } }; - let file = match unsafe { memmap::Mmap::map(&file) } { + let file = match unsafe { memmap2::Mmap::map(&file) } { Ok(mmap) => mmap, Err(err) => { eprintln!("Failed to map file '{}': {}", file_path, err); @@ -786,17 +786,36 @@ fn dump_eh_frame( // TODO: augmentation writeln!(w, " code_align: {}", cie.code_alignment_factor())?; writeln!(w, " data_align: {}", cie.data_alignment_factor())?; - writeln!(w, " ra_register: {:#x}", cie.return_address_register().0)?; + writeln!( + w, + " ra_register: {}", + register_name(cie.return_address_register()) + )?; if let Some(encoding) = cie.lsda_encoding() { - writeln!(w, " lsda_encoding: {:#02x}", encoding.0)?; + writeln!( + w, + " lsda_encoding: {}/{}", + encoding.application(), + encoding.format() + )?; } if let Some((encoding, personality)) = cie.personality_with_encoding() { - write!(w, " personality: {:#02x} ", encoding.0)?; + write!( + w, + " personality: {}/{} ", + encoding.application(), + encoding.format() + )?; dump_pointer(w, personality)?; writeln!(w)?; } if let Some(encoding) = cie.fde_address_encoding() { - writeln!(w, " fde_encoding: {:#02x}", encoding.0)?; + writeln!( + w, + " fde_encoding: {}/{}", + encoding.application(), + encoding.format() + )?; } let instructions = cie.instructions(&eh_frame, &bases); dump_cfi_instructions(w, instructions, true, register_name)?; @@ -1585,21 +1604,21 @@ fn dump_type_signature(w: &mut W, signature: gimli::DebugTypeSignature fn dump_file_index( w: &mut W, - file: u64, + file_index: u64, unit: &gimli::Unit, dwarf: &gimli::Dwarf, ) -> Result<()> { - if file == 0 { + if file_index == 0 && unit.header.version() <= 4 { return Ok(()); } let header = match unit.line_program { Some(ref program) => program.header(), None => return Ok(()), }; - let file = match header.file(file) { - Some(header) => header, + let file = match header.file(file_index) { + Some(file) => file, None => { - writeln!(w, "Unable to get header for file {}", file)?; + writeln!(w, "Unable to get header for file {}", file_index)?; return Ok(()); } }; @@ -1607,7 +1626,7 @@ fn dump_file_index( if let Some(directory) = file.directory(header) { let directory = dwarf.attr_string(unit, directory)?; let directory = directory.to_string_lossy()?; - if !directory.starts_with('/') { + if file.directory_index() != 0 && !directory.starts_with('/') { if let Some(ref comp_dir) = unit.comp_dir { write!(w, "{}/", comp_dir.to_string_lossy()?,)?; } @@ -2238,7 +2257,7 @@ fn dump_line_program( writeln!(w, " [lno,col]")?; } let mut rows = program.rows(); - let mut file_index = 0; + let mut file_index = std::u64::MAX; while let Some((header, row)) = rows.next_row()? { let line = match row.line() { Some(line) => line.get(), diff --git a/vendor/gimli/examples/simple.rs b/vendor/gimli/examples/simple.rs index b73ab7552..7c958d45c 100644 --- a/vendor/gimli/examples/simple.rs +++ b/vendor/gimli/examples/simple.rs @@ -6,7 +6,7 @@ use std::{borrow, env, fs}; fn main() { for path in env::args().skip(1) { let file = fs::File::open(&path).unwrap(); - let mmap = unsafe { memmap::Mmap::map(&file).unwrap() }; + let mmap = unsafe { memmap2::Mmap::map(&file).unwrap() }; let object = object::File::parse(&*mmap).unwrap(); let endian = if object.is_little_endian() { gimli::RunTimeEndian::Little diff --git a/vendor/gimli/examples/simple_line.rs b/vendor/gimli/examples/simple_line.rs index bf1114f90..87b224cda 100644 --- a/vendor/gimli/examples/simple_line.rs +++ b/vendor/gimli/examples/simple_line.rs @@ -6,7 +6,7 @@ use std::{borrow, env, fs, path}; fn main() { for path in env::args().skip(1) { let file = fs::File::open(&path).unwrap(); - let mmap = unsafe { memmap::Mmap::map(&file).unwrap() }; + let mmap = unsafe { memmap2::Mmap::map(&file).unwrap() }; let object = object::File::parse(&*mmap).unwrap(); let endian = if object.is_little_endian() { gimli::RunTimeEndian::Little @@ -68,9 +68,16 @@ fn dump_file(object: &object::File, endian: gimli::RunTimeEndian) -> Result<(), let mut path = path::PathBuf::new(); if let Some(file) = row.file(header) { path = comp_dir.clone(); - if let Some(dir) = file.directory(header) { - path.push(dwarf.attr_string(&unit, dir)?.to_string_lossy().as_ref()); + + // The directory index 0 is defined to correspond to the compilation unit directory. + if file.directory_index() != 0 { + if let Some(dir) = file.directory(header) { + path.push( + dwarf.attr_string(&unit, dir)?.to_string_lossy().as_ref(), + ); + } } + path.push( dwarf .attr_string(&unit, file.path_name())? diff --git a/vendor/gimli/fixtures/self/README.md b/vendor/gimli/fixtures/self/README.md index 3847c3852..91053d9b4 100644 --- a/vendor/gimli/fixtures/self/README.md +++ b/vendor/gimli/fixtures/self/README.md @@ -7,7 +7,7 @@ about cross platform and cross object file format issues when running examples. # Updating and adding new sections -## OSX +## macOS Use `otool` to list the sections of a binary: diff --git a/vendor/gimli/src/constants.rs b/vendor/gimli/src/constants.rs index c8d6a1662..c617f4e2e 100644 --- a/vendor/gimli/src/constants.rs +++ b/vendor/gimli/src/constants.rs @@ -1315,7 +1315,7 @@ DwEhPe(u8) { // pointer result itself. // // This isn't defined in the DWARF or the `.eh_frame` standards, but is -// generated by both GNU/Linux and OSX tooling. +// generated by both GNU/Linux and macOS tooling. DW_EH_PE_indirect = 0x80, // These constants apply to both the lower and upper bits. diff --git a/vendor/gimli/src/lib.rs b/vendor/gimli/src/lib.rs index 7ac1820e3..ed1af9cbd 100644 --- a/vendor/gimli/src/lib.rs +++ b/vendor/gimli/src/lib.rs @@ -1,5 +1,5 @@ //! `gimli` is a library for reading and writing the -//! [DWARF debugging format](http://dwarfstd.org/). +//! [DWARF debugging format](https://dwarfstd.org/). //! //! See the [read](./read/index.html) and [write](./write/index.html) modules //! for examples and API documentation. diff --git a/vendor/gimli/src/read/abbrev.rs b/vendor/gimli/src/read/abbrev.rs index 5f0e7bed7..1a24835a7 100644 --- a/vendor/gimli/src/read/abbrev.rs +++ b/vendor/gimli/src/read/abbrev.rs @@ -29,7 +29,7 @@ where /// /// It is the caller's responsibility to read the `.debug_abbrev` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugAbbrev, LittleEndian}; diff --git a/vendor/gimli/src/read/aranges.rs b/vendor/gimli/src/read/aranges.rs index c2d22850c..83159b69b 100644 --- a/vendor/gimli/src/read/aranges.rs +++ b/vendor/gimli/src/read/aranges.rs @@ -18,7 +18,7 @@ where /// /// It is the caller's responsibility to read the `.debug_aranges` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugAranges, LittleEndian}; diff --git a/vendor/gimli/src/read/cfi.rs b/vendor/gimli/src/read/cfi.rs index b6a81f3f4..2e5167349 100644 --- a/vendor/gimli/src/read/cfi.rs +++ b/vendor/gimli/src/read/cfi.rs @@ -63,7 +63,7 @@ where /// /// It is the caller's responsibility to read the section and present it as /// a `&[u8]` slice. That means using some ELF loader on Linux, a Mach-O - /// loader on OSX, etc. + /// loader on macOS, etc. /// /// ``` /// use gimli::{DebugFrame, NativeEndian}; @@ -218,6 +218,81 @@ impl ParsedEhFrameHdr { } } +/// An iterator for `.eh_frame_hdr` section's binary search table. +/// +/// Each table entry consists of a tuple containing an `initial_location` and `address`. +/// The `initial location` represents the first address that the targeted FDE +/// is able to decode. The `address` is the address of the FDE in the `.eh_frame` section. +/// The `address` can be converted with `EhHdrTable::pointer_to_offset` and `EhFrame::fde_from_offset` to an FDE. +#[derive(Debug)] +pub struct EhHdrTableIter<'a, 'bases, R: Reader> { + hdr: &'a ParsedEhFrameHdr, + table: R, + bases: &'bases BaseAddresses, + remain: u64, +} + +impl<'a, 'bases, R: Reader> EhHdrTableIter<'a, 'bases, R> { + /// Yield the next entry in the `EhHdrTableIter`. + pub fn next(&mut self) -> Result> { + if self.remain == 0 { + return Ok(None); + } + + let parameters = PointerEncodingParameters { + bases: &self.bases.eh_frame_hdr, + func_base: None, + address_size: self.hdr.address_size, + section: &self.hdr.section, + }; + + self.remain -= 1; + let from = parse_encoded_pointer(self.hdr.table_enc, ¶meters, &mut self.table)?; + let to = parse_encoded_pointer(self.hdr.table_enc, ¶meters, &mut self.table)?; + Ok(Some((from, to))) + } + /// Yield the nth entry in the `EhHdrTableIter` + pub fn nth(&mut self, n: usize) -> Result> { + use core::convert::TryFrom; + let size = match self.hdr.table_enc.format() { + constants::DW_EH_PE_uleb128 | constants::DW_EH_PE_sleb128 => { + return Err(Error::VariableLengthSearchTable); + } + constants::DW_EH_PE_sdata2 | constants::DW_EH_PE_udata2 => 2, + constants::DW_EH_PE_sdata4 | constants::DW_EH_PE_udata4 => 4, + constants::DW_EH_PE_sdata8 | constants::DW_EH_PE_udata8 => 8, + _ => return Err(Error::UnknownPointerEncoding), + }; + + let row_size = size * 2; + let n = u64::try_from(n).map_err(|_| Error::UnsupportedOffset)?; + self.remain = self.remain.saturating_sub(n); + self.table.skip(R::Offset::from_u64(n * row_size)?)?; + self.next() + } +} + +#[cfg(feature = "fallible-iterator")] +impl<'a, 'bases, R: Reader> fallible_iterator::FallibleIterator for EhHdrTableIter<'a, 'bases, R> { + type Item = (Pointer, Pointer); + type Error = Error; + fn next(&mut self) -> Result> { + EhHdrTableIter::next(self) + } + + fn size_hint(&self) -> (usize, Option) { + use core::convert::TryInto; + ( + self.remain.try_into().unwrap_or(0), + self.remain.try_into().ok(), + ) + } + + fn nth(&mut self, n: usize) -> Result> { + EhHdrTableIter::nth(self, n) + } +} + /// The CFI binary search table that is an optional part of the `.eh_frame_hdr` section. #[derive(Debug, Clone)] pub struct EhHdrTable<'a, R: Reader> { @@ -225,6 +300,20 @@ pub struct EhHdrTable<'a, R: Reader> { } impl<'a, R: Reader + 'a> EhHdrTable<'a, R> { + /// Return an iterator that can walk the `.eh_frame_hdr` table. + /// + /// Each table entry consists of a tuple containing an `initial_location` and `address`. + /// The `initial location` represents the first address that the targeted FDE + /// is able to decode. The `address` is the address of the FDE in the `.eh_frame` section. + /// The `address` can be converted with `EhHdrTable::pointer_to_offset` and `EhFrame::fde_from_offset` to an FDE. + pub fn iter<'bases>(&self, bases: &'bases BaseAddresses) -> EhHdrTableIter<'_, 'bases, R> { + EhHdrTableIter { + hdr: self.hdr, + bases, + remain: self.hdr.fde_count, + table: self.hdr.table.clone(), + } + } /// *Probably* returns a pointer to the FDE for the given address. /// /// This performs a binary search, so if there is no FDE for the given address, @@ -423,19 +512,19 @@ where Endian: Endianity, { /// Construct a new `EhFrame` instance from the data in the - /// `.debug_frame` section. + /// `.eh_frame` section. /// /// It is the caller's responsibility to read the section and present it as /// a `&[u8]` slice. That means using some ELF loader on Linux, a Mach-O - /// loader on OSX, etc. + /// loader on macOS, etc. /// /// ``` /// use gimli::{EhFrame, EndianSlice, NativeEndian}; /// - /// // Use with `.debug_frame` + /// // Use with `.eh_frame` /// # let buf = [0x00, 0x01, 0x02, 0x03]; - /// # let read_debug_frame_section_somehow = || &buf; - /// let debug_frame = EhFrame::new(read_debug_frame_section_somehow(), NativeEndian); + /// # let read_eh_frame_section_somehow = || &buf; + /// let eh_frame = EhFrame::new(read_eh_frame_section_somehow(), NativeEndian); /// ``` pub fn new(section: &'input [u8], endian: Endian) -> Self { Self::from(EndianSlice::new(section, endian)) @@ -6211,6 +6300,39 @@ mod tests { let table = table.unwrap(); let bases = Default::default(); + let mut iter = table.iter(&bases); + assert_eq!( + iter.next(), + Ok(Some(( + Pointer::Direct(10), + Pointer::Direct(0x12345 + start_of_fde1.value().unwrap() as u64) + ))) + ); + assert_eq!( + iter.next(), + Ok(Some(( + Pointer::Direct(20), + Pointer::Direct(0x12345 + start_of_fde2.value().unwrap() as u64) + ))) + ); + assert_eq!(iter.next(), Ok(None)); + + assert_eq!( + table.iter(&bases).nth(0), + Ok(Some(( + Pointer::Direct(10), + Pointer::Direct(0x12345 + start_of_fde1.value().unwrap() as u64) + ))) + ); + + assert_eq!( + table.iter(&bases).nth(1), + Ok(Some(( + Pointer::Direct(20), + Pointer::Direct(0x12345 + start_of_fde2.value().unwrap() as u64) + ))) + ); + assert_eq!(table.iter(&bases).nth(2), Ok(None)); let f = |_: &_, _: &_, o: EhFrameOffset| { assert_eq!(o, EhFrameOffset(start_of_cie.value().unwrap() as usize)); diff --git a/vendor/gimli/src/read/line.rs b/vendor/gimli/src/read/line.rs index 096ddf07b..0e7380bb9 100644 --- a/vendor/gimli/src/read/line.rs +++ b/vendor/gimli/src/read/line.rs @@ -27,7 +27,7 @@ where /// /// It is the caller's responsibility to read the `.debug_line` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugLine, LittleEndian}; diff --git a/vendor/gimli/src/read/lists.rs b/vendor/gimli/src/read/lists.rs index b63c5c126..898a757d3 100644 --- a/vendor/gimli/src/read/lists.rs +++ b/vendor/gimli/src/read/lists.rs @@ -4,6 +4,7 @@ use crate::read::{Error, Reader, Result}; #[derive(Debug, Clone, Copy)] pub(crate) struct ListsHeader { encoding: Encoding, + #[allow(dead_code)] offset_entry_count: u32, } diff --git a/vendor/gimli/src/read/loclists.rs b/vendor/gimli/src/read/loclists.rs index 3c4da127d..3902c181b 100644 --- a/vendor/gimli/src/read/loclists.rs +++ b/vendor/gimli/src/read/loclists.rs @@ -24,7 +24,7 @@ where /// /// It is the caller's responsibility to read the `.debug_loc` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugLoc, LittleEndian}; @@ -70,7 +70,7 @@ where /// /// It is the caller's responsibility to read the `.debug_loclists` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugLocLists, LittleEndian}; diff --git a/vendor/gimli/src/read/mod.rs b/vendor/gimli/src/read/mod.rs index 7291f3b96..3110957c2 100644 --- a/vendor/gimli/src/read/mod.rs +++ b/vendor/gimli/src/read/mod.rs @@ -48,7 +48,7 @@ //! //! * [An `addr2line` clone](https://github.com/gimli-rs/addr2line) //! -//! * [`ddbug`](https://github.com/philipc/ddbug), a utility giving insight into +//! * [`ddbug`](https://github.com/gimli-rs/ddbug), a utility giving insight into //! code generation by making debugging information readable //! //! * [`dwprod`](https://github.com/fitzgen/dwprod), a tiny utility to list the diff --git a/vendor/gimli/src/read/op.rs b/vendor/gimli/src/read/op.rs index 2ca6247bc..88ea20297 100644 --- a/vendor/gimli/src/read/op.rs +++ b/vendor/gimli/src/read/op.rs @@ -707,7 +707,13 @@ where } constants::DW_OP_stack_value => Ok(Operation::StackValue), constants::DW_OP_implicit_pointer | constants::DW_OP_GNU_implicit_pointer => { - let value = bytes.read_offset(encoding.format)?; + let value = if encoding.version == 2 { + bytes + .read_address(encoding.address_size) + .and_then(Offset::from_u64)? + } else { + bytes.read_offset(encoding.format)? + }; let byte_offset = bytes.read_sleb128()?; Ok(Operation::ImplicitPointer { value: DebugInfoOffset(value), @@ -2738,6 +2744,19 @@ mod tests { }, encoding8(), ); + + check_op_parse( + |s| s.D8(op.0).D64(0x1234_5678).sleb(0x123), + &Operation::ImplicitPointer { + value: DebugInfoOffset(0x1234_5678), + byte_offset: 0x123, + }, + Encoding { + format: Format::Dwarf32, + version: 2, + address_size: 8, + }, + ) } } diff --git a/vendor/gimli/src/read/pubnames.rs b/vendor/gimli/src/read/pubnames.rs index f05861f70..e8b7e5528 100644 --- a/vendor/gimli/src/read/pubnames.rs +++ b/vendor/gimli/src/read/pubnames.rs @@ -58,7 +58,7 @@ where /// /// It is the caller's responsibility to read the `.debug_pubnames` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugPubNames, LittleEndian}; diff --git a/vendor/gimli/src/read/pubtypes.rs b/vendor/gimli/src/read/pubtypes.rs index 0226e84d4..6723b4222 100644 --- a/vendor/gimli/src/read/pubtypes.rs +++ b/vendor/gimli/src/read/pubtypes.rs @@ -58,7 +58,7 @@ where /// /// It is the caller's responsibility to read the `.debug_pubtypes` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugPubTypes, LittleEndian}; diff --git a/vendor/gimli/src/read/rnglists.rs b/vendor/gimli/src/read/rnglists.rs index dd68083ac..d8d49042f 100644 --- a/vendor/gimli/src/read/rnglists.rs +++ b/vendor/gimli/src/read/rnglists.rs @@ -24,7 +24,7 @@ where /// /// It is the caller's responsibility to read the `.debug_ranges` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugRanges, LittleEndian}; @@ -70,7 +70,7 @@ where /// /// It is the caller's responsibility to read the `.debug_rnglists` /// section and present it as a `&[u8]` slice. That means using some ELF - /// loader on Linux, a Mach-O loader on OSX, etc. + /// loader on Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugRngLists, LittleEndian}; diff --git a/vendor/gimli/src/read/str.rs b/vendor/gimli/src/read/str.rs index dce8016af..c6b87d8f9 100644 --- a/vendor/gimli/src/read/str.rs +++ b/vendor/gimli/src/read/str.rs @@ -22,7 +22,7 @@ where /// /// It is the caller's responsibility to read the `.debug_str` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugStr, LittleEndian}; @@ -214,7 +214,7 @@ where /// /// It is the caller's responsibility to read the `.debug_line_str` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugLineStr, LittleEndian}; diff --git a/vendor/gimli/src/read/unit.rs b/vendor/gimli/src/read/unit.rs index 4766b2e84..670e55efd 100644 --- a/vendor/gimli/src/read/unit.rs +++ b/vendor/gimli/src/read/unit.rs @@ -93,7 +93,7 @@ where /// /// It is the caller's responsibility to read the `.debug_info` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugInfo, LittleEndian}; @@ -3086,7 +3086,7 @@ where /// /// It is the caller's responsibility to read the `.debug_types` section and /// present it as a `&[u8]` slice. That means using some ELF loader on - /// Linux, a Mach-O loader on OSX, etc. + /// Linux, a Mach-O loader on macOS, etc. /// /// ``` /// use gimli::{DebugTypes, LittleEndian}; diff --git a/vendor/gimli/src/read/util.rs b/vendor/gimli/src/read/util.rs index dd2af8181..16eafdde4 100644 --- a/vendor/gimli/src/read/util.rs +++ b/vendor/gimli/src/read/util.rs @@ -180,7 +180,7 @@ impl ArrayVec> { let slice = Box::leak(storage); debug_assert!(len <= slice.len()); // SAFETY: valid elements. - unsafe { Vec::from_raw_parts(slice.as_ptr() as _, len, slice.len()) } + unsafe { Vec::from_raw_parts(slice.as_mut_ptr() as *mut T, len, slice.len()) } } } diff --git a/vendor/gimli/src/read/value.rs b/vendor/gimli/src/read/value.rs index fc8c355a9..6f43ebb26 100644 --- a/vendor/gimli/src/read/value.rs +++ b/vendor/gimli/src/read/value.rs @@ -1,7 +1,5 @@ //! Definitions for values used in DWARF expressions. -use core::mem; - use crate::constants; #[cfg(feature = "read")] use crate::read::{AttributeValue, DebuggingInformationEntry}; diff --git a/vendor/gimli/src/write/cfi.rs b/vendor/gimli/src/write/cfi.rs index c58eb1b1d..718cb69ad 100644 --- a/vendor/gimli/src/write/cfi.rs +++ b/vendor/gimli/src/write/cfi.rs @@ -239,7 +239,7 @@ impl CommonInformationEntry { } if let Some((eh_pe, address)) = self.personality { w.write_u8(eh_pe.0)?; - w.write_eh_pointer(address, constants::DW_EH_PE_absptr, encoding.address_size)?; + w.write_eh_pointer(address, eh_pe, encoding.address_size)?; } if self.fde_address_encoding != constants::DW_EH_PE_absptr { w.write_u8(self.fde_address_encoding.0)?; @@ -888,6 +888,19 @@ mod tests { fde4.lsda = Some(Address::Constant(0x4400)); frames.add_fde(cie2_id, fde4.clone()); + let mut cie3 = CommonInformationEntry::new(encoding, 1, 8, X86_64::RA); + cie3.fde_address_encoding = constants::DW_EH_PE_pcrel; + cie3.lsda_encoding = Some(constants::DW_EH_PE_pcrel); + cie3.personality = Some((constants::DW_EH_PE_pcrel, Address::Constant(0x1235))); + cie3.signal_trampoline = true; + let cie3_id = frames.add_cie(cie3.clone()); + assert_ne!(cie2_id, cie3_id); + assert_eq!(cie3_id, frames.add_cie(cie3.clone())); + + let mut fde5 = FrameDescriptionEntry::new(Address::Constant(0x5000), 0x50); + fde5.lsda = Some(Address::Constant(0x5500)); + frames.add_fde(cie3_id, fde5.clone()); + // Test writing `.debug_frame`. let mut debug_frame = DebugFrame::from(EndianVec::new(LittleEndian)); frames.write_debug_frame(&mut debug_frame).unwrap(); diff --git a/vendor/gimli/src/write/op.rs b/vendor/gimli/src/write/op.rs index d1cacb356..c70eec2dd 100644 --- a/vendor/gimli/src/write/op.rs +++ b/vendor/gimli/src/write/op.rs @@ -778,7 +778,11 @@ impl Operation { } else { w.write_u8(constants::DW_OP_GNU_implicit_pointer.0)?; } - let size = encoding.format.word_size(); + let size = if encoding.version == 2 { + encoding.address_size + } else { + encoding.format.word_size() + }; match entry { Reference::Symbol(symbol) => { w.write_reference(symbol, size)?; diff --git a/vendor/gimli/tests/convert_self.rs b/vendor/gimli/tests/convert_self.rs index ec8b592d3..7c069ebd6 100644 --- a/vendor/gimli/tests/convert_self.rs +++ b/vendor/gimli/tests/convert_self.rs @@ -146,7 +146,7 @@ fn test_convert_eh_frame() { .write_eh_frame(&mut write_eh_frame) .expect("Should write eh_frame information"); let eh_frame = write_eh_frame.slice(); - assert_eq!(eh_frame.len(), 147152); + assert_eq!(eh_frame.len(), 147144); // Convert new section let mut eh_frame = read::EhFrame::new(&eh_frame, LittleEndian); -- cgit v1.2.3