From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 0D6EB3858D29 for ; Tue, 12 Jan 2021 11:45:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0D6EB3858D29 Received: by mail-wm1-x32e.google.com with SMTP id 3so1821819wmg.4 for ; Tue, 12 Jan 2021 03:45:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=I9eF+62VD9T2fRlg83kymsm59Leq5RFFSf0uXin13Z8=; b=DZbqmWw8QKupNaRDhEPWd92Hu4C5CwJYDS+lmFVTDoCTfWxiociBhXIAY6uZOH2wGh LeL+mSWeGzHpVnZQctM5KhTAD2NFKNFwSOx0kHnLf61wrOwwjROjJUQadl2+RKmYtMra r6/1/0ig65bB//dzBQ8Cop5he/meLmiIyuGRr+oMj6bHLCoM3lGSJq+Pxd6Z+PVjpJ7y sQOnnjBO5Xxq0RTCAdgwvCk+XpfOTjga5sNwU80Pd2hP4rs7LQDXt1cqSOTeoaTefvyB mV6Zvq4KPy5jkis8zMcDLcp21N6XIDW/mNgfYEpPE6Ar1Xd9+AybE15lb66vuwL1SojI DFFQ== X-Gm-Message-State: AOAM532plVQRx5Wok3rSNpA7p7TB/qVyRGU8pjwqjQ9xWNyKP8y1VY2v OTD9MvtS7k5V50HOkb2djoxQHn/ggyFmA9fAsMHGgGuB X-Google-Smtp-Source: ABdhPJxnBqB4RKgWYPgGzRrmFks2FqweigxJ1brJm6NdOO/F00davOuA+0cDiojSL7OeufXZtTz8Hq1P9qUX+ifbXfE= X-Received: by 2002:a1c:9d85:: with SMTP id g127mr3236232wme.118.1610451920015; Tue, 12 Jan 2021 03:45:20 -0800 (PST) MIME-Version: 1.0 From: Kim Kuparinen Date: Tue, 12 Jan 2021 13:45:09 +0200 Message-ID: Subject: skip -rfu, have to escape backlashes even inside quotes To: gdb@sourceware.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 11:45:22 -0000 Hi, first time using a mailing list, sorry if I mess something up. I noticed that when trying to use skip -rfu REGEX, I had to escape backslashes even if I quoted the regex. So skip -rfu '\(' errors out with regexp: umatched ( or \( I dug around a bit and found out that the issue seems to be in libiberty/argv.c, in the function buildargv(). The function seems to always strip backslashes, because in the if/else if/else chain, the backslash character is checked(and as such, removed) before squote or dquote. I got gdb to do what I wanted to by moving the check for a backslash behind the checks for squote and dquote. That being said, is this intended behaviour? Seems sort of counter intuitive.