From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out-234.mta0.migadu.com (out-234.mta0.migadu.com [91.218.175.234]) by sourceware.org (Postfix) with ESMTPS id 797A03858D20 for ; Fri, 1 Sep 2023 19:18:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 797A03858D20 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=gpanders.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gpanders.com Date: Fri, 1 Sep 2023 19:18:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpanders.com; s=key1; t=1693595914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8NnVjLAL+38lsupHnjGlsrKVIFP1MDP5b8/15zNHnko=; b=SlHuPzOJFbu0DHyC7GM+7eci5WKCJDecQzGWu0ZzWNGgHrRPDsegydLWHD1hWYOquayZHE qU38eHe0ejXYj1NyCQ5HzrdxFEsauvWe7Qce+ivrRp6LqMFANY60Gsl9IaK+Wfwzr4zro5 d3VMgKAumLp3y3dSajkC+14b1XJzBtPY/ZtGiz+0d5L9fvZj78AH8vQ4BSBAm72VO8F0aK HBv1yW4cBHLjvy/+MN3RYSWJIE2vlpTkD0OXVGyty3sCOOVAzEjGEMM164dO0H2RxL0NYD 17z82X8guVpDPT4nC9Ba2P8B21uJaXUMsnq2BhHn00gg/8lxFIGDayqn7eUj0g== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Gregory Anders To: Tom Tromey Cc: Gregory Anders via Gdb-patches Subject: Re: [PATCH 1/4] gdb/dap: check for breakpoint source before unpacking Message-ID: References: <20230901180323.22328-3-greg@gpanders.com> <20230901180323.22328-5-greg@gpanders.com> <87wmx9ogt8.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: <87wmx9ogt8.fsf@tromey.com> X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 01 Sep 2023 13:05 -0600, Tom Tromey wrote: >This one could probably use a test case. > >I guess the failure mode is setting a breakpoint on a function without >debuginfo? If so maybe the test is as simple as having >gdb/testsuite/gdb.dap/bt-nodebug.exp set a breakpoint on the >"no_debug_info" function, I suppose just before dap_shutdown. I actually stumbled on this on accident. I was starting GDB with a .gdbinit file that sets a breakpoint by address (specifically, an exception handler in the vector table, so something like b *0xf4). That breakpoint had address info, but no source file or line information, and would trigger an error which this patch corrects. I'll look into writing up a test case.