diff --git a/Cargo.lock b/Cargo.lock index 73316c1..5952679 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,15 +4,15 @@ version = 4 [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -75,15 +75,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.97" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "clap" @@ -133,9 +133,9 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -146,44 +146,45 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" -[[package]] -name = "fallible-iterator" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" - [[package]] name = "flate2" -version = "1.1.0" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "foldhash" -version = "0.1.5" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "gimli" -version = "0.31.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "0bf7f043f89559805f8c7cacc432749b2fa0d0a0a9ee46ce47164ed5ba7f126c" dependencies = [ - "fallible-iterator", + "fnv", + "hashbrown", "indexmap", "stable_deref_trait", ] [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "allocator-api2", "equivalent", @@ -198,9 +199,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indexmap" -version = "2.8.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", "hashbrown", @@ -220,64 +221,64 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.171" +version = "0.2.182" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" [[package]] name = "log" -version = "0.4.27" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] name = "memchr" -version = "2.7.4" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "memmap2" -version = "0.5.10" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" dependencies = [ "libc", ] [[package]] name = "miniz_oxide" -version = "0.8.5" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "overload", - "winapi", + "windows-sys", ] [[package]] name = "object" -version = "0.36.7" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "271638cd5fa9cca89c4c304675ca658efc4e64a66c716b7cfe1afb4b9611dbbc" dependencies = [ "crc32fast", "flate2", @@ -289,9 +290,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.1" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "once_cell_polyfill" @@ -299,12 +300,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "pin-project-lite" version = "0.2.16" @@ -313,71 +308,44 @@ checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "ruzstd" -version = "0.7.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad02996bfc73da3e301efe90b1837be9ed8f4a462b6ed410aa35d00381de89f" +checksum = "e5ff0cc5e135c8870a775d3320910cd9b564ec036b4dc0b8741629020be63f01" dependencies = [ "twox-hash", ] @@ -392,22 +360,22 @@ dependencies = [ ] [[package]] -name = "smallvec" -version = "1.14.0" +name = "simd-adler32" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" [[package]] -name = "stable_deref_trait" -version = "1.2.0" +name = "smallvec" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] -name = "static_assertions" -version = "1.1.0" +name = "stable_deref_trait" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "strsim" @@ -417,9 +385,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.100" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -428,18 +396,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.69" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.69" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -448,7 +416,7 @@ dependencies = [ [[package]] name = "thorin-dwp" -version = "0.9.0" +version = "0.10.0" dependencies = [ "gimli", "hashbrown", @@ -458,7 +426,7 @@ dependencies = [ [[package]] name = "thorin-dwp-bin" -version = "0.9.0" +version = "0.10.0" dependencies = [ "anyhow", "clap", @@ -474,19 +442,18 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -495,9 +462,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", @@ -506,25 +473,14 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", ] -[[package]] -name = "tracing-log" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - [[package]] name = "tracing-log" version = "0.2.0" @@ -538,43 +494,39 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", "tracing", "tracing-core", - "tracing-log 0.2.0", + "tracing-log", ] [[package]] name = "tracing-tree" -version = "0.2.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ec6adcab41b1391b08a308cc6302b79f8095d1673f6947c2dc65ffb028b0b2d" +checksum = "ac87aa03b6a4d5a7e4810d1a80c19601dbe0f8a837e9177f23af721c7ba7beec" dependencies = [ "nu-ansi-term", "tracing-core", - "tracing-log 0.1.4", + "tracing-log", "tracing-subscriber", ] [[package]] name = "twox-hash" -version = "1.6.3" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "static_assertions", -] +checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" [[package]] name = "typed-arena" @@ -584,9 +536,9 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "utf8parse" @@ -600,28 +552,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" -[[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" - [[package]] name = "windows-link" version = "0.2.1" diff --git a/README.md b/README.md index 56e5130..bf82655 100644 --- a/README.md +++ b/README.md @@ -80,8 +80,8 @@ You could also call this project rust-dwp, if you'd prefer that. #### Author and acknowledgements -thorin is authored by David Wood of Huawei -Technologies Research & Development (UK) Ltd. thorin is maintained by the +thorin is authored by David Wood. +thorin is maintained by the Rust Compiler Team. diff --git a/tests/invalid-cu-header-length-type.s b/tests/invalid-cu-header-length-type.s index 7d85af5..c33e28c 100644 --- a/tests/invalid-cu-header-length-type.s +++ b/tests/invalid-cu-header-length-type.s @@ -4,7 +4,7 @@ # CHECK: Error: Failed to add `{{.*}}/invalid-cu-header-length-type.s.tmp.dwo` to DWARF package # CHECK: 0: Failed to parse unit header -# CHECK: 1: Hit the end of input before it was expected +# CHECK: 1: unexpected end of input .section .debug_info.dwo,"e",@progbits .short 0 # Length of Unit diff --git a/tests/invalid-cu-header-length.s b/tests/invalid-cu-header-length.s index 6ceae81..e43c084 100644 --- a/tests/invalid-cu-header-length.s +++ b/tests/invalid-cu-header-length.s @@ -4,7 +4,7 @@ # CHECK: Error: Failed to add `{{.*}}/invalid-cu-header-length.s.tmp.dwo` to DWARF package # CHECK: 0: Failed to parse unit header -# CHECK: 1: Hit the end of input before it was expected +# CHECK: 1: unexpected end of input .section .debug_info.dwo,"e",@progbits .long 16 # Length of Unit diff --git a/tests/invalid-cu-header-version.s b/tests/invalid-cu-header-version.s index aebea7f..bf388f7 100644 --- a/tests/invalid-cu-header-version.s +++ b/tests/invalid-cu-header-version.s @@ -4,7 +4,7 @@ # CHECK: Error: Failed to add `{{.*}}/invalid-cu-header-version.s.tmp.dwo` to DWARF package # CHECK: 0: Failed to parse unit header -# CHECK: 1: Hit the end of input before it was expected +# CHECK: 1: unexpected end of input .section .debug_info.dwo,"e",@progbits .long 0 # Length of Unit diff --git a/tests/invalid-cu-index.test b/tests/invalid-cu-index.test index 80c3a27..53617f2 100644 --- a/tests/invalid-cu-index.test +++ b/tests/invalid-cu-index.test @@ -2,4 +2,4 @@ RUN: not thorin %p/inputs/invalid-cu-index.dwp -o %t 2>&1 | FileCheck %s CHECK: Error: Failed to add `{{.*}}/invalid-cu-index.dwp` to DWARF package CHECK: 0: Failed to parse `.debug_cu_index` index section -CHECK: 1: Hit the end of input before it was expected +CHECK: 1: unexpected end of input diff --git a/tests/invalid-string-form.test b/tests/invalid-string-form.test index 18e85de..9f81acc 100644 --- a/tests/invalid-string-form.test +++ b/tests/invalid-string-form.test @@ -1,5 +1,4 @@ RUN: not thorin %p/inputs/invalid-string-form.dwo -o %t 2>&1 | FileCheck %s CHECK: Error: Failed to add `{{.*}}/invalid-string-form.dwo` to DWARF package -CHECK: 0: Failed to parse unit attribute -CHECK: 1: Found an unknown `DW_FORM_*` type +CHECK: unknown attribute form: 0x1e02 diff --git a/tests/invalid-tu-header-length.s b/tests/invalid-tu-header-length.s index c4546f2..a124785 100644 --- a/tests/invalid-tu-header-length.s +++ b/tests/invalid-tu-header-length.s @@ -4,7 +4,7 @@ # CHECK: Error: Failed to add `{{.*}}/invalid-tu-header-length.s.tmp.dwo` to DWARF package # CHECK: 0: Failed to parse unit header -# CHECK: 1: Hit the end of input before it was expected +# CHECK: 1: unexpected end of input .section .debug_info.dwo,"e",@progbits .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit diff --git a/tests/missing-tu-index.test b/tests/missing-tu-index.test index 4cdc788..8d56a43 100644 --- a/tests/missing-tu-index.test +++ b/tests/missing-tu-index.test @@ -3,7 +3,7 @@ # CHECK: Error: Failed to add `{{.*}}/missing-tu-index.test.tmp.dwp` to DWARF package # CHECK: 0: Failed to parse `.debug_tu_index` index section -# CHECK: 1: Hit the end of input before it was expected +# CHECK: 1: unexpected end of input .section .debug_abbrev.dwo, "e", @progbits .LAbbrevBegin: diff --git a/tests/multiple-debug-info-sections-in-dwp.s b/tests/multiple-debug-info-sections-in-dwp.s index d638db7..bfb1df0 100644 --- a/tests/multiple-debug-info-sections-in-dwp.s +++ b/tests/multiple-debug-info-sections-in-dwp.s @@ -3,7 +3,7 @@ # CHECK: Error: Failed to add `{{.*}}/multiple-debug-info-sections-in-dwp.s.tmp.dwp` to DWARF package # CHECK: 0: Failed to parse `.debug_cu_index` index section -# CHECK: 1: Hit the end of input before it was expected +# CHECK: 1: unexpected end of input .section .debug_info.dwo,"G",@progbits,0xFDFDFDFD,comdat .long .Ldebug_info_dwo_end1-.Ldebug_info_dwo_start1 # Length of Unit diff --git a/tests/no-cu-found.s b/tests/no-cu-found.s index f54c49e..a8709fe 100644 --- a/tests/no-cu-found.s +++ b/tests/no-cu-found.s @@ -4,7 +4,7 @@ # CHECK: Error: Failed to add `{{.*}}/no-cu-found.s.tmp.dwo` to DWARF package # CHECK: 0: Failed to parse unit header -# CHECK: 1: The `DW_UT_*` value for this unit is not supported yet +# CHECK: 1: unknown unit type: 0xc .section .debug_info.dwo,"e",@progbits .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit diff --git a/tests/wrong-unit-type-info-v4.s b/tests/wrong-unit-type-info-v4.s index 891aa98..3df8a01 100644 --- a/tests/wrong-unit-type-info-v4.s +++ b/tests/wrong-unit-type-info-v4.s @@ -3,7 +3,7 @@ # CHECK: Error: Failed to add `{{.*}}/wrong-unit-type-info-v4.s.tmp.dwp` to DWARF package # CHECK: 0: Failed to parse unit -# CHECK: 1: Hit the end of input before it was expected +# CHECK: 1: unexpected end of input .section .debug_info.dwo,"e",@progbits .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit diff --git a/thorin-bin/Cargo.toml b/thorin-bin/Cargo.toml index ddbb219..7bd64d8 100644 --- a/thorin-bin/Cargo.toml +++ b/thorin-bin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thorin-dwp-bin" -authors = [ "David Wood " ] +authors = [ "David Wood " ] categories = ["development-tools::debugging", "command-line-utilities"] description = "Merge DWARF objects and packages into DWARF packages" homepage = "https://github.com/rust-lang/thorin" @@ -8,23 +8,23 @@ keywords = ["dwarf", "split-dwarf", "dwarf-package", "dwarf-object", "dwp"] license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/rust-lang/thorin" -version = "0.9.0" +version = "0.10.0" edition = "2021" [dependencies] -thorin-dwp = { version = "0.9.0", path = "../thorin" } +thorin-dwp = { version = "0.10.0", path = "../thorin" } -anyhow = "1.0.51" -memmap2 = "0.5.0" -thiserror = "1.0.30" -tracing = "0.1.29" -tracing-subscriber = { version = "0.3.18", features = [ "env-filter" ] } -tracing-tree = "0.2.3" -typed-arena = "2.0.1" +anyhow = "1.0.102" clap = { version = "4.5.60", features = ["derive"] } +memmap2 = "0.9.10" +thiserror = "2.0.18" +tracing = "0.1.44" +tracing-subscriber = { version = "0.3.22", features = [ "env-filter" ] } +tracing-tree = "0.4.1" +typed-arena = "2.0.2" [dependencies.object] -version = "0.36.0" +version = "0.38.0" default-features = false features = [ "archive", "read", "write", "compression" ] diff --git a/thorin-bin/README.md b/thorin-bin/README.md index 358faf0..fba79b6 100644 --- a/thorin-bin/README.md +++ b/thorin-bin/README.md @@ -16,7 +16,7 @@ objects (including DWARF objects in archive files, such as Rust rlibs)! Install ```shell-session $ cargo install thorin-dwp-bin $ thorin --help -thorin 0.9.0 +thorin 0.10.0 merge dwarf objects into dwarf packages USAGE: @@ -61,8 +61,8 @@ You could also call this project rust-dwp, if you'd prefer that. #### Author and acknowledgements -thorin is authored by David Wood of Huawei -Technologies Research & Development (UK) Ltd. thorin is maintained by the +thorin is authored by David Wood. +thorin is maintained by the Rust Compiler Team. diff --git a/thorin/Cargo.toml b/thorin/Cargo.toml index c6da741..41a64a9 100644 --- a/thorin/Cargo.toml +++ b/thorin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thorin-dwp" -authors = [ "David Wood " ] +authors = [ "David Wood " ] categories = ["development-tools::debugging"] description = "Library for building DWARF packages from input DWARF objects and packages" homepage = "https://docs.rs/thorin-dwp" @@ -8,22 +8,22 @@ keywords = ["dwarf", "split-dwarf", "dwarf-package", "dwarf-object", "dwp"] license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/rust-lang/thorin" -version = "0.9.0" +version = "0.10.0" edition = "2021" [dependencies] -tracing = "0.1.29" -hashbrown = "0.15.0" +tracing = "0.1.44" +hashbrown = "0.16.0" [dependencies.gimli] -version = "0.31.0" +version = "0.33.0" default-features = false # `gimli/std` pulls in `fallible-iterator` which we don't use, but can't opt out of, because of # cargo#8832. features = [ "read", "write", "std" ] [dependencies.object] -version = "0.36.0" +version = "0.38.0" default-features = false features = [ "archive", "read", "write", "compression" ] diff --git a/thorin/README.md b/thorin/README.md index 2b0862a..ac39a40 100644 --- a/thorin/README.md +++ b/thorin/README.md @@ -12,7 +12,7 @@ cross-crate Split DWARF packaging in `rustc`. To use `thorin` in your own project, add it to your `Cargo.toml`: ```toml -thorin-dwp = "0.9.0" +thorin-dwp = "0.10.0" ``` See the [`thorin-bin`](../thorin-bin/README.md) crate for an example of using `thorin`'s library @@ -43,8 +43,8 @@ You could also call this project rust-dwp, if you'd prefer that. #### Author and acknowledgements -thorin is authored by David Wood of Huawei -Technologies Research & Development (UK) Ltd. thorin is maintained by the +thorin is authored by David Wood. +thorin is maintained by the Rust Compiler Team. diff --git a/thorin/src/error.rs b/thorin/src/error.rs index e49722a..f4a31f0 100644 --- a/thorin/src/error.rs +++ b/thorin/src/error.rs @@ -64,8 +64,6 @@ pub enum Error { MissingRequiredSection(&'static str), /// Failed to parse unit abbreviations. ParseUnitAbbreviations(gimli::read::Error), - /// Failed to parse unit attribute. - ParseUnitAttribute(gimli::read::Error), /// Failed to parse unit header. ParseUnitHeader(gimli::read::Error), /// Failed to parse unit. @@ -137,7 +135,6 @@ impl StdError for Error { Error::TopLevelDieNotUnit => None, Error::MissingRequiredSection(_) => None, Error::ParseUnitAbbreviations(source) => Some(source.as_dyn_error()), - Error::ParseUnitAttribute(source) => Some(source.as_dyn_error()), Error::ParseUnitHeader(source) => Some(source.as_dyn_error()), Error::ParseUnit(source) => Some(source.as_dyn_error()), Error::IncompatibleIndexVersion(_, _, _) => None, @@ -208,7 +205,6 @@ impl fmt::Display for Error { write!(f, "Input object missing required section `{}`", section) } Error::ParseUnitAbbreviations(_) => write!(f, "Failed to parse unit abbreviations"), - Error::ParseUnitAttribute(_) => write!(f, "Failed to parse unit attribute"), Error::ParseUnitHeader(_) => write!(f, "Failed to parse unit header"), Error::ParseUnit(_) => write!(f, "Failed to parse unit"), Error::IncompatibleIndexVersion(section, format, actual) => { diff --git a/thorin/src/lib.rs b/thorin/src/lib.rs index dcd6b4e..3e6f650 100644 --- a/thorin/src/lib.rs +++ b/thorin/src/lib.rs @@ -186,10 +186,10 @@ where cursor.next_dfs()?; let root = cursor.current().expect("unit w/out root debugging information entry"); - let dwo_name = if let Some(val) = root.attr_value(gimli::DW_AT_dwo_name)? { + let dwo_name = if let Some(val) = root.attr_value(gimli::DW_AT_dwo_name) { // DWARF 5 val - } else if let Some(val) = root.attr_value(gimli::DW_AT_GNU_dwo_name)? { + } else if let Some(val) = root.attr_value(gimli::DW_AT_GNU_dwo_name) { // GNU Extension val } else { diff --git a/thorin/src/package.rs b/thorin/src/package.rs index 9635100..1ee1ff8 100644 --- a/thorin/src/package.rs +++ b/thorin/src/package.rs @@ -1,6 +1,6 @@ use std::{collections::HashSet, fmt}; -use gimli::{Encoding, RunTimeEndian, UnitHeader, UnitIndex, UnitSectionOffset, UnitType}; +use gimli::{Encoding, RunTimeEndian, UnitHeader, UnitIndex, UnitType}; use object::{ write::{Object as WritableObject, SectionId}, BinaryFormat, Object, ObjectSection, SectionKind, @@ -113,8 +113,7 @@ pub(crate) fn dwo_identifier_of_unit( gimli::DW_TAG_compile_unit | gimli::DW_TAG_type_unit => (), _ => return Err(Error::TopLevelDieNotUnit), } - let mut attrs = root.attrs(); - while let Some(attr) = attrs.next().map_err(Error::ParseUnitAttribute)? { + for attr in root.attrs() { match (attr.name(), attr.value()) { (gimli::constants::DW_AT_GNU_dwo_id, gimli::AttributeValue::DwoId(dwo_id)) => { return Ok(Some(DwarfObject::Compilation(dwo_id.into()))) @@ -615,15 +614,11 @@ impl<'file> InProgressDwarfPackage<'file> { .length_including_self() .try_into() .expect("unit header length larger than u64"); - let offset = match header.offset() { - UnitSectionOffset::DebugInfoOffset(offset) => offset.0, - UnitSectionOffset::DebugTypesOffset(offset) => offset.0, - }; let data = section .compressed_data_range( sess, - offset.try_into().expect("offset larger than u64"), + header.offset().0.try_into().expect("offset larger than u64"), size, ) .map_err(Error::DecompressData)?