From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12720 invoked by alias); 3 Jun 2009 01:03:40 -0000 Received: (qmail 12327 invoked by uid 22791); 3 Jun 2009 01:03:35 -0000 X-SWARE-Spam-Status: No, hits=1.0 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_24,J_CHICKENPOX_44,J_CHICKENPOX_45,J_CHICKENPOX_92,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Jun 2009 01:03:24 +0000 Received: from zps76.corp.google.com (zps76.corp.google.com [172.25.146.76]) by smtp-out.google.com with ESMTP id n5313L8W027538 for ; Tue, 2 Jun 2009 18:03:22 -0700 Received: from yw-out-1718.google.com (ywr5.prod.google.com [10.192.18.5]) by zps76.corp.google.com with ESMTP id n5313KDU008928 for ; Tue, 2 Jun 2009 18:03:20 -0700 Received: by yw-out-1718.google.com with SMTP id 5so5135773ywr.70 for ; Tue, 02 Jun 2009 18:03:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.91.19 with SMTP id o19mr512560anb.48.1243990999959; Tue, 02 Jun 2009 18:03:19 -0700 (PDT) In-Reply-To: References: <20090422041933.GA32221@caradoc.them.org> Date: Wed, 03 Jun 2009 01:03:00 -0000 Message-ID: Subject: Re: [patch] Add discriminators to DWARF line table From: Cary Coutant To: Diego Novillo Cc: gcc-patches Content-Type: multipart/mixed; boundary=0016e6435952a80879046b67392d X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00233.txt.bz2 --0016e6435952a80879046b67392d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 2521 >>> + =A0from =3D expand_location (locus1); >>> + =A0to =3D expand_location (locus2); >>> + =A0return (from.file =3D=3D to.file && from.line =3D=3D to.line); >> >> Are file name strings canonicalized by the location_t code? =A0I >> assume they are, but I'm not sure. =A0If not, you may need a better >> matching code here. > > I checked this experimentally, but I'll delve deeper into the code to mak= e sure. It looks like the string pointers may not be the same if there's an intervening #line directive. I've changed this to do a quick pointer comparison, then fall back to a strcmp: if (from.line !=3D to.line) return false; if (from.file =3D=3D to.file) return true; return strcmp (from.file, to.file); New patch is attached. I've done an overdue svn update on my working copy, so I'll bootstrap and test again. Assuming that works, is this OK? -cary * basic-block.h (struct basic_block_def): Add discriminator field. * dbxout.c (dbxout_source_line): Add new parameter. Change all callers. * debug.c (do_nothing_debug_hooks): Add additional entry. (debug_nothing_int_charstar_int): New function. * debug.h (struct gcc_debug_hooks): Add parameter to source_line hook. (debug_nothing_int_charstar_int): New declaration. * dwarf2out.c (dwarf2out_source_line): Add new parameter. Write discriminator value in .loc directive. * final.c (last_discriminator): New variable. (discriminator): New variable. (final_start_function): Initialize above variables, pass current discriminator to debug hook. (notice_source_line): Check for discriminator change. * gimple-pretty-print.c (dump_bb_header): Print discriminator value. * sdbout.c (sdbout_source_line): New parameter. * tree-cfg.c (struct locus_discrim_map): New structure type. (discriminator_per_locus): New hash table. (build_gimple_cfg): Allocate and free discriminator hash table. (make_edges): Call assign_discriminator. (locus_map_hash): New function. (locus_map_eq): New function. (next_discriminator_for_locus): New function. (same_line_p): New function. (assign_discriminator): New function. (make_cond_expr_edges): Call assign_discriminator. (make_gimple_switch_edges): Likewise. (first_non_label_stmt): New function. * vmsdbgout.c (vmsdbgout_source_line): Add new parameter. Change all callers. * xcoffout.c (xcoffout_source_line): Add new parameter. * configure.ac (gcc_cv_as_discriminator): New configury check for gas support for discriminator. * configure: Regenerate. * config.in: Regenerate. --0016e6435952a80879046b67392d Content-Type: text/plain; charset=US-ASCII; name="gcc-discrim-patch-3.txt" Content-Disposition: attachment; filename="gcc-discrim-patch-3.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fvhc1t610 Content-length: 26560 SW5kZXg6IGJhc2ljLWJsb2NrLmgKPT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQot LS0gYmFzaWMtYmxvY2suaAkocmV2aXNpb24gMTQ4MTEwKQorKysgYmFzaWMt YmxvY2suaAkod29ya2luZyBjb3B5KQpAQCAtMjQ5LDYgKzI0OSw5IEBAIHN0 cnVjdCBHVFkoKGNoYWluX25leHQgKCIlaC5uZXh0X2JiIiksIGMKICAgLyog RXhwZWN0ZWQgZnJlcXVlbmN5LiAgTm9ybWFsaXplZCB0byBiZSBpbiByYW5n ZSAwIHRvIEJCX0ZSRVFfTUFYLiAgKi8KICAgaW50IGZyZXF1ZW5jeTsKIAor ICAvKiBUaGUgZGlzY3JpbWluYXRvciBmb3IgdGhpcyBibG9jay4gICovCisg IGludCBkaXNjcmltaW5hdG9yOworCiAgIC8qIFZhcmlvdXMgZmxhZ3MuICBT ZWUgQkJfKiBiZWxvdy4gICovCiAgIGludCBmbGFnczsKIH07CkluZGV4OiBj b25maWd1cmUuYWMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gY29uZmln dXJlLmFjCShyZXZpc2lvbiAxNDgxMTApCisrKyBjb25maWd1cmUuYWMJKHdv cmtpbmcgY29weSkKQEAgLTI0MDgsNiArMjQwOCwxNSBAQCBBQ19ERUZJTkVf VU5RVU9URUQoSEFWRV9DT01EQVRfR1JPVVAsCiAgIFtgaWYgdGVzdCAkZ2Nj X2N2X2FzX2NvbWRhdF9ncm91cCA9IHllcyB8fCB0ZXN0ICRnY2NfY3ZfYXNf Y29tZGF0X2dyb3VwX3BlcmNlbnQgPSB5ZXM7IHRoZW4gZWNobyAxOyBlbHNl IGVjaG8gMDsgZmlgXSwKIFtEZWZpbmUgMC8xIGlmIHlvdXIgYXN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UVFJJQlVURV9VTlVTRUQpCiB7CiAgIGRieG91dF9zb3VyY2Vf ZmlsZSAoZmlsZW5hbWUpOwogCkluZGV4OiBkZWJ1Zy5jCj09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT0KLS0tIGRlYnVnLmMJKHJldmlzaW9uIDE0ODExMCkKKysr IGRlYnVnLmMJKHdvcmtpbmcgY29weSkKQEAgLTM0LDcgKzM0LDcgQEAgY29u c3Qgc3RydWN0IGdjY19kZWJ1Z19ob29rcyBkb19ub3RoaW5nXwogICBkZWJ1 Z19ub3RoaW5nX2ludF9pbnQsCSAgICAgICAgIC8qIGJlZ2luX2Jsb2NrICov CiAgIGRlYnVnX25vdGhpbmdfaW50X2ludCwJICAgICAgICAgLyogZW5kX2Js b2NrICovCiAgIGRlYnVnX3RydWVfY29uc3RfdHJlZSwJICAgICAgICAgLyog aWdub3JlX2Jsb2NrICovCi0gIGRlYnVnX25vdGhpbmdfaW50X2NoYXJzdGFy LAkgICAgICAgICAvKiBzb3VyY2VfbGluZSAqLworICBkZWJ1Z19ub3RoaW5n X2ludF9jaGFyc3Rhcl9pbnQsCSAvKiBzb3VyY2VfbGluZSAqLwogICBkZWJ1 Z19ub3RoaW5nX2ludF9jaGFyc3RhciwJICAgICAgICAgLyogYmVnaW5fcHJv bG9ndWUgKi8KICAgZGVidWdfbm90aGluZ19pbnRfY2hhcnN0YXIsCSAgICAg ICAgIC8qIGVuZF9wcm9sb2d1ZSAqLwogICBkZWJ1Z19ub3RoaW5nX2ludF9j aGFyc3RhciwJICAgICAgICAgLyogZW5kX2VwaWxvZ3VlICovCkBAIC0xMDQs NiArMTA0LDEzIEBAIGRlYnVnX25vdGhpbmdfaW50X2NoYXJzdGFyICh1bnNp Z25lZCBpbnQKIH0KIAogdm9pZAorZGVidWdfbm90aGluZ19pbnRfY2hhcnN0 YXJfaW50ICh1bnNpZ25lZCBpbnQgbGluZSBBVFRSSUJVVEVfVU5VU0VELAor CQkJICAgICAgICBjb25zdCBjaGFyICp0ZXh0IEFUVFJJQlVURV9VTlVTRUQs CisJCQkgICAgICAgIGludCBkaXNjcmltaW5hdG9yIEFUVFJJQlVURV9VTlVT RUQpCit7Cit9CisKK3ZvaWQKIGRlYnVnX25vdGhpbmdfaW50ICh1bnNpZ25l ZCBpbnQgbGluZSBBVFRSSUJVVEVfVU5VU0VEKQogewogfQpJbmRleDogZGVi dWcuaAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBkZWJ1Zy5oCShyZXZp c2lvbiAxNDgxMTApCisrKyBkZWJ1Zy5oCSh3b3JraW5nIGNvcHkpCkBAIC01 OSw4ICs1OSw5IEBAIHN0cnVjdCBnY2NfZGVidWdfaG9va3MKICAgICAgdGhv dWdoIHRoZSBCTE9DSyBpbmZvcm1hdGlvbiBpcyBtZXNzZWQgdXAuICBEZWZh dWx0cyB0byB0cnVlLiAgKi8KICAgYm9vbCAoKiBpZ25vcmVfYmxvY2spIChj b25zdF90cmVlKTsKIAotICAvKiBSZWNvcmQgYSBzb3VyY2UgZmlsZSBsb2Nh dGlvbiBhdCAoRklMRSwgTElORSkuICAqLwotICB2b2lkICgqIHNvdXJjZV9s aW5lKSAodW5zaWduZWQgaW50IGxpbmUsIGNvbnN0IGNoYXIgKmZpbGUpOwor ICAvKiBSZWNvcmQgYSBzb3VyY2UgZmlsZSBsb2NhdGlvbiBhdCAoRklMRSwg TElORSwgRElTQ1JJTUlOQVRPUikuICAqLworICB2b2lkICgqIHNvdXJjZV9s aW5lKSAodW5zaWduZWQgaW50IGxpbmUsIGNvbnN0IGNoYXIgKmZpbGUsCisg ICAgICAgICAgICAgICAgICAgICAgICBpbnQgZGlzY3JpbWluYXRvcik7CiAK ICAgLyogQ2FsbGVkIGF0IHN0YXJ0IG9mIHByb2xvZ3VlIGNvZGUuICBMSU5F IGlzIHRoZSBma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lICE9IDApCkBAIC0xNjIy NCw3ICsxNjIyNSwxMiBAQCBkd2FyZjJvdXRfc291cmNlX2xpbmUgKHVuc2ln bmVkIGludCBsaW5lCiAgICAgICBpZiAoRFdBUkYyX0FTTV9MSU5FX0RFQlVH X0lORk8pCiAJewogCSAgLyogRW1pdCB0aGUgLmxvYyBkaXJlY3RpdmUgdW5k ZXJzdG9vZCBieSBHTlUgYXMuICAqLwotCSAgZnByaW50ZiAoYXNtX291dF9m aWxlLCAiXHQubG9jICVkICVkIDBcbiIsIGZpbGVfbnVtLCBsaW5lKTsKKwkg IGZwcmludGYgKGFzbV9vdXRfZmlsZSwgIlx0LmxvYyAlZCAlZCAwIiwgZmls ZV9udW0sIGxpbmUpOworI2lmZGVmIEhBVkVfR0FTX0RJU0NSSU1JTkFUT1IK KwkgIGlmIChkaXNjcmltaW5hdG9yICE9IDApCisJICAgIGZwcmludGYgKGFz bV9vdXRfZmlsZSwgIiBkaXNjcmltaW5hdG9yICVkIiwgZGlzY3JpbWluYXRv cik7CisjZW5kaWYgLyogSEFWRV9HQVNfRElTQ1JJTUlOQVRPUiAqLworCSAg ZnB1dGMgKCdcbicsIGFzbV9vdXRfZmlsZSk7CiAKIAkgIC8qIEluZGljYXRl IHRoYXQgbGluZSBudW1iZXIgaW5mbyBleGlzdHMuICAqLwogCSAgbGluZV9p bmZvX3RhYmxlX2luX3VzZSsrOwpJbmRleDogZmluYWwuYwo9PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09Ci0tLSBmaW5hbC5jCShyZXZpc2lvbiAxNDgxMTApCisr KyBmaW5hbC5jCSh3b3JraW5nIGNvcHkpCkBAIC0xMzAsNiArMTMwLDEyIEBA IHJ0eCBjdXJyZW50X291dHB1dF9pbnNuOwogLyogTGluZSBudW1iZXIgb2Yg bGFzdCBOT1RFLiAgKi8KIHN0YXRpYyBpbnQgbGFzdF9saW5lbnVtOwogCisv KiBMYXN0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yY2VfbGluZSAoaW5zbikpCiAJICB7Ci0JICAgICgqZGVi dWdfaG9va3MtPnNvdXJjZV9saW5lKSAobGFzdF9saW5lbnVtLCBsYXN0X2Zp bGVuYW1lKTsKKwkgICAgKCpkZWJ1Z19ob29rcy0+c291cmNlX2xpbmUpIChs YXN0X2xpbmVudW0sCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbGFzdF9maWxlbmFtZSwKKwkgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBsYXN0X2Rpc2NyaW1pbmF0b3IpOwogCSAgfQogCiAJaWYgKEdF VF9DT0RFIChib2R5KSA9PSBBU01fSU5QVVQpCkBAIC0yNzA5LDExICsyNzIw LDEzIEBAIG5vdGljZV9zb3VyY2VfbGluZSAocnR4IGluc24pCiAgIGlmIChm aWxlbmFtZQogICAgICAgJiYgKGZvcmNlX3NvdXJjZV9saW5lCiAJICB8fCBm aWxlbmFtZSAhPSBsYXN0X2ZpbGVuYW1lCi0JICB8fCBsYXN0X2xpbmVudW0g IT0gbGluZW51bSkpCisJICB8fCBsYXN0X2xpbmVudW0gIT0gbGluZW51bQor CSAgfHwgbGFzdF9kaXNjcmltaW5hdG9yICE9IGRpc2NyaW1pbmF0b3IpKQog ICAgIHsKICAgICAgIGZvcmNlX3NvdXJjZV9saW5lID0gZmFsc2U7CiAgICAg ICBsYXN0X2ZpbGVuYW1lID0gZmlsZW5hbWU7CiAgICAgICBsYXN0X2xpbmVu dW0gPSBsaW5lbnVtOworICAgICAgbGFzdF9kaXNjcmltaW5hdG9yID0gZGlz Y3JpbWluYXRvcjsKICAgICAgIGhpZ2hfYmxvY2tfbGluZW51bSA9IE1BWCAo bGFzdF9saW5lbnVtLCBoaWdoX2Jsb2NrX2xpbmVudW0pOwogICAgICAgaGln aF9mdW5jdGlvbl9saW5lbnVtID0gTUFYIChsYXN0X2xpbmVudW0sIGhpZ2hf ZnVuY3Rpb25fbGluZW51bSk7CiAgICAgICByZXR1cm4gdHJ1ZTsKSW5kZXg6 IGdpbXBsZS1wcmV0dHktcHJpbnQuYwo9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 Ci0tLSBnaW1wbGUtcHJldHR5LXByaW50LmMJKHJldmlzaW9uIDE0ODExMCkK KysrIGdpbXBsZS1wcmV0dHktcHJpbnQuYwkod29ya2luZyBjb3B5KQpAQCAt MTU1OCw2ICsxNTU4LDEyIEBAIGR1bXBfYmJfaGVhZGVyIChwcmV0dHlfcHJp bnRlciAqYnVmZmVyLCAKIAkJcHBfZGVjaW1hbF9pbnQgKGJ1ZmZlciwgZ2V0 X2xpbmVubyAoZ3NpX3N0bXQgKGdzaSkpKTsKIAkJYnJlYWs7CiAJICAgICAg fQorCisgICAgICAgICAgaWYgKGJiLT5kaXNjcmltaW5hdG9yKQorICAgICAg ICAgICAgeworICAgICAgICAgICAgICBwcF9zdHJpbmcgKGJ1ZmZlciwgIiwg ZGlzY3JpbWluYXRvciAiKTsKKwkgICAgICBwcF9kZWNpbWFsX2ludCAoYnVm ZmVyLCBiYi0+ZGlzY3JpbWluYXRvcik7CisgICAgICAgICAgICB9CiAJfQog ICAgICAgbmV3bGluZV9hbmRfaW5kZW50IChidWZmZXIsIGluZGVudCk7CiAK SW5kZXg6IHNkYm91dC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHNk Ym91dC5jCShyZXZpc2lvbiAxNDgxMTApCisrKyBzZGJvdXQuYwkod29ya2lu ZyBjb3B5KQpAQCAtMTE3LDcgKzExNyw3IEBAIHN0YXRpYyB2b2lkIHNkYm91 dF9zdGFydF9zb3VyY2VfZmlsZQkodW4KIHN0YXRpYyB2b2lkIHNkYm91dF9l bmRfc291cmNlX2ZpbGUJKHVuc2lnbmVkIGludCk7CiBzdGF0aWMgdm9pZCBz ZGJvdXRfYmVnaW5fYmxvY2sJCSh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gbG9jdXM7CisgIGl0 ZW0uZGlzY3JpbWluYXRvciA9IDA7CisgIHNsb3QgPSAoc3RydWN0IGxvY3Vz X2Rpc2NyaW1fbWFwICoqKQorICAgICAgaHRhYl9maW5kX3Nsb3Rfd2l0aF9o YXNoIChkaXNjcmltaW5hdG9yX3Blcl9sb2N1cywgKHZvaWQgKikgJml0ZW0s CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChoYXNodmFsX3Qp IGxvY3VzLCBJTlNFUlQpOworICBnY2NfYXNzZXJ0IChzbG90KTsKKyAgaWYg KCpzbG90ID09IEhUQUJfRU1QVFlfRU5UUlkpCisgICAgeworICAgICAgKnNs b3QgPSBYTkVXIChzdHJ1Y3QgbG9jdXNfZGlzY3JpbV9tYXApOworICAgICAg Z2NjX2Fzc2VydCAoKnNsb3QpOworICAgICAgKCpzbG90KS0+bG9jdXMgPSBs b2N1czsKKyAgICAgICgqc2xvdCktPmRpc2NyaW1pbmF0b3IgPSAwOworICAg IH0KKyAgKCpzbG90KS0+ZGlzY3JpbWluYXRvcisrOworICByZXR1cm4gKCpz bG90KS0+ZGlzY3JpbWluYXRvcjsKK30KKworLyogUmV0dXJuIFRSVUUgaWYg TE9DVVMxIGFuZCBMT0NVUzIgcmVmZXIgdG8gdGhlIHNhbWUgc291cmNlIGxp bmUuICAqLworCitzdGF0aWMgYm9vbAorc2FtZV9saW5lX3AgKGxvY2F0aW9u X3QgbG9jdXMxLCBsb2NhdGlvbl90IGxvY3VzMikKK3sKKyAgZXhwYW5kZWRf bG9jYXRpb24gZnJvbSwgdG87CisKKyAgaWYgKGxvY3VzMSA9PSBsb2N1czIp CisgICAgcmV0dXJuIHRydWU7CisKKyAgZnJvbSA9IGV4cGFuZF9sb2NhdGlv biAobG9jdXMxKTsKKyAgdG8gPSBleHBhbmRfbG9jYXRpb24gKGxvY3VzMik7 CisKKyAgaWYgKGZyb20ubGluZSAhPSB0by5saW5lKQorICAgIHJldHVybiBm YWxzZTsKKyAgaWYg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mFtZSk7CisgICAgKCpkd2FyZjJfZGVidWdfaG9va3Muc291cmNlX2xpbmUp IChsaW5lLCBmaWxlbmFtZSwgZGlzY3JpbWluYXRvcik7CiAKICAgaWYgKGRl YnVnX2luZm9fbGV2ZWwgPj0gRElORk9fTEVWRUxfVEVSU0UpCiAgICAgewpJ bmRleDogeGNvZmZvdXQuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSB4 Y29mZm91dC5jCShyZXZpc2lvbiAxNDgxMTApCisrKyB4Y29mZm91dC5jCSh3 b3JraW5nIGNvcHkpCkBAIC0zMjEsNyArMzIxLDggQEAgeGNvZmZvdXRfc291 cmNlX2ZpbGUgKEZJTEUgKmZpbGUsIGNvbnN0IAogLyogT3V0cHV0IGEgbGlu ZSBudW1iZXIgc3ltYm9sIGVudHJ5IGZvciBsb2NhdGlvbiAoRklMRU5BTUUs IExJTkUpLiAgKi8KIAogdm9pZAoteGNvZmZvdXRfc291cmNlX2xpbmUgKHVu c2lnbmVkIGludCBsaW5lLCBjb25zdCBjaGFyICpmaWxlbmFtZSkKK3hjb2Zm b3V0X3NvdXJjZV9saW5lICh1bnNpZ25lZCBpbnQgbGluZSwgY29uc3QgY2hh ciAqZmlsZW5hbWUsCisgICAgICAgICAgICAgICAgICAgICAgaW50IGRpc2Ny aW1pbmF0b3IgQVRUUklCVVRFX1VOVVNFRCkKIHsKICAgYm9vbCBpbmxpbmVf cCA9IChzdHJjbXAgKHhjb2ZmX2N1cnJlbnRfZnVuY3Rpb25fZmlsZSwgZmls ZW5hbWUpICE9IDAKIAkJICAgfHwgKGludCkgbGluZSA8IHhjb2ZmX2JlZ2lu X2Z1bmN0aW9uX2xpbmUpOwo= --0016e6435952a80879046b67392d--