From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by sourceware.org (Postfix) with ESMTPS id 2C3623858C27 for ; Mon, 25 Jan 2021 00:07:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2C3623858C27 Received: by mail-io1-xd33.google.com with SMTP id n2so23181855iom.7 for ; Sun, 24 Jan 2021 16:07:01 -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=6ckmonAOx/vIUffjwnWmuHTWNyYOpRGU32hgVMcKcWE=; b=osnn83ka+VXmEFtXTQWE8843euP/4rtntqtiT+agpr4EFbH6ceH0aA0UtsvcQNKasv PmXxqLYYgVaCcKU46B6YV6uLDiRh7dzvhEeOqj7g2/mosDSxZzykzLwnl/PxI41KHgwH CtEJB1vRfOWyI3ze+wc0NAD2jJk/zEcMZSvBp1xO6hOKq+/svmfjBokgaiXTO/89ci8A jzPDoB7qenISJJZDHT+TXJNNQxpZ5RvEksBFY9MfSyJkX34SY53wJL6wpbyoz3ps8zGw kJgCqjmKxWzCw2kSsG9Vd7YzqQs3hOXJuCCbO6ahXYAGezS/V+d6xAURAXlSEjtibwRu SxHg== X-Gm-Message-State: AOAM530Zg5uJpZt226cWuCicxZ/yBQqp7UoOvdDL/hol1tiZ355DFSmy Mg6Y5hudxVeOIAobtBxUSvy0DlnLwWSUtTnHO3SeAPHF8c4= X-Google-Smtp-Source: ABdhPJxSeCqzNJdfk9wtLYtyBbliAcNdBVvlfIxYw9rvPKw+yqp78MhQspIXGgQ2k1w89qS1L6eZy0HYskS53rZdGPo= X-Received: by 2002:a05:6e02:1564:: with SMTP id k4mr168631ilu.282.1611533220417; Sun, 24 Jan 2021 16:07:00 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a6b:c88b:0:0:0:0:0 with HTTP; Sun, 24 Jan 2021 16:07:00 -0800 (PST) From: Peng Yu Date: Sun, 24 Jan 2021 18:07:00 -0600 Message-ID: Subject: Why gdb may not terminate in batch mode? To: gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, 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 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: Mon, 25 Jan 2021 00:07:02 -0000 Hi, I see that gdb sometimes hangs with --batch enabled. Does anybody know how to fix the problem? Thanks. $ cat main.c #include int main() { printf("Hello World!"); } $ cat > gdb_cmd.txt < This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. $ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple clang version 12.0.0 (clang-1200.0.32.28) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -- Regards, Peng