summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-04-21 12:25:36 +0200
committerJustus Winter <justus@sequoia-pgp.org>2021-04-26 13:13:25 +0200
commit522e5811c2aa0dc741807cc42d5a3eac2bf63413 (patch)
tree82471abb99a3cd090ecf8922e08bcb019e32d231 /openpgp/src/parse.rs
parent0c349869786194214aca9ccb5f66640b28163f79 (diff)
openpgp: Improve tracing.
Diffstat (limited to 'openpgp/src/parse.rs')
-rw-r--r--openpgp/src/parse.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs
index a410632b..76e6ab66 100644
--- a/openpgp/src/parse.rs
+++ b/openpgp/src/parse.rs
@@ -1519,9 +1519,15 @@ impl SubpacketArea {
-> Result<Self>
where T: 'a + BufferedReader<Cookie>,
{
+ let indent = php.recursion_depth();
+ tracer!(TRACE, "SubpacketArea::parse", indent);
+
let mut packets = Vec::new();
while limit > 0 {
- let p = Subpacket::parse(php, limit, hash_algo)?;
+ let r = Subpacket::parse(php, limit, hash_algo);
+ t!("Subpacket::parse(_, {}, {:?}) => {:?}",
+ limit, hash_algo, r);
+ let p = r?;
assert!(limit >= p.length.len() + p.length.serialized_len());
limit -= p.length.len() + p.length.serialized_len();
packets.push(p);