From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 83905385701E for ; Fri, 5 May 2023 17:27:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 83905385701E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683307671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LSOZI/U8GQ82vDsCp+qT1SDS4vt2OH79u1/UOmmP2os=; b=DsZ2quPhSQML1Fn2cS2NCL0UaEMV/c6rr8ORjAevgRuviTzs4TKX2EnTXPB3wMQsBsgxpX YPkLJxS12rNm5yP4LWtqWNbk2suIW+jwokVHcvRvHKQwuJ+i5Nq6lpLnAey4GN2/8peF/n QetmHm8XdR4rSpPybtuH+xicHERwlGc= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-169-rP37QyZIPf2gqKSgWOXVRA-1; Fri, 05 May 2023 13:27:49 -0400 X-MC-Unique: rP37QyZIPf2gqKSgWOXVRA-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3f173bd0d1bso13646005e9.3 for ; Fri, 05 May 2023 10:27:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683307668; x=1685899668; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LSOZI/U8GQ82vDsCp+qT1SDS4vt2OH79u1/UOmmP2os=; b=HDUT/Cwiq2z/RFaBFBGVD+X4K4UBhpXCseUZoDa4Bonppg8eReBzYYVl+Z0qcL2Jql ne8sOUboMRscVlaKT2+5fISHDIsfpg8Yw4lynkF+G4LcwHvSJrzMApH9R6myv5Nl5cjw /qR2UNyMld1BzxkxdomeRtiYdsmxHyjJCQmURE8Kn/n+dgonCSeUyXlxcEZsbob0U8mx bT01+l49lwXTSfs/+Y0IiFWvXjHy1txdSnO8s2UdEGgDo0NfVBFSXeeF1vXZL1eLZco0 AI8cXOVMG+QhaqfRwbS16jFnvtPQYasgY8CQGxA1S5IFLWa9rsgIwCpmDSanMADXrLUW WZoQ== X-Gm-Message-State: AC+VfDzinRyzI534+Izo+vwXAugh81FNPafd5BORzpePJtlAzAvKda3h mJx4EZ1hzfg7hm/9SuYTdvpSp15BXM8mfcc2LWBJtsK3nObQcPfHvrHNg/xhNBXHjZZkY1NU0+3 9UCCcv1xVlLDI83G8b8P32fGkD3s+Hg== X-Received: by 2002:adf:d84c:0:b0:306:32be:f0f8 with SMTP id k12-20020adfd84c000000b0030632bef0f8mr2156768wrl.20.1683307668518; Fri, 05 May 2023 10:27:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5g/rLWaVaKUegNNwgT6XkQd3+UGsetwlVyyIzKE0u4lcyLqqRuCpgOo/9UC6/ldpFqOgegLw== X-Received: by 2002:adf:d84c:0:b0:306:32be:f0f8 with SMTP id k12-20020adfd84c000000b0030632bef0f8mr2156753wrl.20.1683307668168; Fri, 05 May 2023 10:27:48 -0700 (PDT) Received: from localhost (11.72.115.87.dyn.plus.net. [87.115.72.11]) by smtp.gmail.com with ESMTPSA id n18-20020adfe792000000b002f7780eee10sm2989329wrm.59.2023.05.05.10.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 10:27:47 -0700 (PDT) From: Andrew Burgess To: Tom Tromey , Andrew Burgess via Gdb-patches Subject: Re: [PATCHv2] gdb/python: add mechanism to manage Python initialization functions In-Reply-To: <87fs8y4jiu.fsf@tromey.com> References: <87y1timiew.fsf@tromey.com> <20221021131724.1446620-1-aburgess@redhat.com> <87fs8y4jiu.fsf@tromey.com> Date: Fri, 05 May 2023 18:27:46 +0100 Message-ID: <87wn1m7kod.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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: >>>>>> "Andrew" == Andrew Burgess via Gdb-patches writes: > > I saw this today and realized I'd forgotten to reply to it. It wasn't > intentional. > > Andrew> I'm not a huge fan of our existing make-init-c system. I think, now > Andrew> we've moved to C++ there are "in-lanaguage" ways we could achieve the > Andrew> same result without having to generate code. Though I'm have no plans > Andrew> to try and change the existing _initialize_* mechanism. > > Seems fair. I was worried about the static initialization problems > we've hit before, but I see you have fixed those. And actually your > patch makes me want to do the same for unit tests, so we can move the > gdbsupport unit tests into gdbsupport/ where (IMO) they belong. > > Andrew> If you don't like this any more than my first attempt then I'll finish > Andrew> off the make-init-c patch, but I thought I'd post this first and see > Andrew> what you thought. > > This looks good to me. > > Reviewed-By: Tom Tromey Thanks for getting back to this. I've gone ahead and pushed this now. > > Andrew> -int > Andrew> +static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION > Andrew> gdbpy_initialize_arch (void) > > Not a problem you need to address, but I'm not sure we can even run the > Python checker any more, now that gdb is using C++ (and things like > gdbpy_ref<>). I wondered about this too, but wasn't sure how to check. Would be nice to clean these up one day if they are no longer useful. Thanks, Andrew