From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3E02D3857006; Thu, 13 Jul 2023 16:35:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E02D3857006 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689266111; bh=bvQl9xLrimP8uQdxn0Bx9ZMpTWdFDuA0p+nkIEJf0/M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bSZpDcahwa49dHOKgHtzEOnQU9SmBsxWgbpU5GkrQFBjjPCDQ0wgPvO0nAkYpMVug 8huokk2HRNAWRd0KC3riMypbTRvs85f+ftsNaAMeXZ4go/fx5Qk2MQCh5PeHlW1aVo VLAmsIa3/6Ndm4CSUBKLH3iW7R0hetdzAhdrD6kc= From: "pedro at palves dot net" To: gdb-prs@sourceware.org Subject: [Bug gdb/30541] Add target valgrind Date: Thu, 13 Jul 2023 16:35:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pedro at palves dot net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30541 --- Comment #30 from Pedro Alves --- > Using Q* to set the environment and the working directory seems > clearly better to me, and in fact the only way it can work > properly. The problem case is something like: > > (gdb) set env X y > (gdb) start > (gdb) add-inferior blah blah > (gdb) set env X z > (gdb) start GDB only sends the env vars that were set/cleared with "set/unset env". It does not send the whole environment that GDB has. Same for the working directory. If you user hasn't done "set cwd" explicitly, then GDB will tell the server to use its default cwd. That's why I was suggesting to just start vgdb with the environment you wan= t, like if done by "target valgrind", then it would already inherit gdb's environment. If started via "ssh server vgdb", then it wouldn't make sense= to send the whole of gdb's environment. So that's why I was asking what would= be the use case, if users aren't ideally going to start vgdb themselves. --=20 You are receiving this mail because: You are on the CC list for the bug.=