From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7268 invoked by alias); 6 Mar 2018 18:01:38 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 7232 invoked by uid 89); 6 Mar 2018 18:01:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=highly X-HELO: mail-wm0-f45.google.com Received: from mail-wm0-f45.google.com (HELO mail-wm0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Mar 2018 18:01:29 +0000 Received: by mail-wm0-f45.google.com with SMTP id s206so19139782wme.0 for ; Tue, 06 Mar 2018 10:01:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=zNt5JqOWRfUDlnp6lJVeq+sy83NdCj5LGbNFpdvyBCs=; b=ZLqmHGaTTsfnUhMWdCHLnBwWJ+Q15EZGQVbJmNgon0B7ZAjduhwv+7UK0XlCLID577 cCHbGx93Eg5nj4NKBc5766HN9cY/qovaPmf4DW0r8JL+HUWJOC/1FvEK8zgzetDLSMrL uqe4tdJRXrRvxEysMd7jkNf2GzxpM5c+Pqtp6jDtMJT8zF4sm5lszXJEo4PxbNHJG1LA wliDhW9p2BXz3wozCRSc0sOZjD5QCjcH8HSUhWptWpQgu8YXwH72bfYtB2J1KsSdTOTH +so5W74qBLv9bEwEJhkwVG/7v8vKvn6PlGsQAGsqD0cL6GJDe4iiYXVrRucOak0B+3ha /WbQ== X-Gm-Message-State: AElRT7Hc+n3rCPO+Br+g00xDgVS9OFGZYMpjmRpOod/wDjYxgy4rkHIW /cNTYoR9pR8Z1dlo/ur/muC+KFIqHD8= X-Google-Smtp-Source: AG47ELu4AToos3oLsf7IKAzCKnx96r5JIhxQq/YDcJvBeqqQIzUVnyDe1JCBvegDvdEcs5fifw3Awg== X-Received: by 10.28.87.211 with SMTP id l202mr11161955wmb.32.1520359286552; Tue, 06 Mar 2018 10:01:26 -0800 (PST) Received: from undo-autkin ([62.31.134.222]) by smtp.gmail.com with ESMTPSA id g52sm32538417wra.20.2018.03.06.10.01.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 10:01:26 -0800 (PST) Date: Tue, 06 Mar 2018 18:01:00 -0000 From: Andrey Utkin To: gdb@sourceware.org, Yao Qi Subject: Help request on making a gdb testsuite case Message-ID: <20180306180136.GA27627@undo-autkin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.3 (2018-01-21) X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00019.txt.bz2 Hi GDB devs, I have found that the case of restarting the debuggee in extended-remote session has been broken in GDB for undetermined, but quite long time (predating gdb 7.10.1). It got fixed in git master just recently, on February 15 by Yao Qi in commit 85046ae23f85 (thanks a lot!). Anyway, now I have an automated way to detect the bug which got fixed, and would like to turn it into a case in GDB test suite. # "./simple" is built from "int main(){return 0;}", must be unstripped timeout 4 "$GDB" \ -ex "target extended-remote | $GDBSERVER --once - ./simple" \ -ex 'break main' \ -ex 'set confirm off' \ -ex 'run' \ -ex 'quit' \ ; # buggy gdb would hang It is not obvious to me how to write such a testcase. There are three elements: the debuggee, the server process and the frontend process. I have very rough idea that some goodness to use is in lib/gdbserver-support.exp, and almost certainly i'll use gdb_target_cmd procedure, but beyond that, I'm pretty much lost. How would I specify a debuggee program, or where do I find one to reuse after other tests? Any help would be highly appreciated!