From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C41E03858C20; Mon, 14 Aug 2023 13:20:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C41E03858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692019200; bh=Vch2zB8Y6xxIo84lu3Dr3q1on9Ke/7rkILTl+IXuzCY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jOeM0fo+Xhw3Z6cqZhMc9dS872l1fAbn/i9mTpWON834mUYxLSDExXzJrQzaLG0Wv CRRpiFsiowiixNat93vxcs0gPm5FSTnvfUVzGNd1I0L0Qf0/avisbqri6EYxnPRsrQ moqFTln0SJCSlGFRQtKWilPd6S0XdVRdg4tXoJNI= From: "markus.t.metzger at intel dot com" To: gdb-prs@sourceware.org Subject: [Bug build/30751] [gdb/build] ODR violation for struct btrace_target_info Date: Mon, 14 Aug 2023 13:20:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: markus.t.metzger at intel dot com 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=3D30751 --- Comment #2 from Markus Metzger --- (In reply to Tom de Vries from comment #1) > I tried renaming "struct btrace_target_info" to "struct > remote_btrace_target_info" in remote.c, but that didn't work. The two ty= pes > are related somehow but not the same. >=20 > I'm not sure how to fix this. >=20 > Markus, do you have any idea how this should be fixed? The idea was that targets can attach target-specific information. You'd get the handle when enabling btrace on a target, then you'd pass it to other bt= race functions on that target. One obvious fix would be to turn it into a void * and have targets cast it.= I declared this opaque struct to avoid exactly that. This is similar to the private data targets attach to inferiors or threads = so the same solution should work here, as well. I can work on a patch but not right now. --=20 You are receiving this mail because: You are on the CC list for the bug.=