From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 2F6123858D1E for ; Sat, 24 Feb 2024 17:37:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F6123858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2F6123858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708796249; cv=none; b=GcylR4V8qwcIikG2sqBgxj4X06e04HfC/RjgXKhMln7hKS6e5UTP/Rq9kLADFDTXFVv6VQN6xkoCTNDTWETt5HWkDTNdVvHThMQx22PbKCnxiwTKQcICaoPEXcRo20gLw6zeaUUxTNnn/8IymNS90szeNr3kME7X6hmE8WILGDw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708796249; c=relaxed/simple; bh=5q/d1636IwZE6T2FAYV/cXD4okbep9wG3+GDHKCJJ4w=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=YPtGgIANikDtWk/wvrhIsppjx1d+d7npyoXGZZ15icUPljVds1yvnrhvXbbHDIx1UL3aOlua9WbPhEerKp/HRTOhsGRnmXmiP66AKBs60Ap7G1eqHhGATEYUlFwv14JmqQ71Ix+P782znzqZyDnk/gURMIK+0YhzVITGBuUFsFk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1d911c2103aso8659835ad.0 for ; Sat, 24 Feb 2024 09:37:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708796247; x=1709401047; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hZrlb0yp5LEV5CipvBl3ZW8a2l4C9zYnj/MTqYbBSes=; b=dv9+vLt1pvrVOsSuxQLRiiH2L4UaADQLY9+A8DBB+ADq+2cQZmrYWiniYE4s8FSNj/ vf4R4wTZGbMQN9+Uyt1wWVccEzbXtSo2Rus08etiL+O2hOakqmTbe8SB8pa35R0rpZRc uJuXTJiWuPbJ8C10euVEcgJwuFpdhQVqm5+urd7QVccmvrB05pKKnbkhqOC+vVxm35bI Xl19yoPOjDzUJLLlQ8gNtn7rDypeJM1I5wtYLnESn2jYjR2P+7xdoCj3X5fp+9qRdVGZ N6KUB9vSA7V4iBF5jzC6NKumNsF420ZYUKHdz8PPYOE3MFTEiakow1cIKEuaurYFl+8p dY8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708796247; x=1709401047; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hZrlb0yp5LEV5CipvBl3ZW8a2l4C9zYnj/MTqYbBSes=; b=LbxiyhJ+7bP/xzACEEZ2Ze6EBKKiYhVtQmU0eTlzNJQFGDN0b+qJGnpS67Ie0d4FxA ERveobUZuZMVjpXKG0GhnoFztSeasjc7c8mT7ais8bGN7u5eQNrAtL0WKLHj6uy2IDAY mSs+u8hiCbzPOislU4HFmYAPVLUM/v+OeBOq7oNxPqtkvC7VJPHsTUTr3GFbgx0h3FCe MRPUDsn/uKdQ67bCZ9cLCkEE7TwcpBZbl9UjuzUzAGXgH66iVInen5ZlMwMbHVxO8Fz/ gYNz7lGeM6qkWj7hk/n628Vlf9uGhWFTRElxRtVHBPYZdK1UlON6A2fqXzxU0IbPAAMD w8iw== X-Gm-Message-State: AOJu0YxSOGExbM1BRUzvjQorL1ZmxnXelWDGihDZWyitNoXT+BtV6PeE VfaV5SU6VssuKZkdXauuGz9cbguyef96Wp8VOK1WnZScqk9gokx0 X-Google-Smtp-Source: AGHT+IHXOG51gF3azi0+z1gmoJisKHIaKFFrwjvzcpbejLpaCNcTWSjHo/cCVv4nM6lgu8h9QGOI0Q== X-Received: by 2002:a17:902:aa81:b0:1d9:3843:3f07 with SMTP id d1-20020a170902aa8100b001d938433f07mr3044451plr.61.1708796246874; Sat, 24 Feb 2024 09:37:26 -0800 (PST) Received: from lima-default.. ([179.113.44.68]) by smtp.gmail.com with ESMTPSA id x6-20020a170902ec8600b001db5241804csm1252944plg.20.2024.02.24.09.37.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 09:37:26 -0800 (PST) From: Matheus Branco Borella To: tom@tromey.com Cc: gdb-patches@sourceware.org, dark.ryu.550@gmail.com Subject: Re: Re: [PATCH v2] Add support for symbol addition to the Python API Date: Sat, 24 Feb 2024 14:35:21 -0300 Message-Id: <20240224173520.29558-1-dark.ryu.550@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <875xz1eb3g.fsf@tromey.com> References: <875xz1eb3g.fsf@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Tom Tromey writes: > I guess because nothing makes any blocks. However this seems like a > kind of big issue to me, because it means that by-name lookups will > appear to succeed ("function xyz is at address 0xaaaaa") but then > stopping in that function won't show the name. The big issue with properly supporting the PC-based lookups, and minsyms in general, is that we don't actually have a properly set up BFD struct. And, as far as I know, there's no way to actually create one without go- ing through the trouble of generating an actual binary file in memory and having the library read back from it. So I did the best I could that wouldn't also have to involve potentially fairly invasive changes to the rest of GDB. Of course, I could be wrong and there might be a way to properly do what I'm trying to do, but if there is one, I couldn't find it. > gdb exposes a gdb.Architecture, maybe we could let the Python code > specify this. Yeah, that makes sense. I'll change it so that it uses gdb.Architecture. > objfile_to_objfile_object returns a new reference so I think the incref > is wrong here. > > We try to avoid explicit inc/dec-refs in gdb anyway. Yes, I didn't realize the gdbpy_ref increased the refcount automatically. I don't have anything to add for the other points, so suffice to say I'll fix everything you pointed out and submit a v3 as soon as I can. Thanks for your time.