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 D989E3858C66 for ; Mon, 9 Oct 2023 10:49:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D989E3858C66 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=1696848582; 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=m17peT8huMyeTXnqOV7E893IZAawfFZejujDuEm9vas=; b=EPhFIVOnm+PEdjqdSZp5IJk5QGoIDUSm9Ef9JeJ2RZTHPASsGfXmlznhZ8GQh8pMJof5jZ E5VAkKU2OIMtDEKzwcMxLe4j+IcnyWsA1Hac/1ELmvtIf8D8XFK40ZWnHe/MXzQgubLsCo oNdFURTVUKMzxkNGfF3ZZyV4vRf2FGs= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-321-xlL1igiZNgCvP_xclBBXbA-1; Mon, 09 Oct 2023 06:49:36 -0400 X-MC-Unique: xlL1igiZNgCvP_xclBBXbA-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-993eeb3a950so315970366b.2 for ; Mon, 09 Oct 2023 03:49:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696848575; x=1697453375; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=m17peT8huMyeTXnqOV7E893IZAawfFZejujDuEm9vas=; b=vVTr24WIhgaoIDhGtdZ9vNNdv8aQHYayvI6ljbZeKAASIGJJR6/xTrF89ie3B98I4J x3rwogRwt4zCfSTHyjvuZN0LUgCS23ACpsm/KPSQimecpfcO6Ag0a06ZN/SzvtIt4RwV 2mW0lKrciwq6sd3W09hJjXTgYt6kd+lq0FRKF4GSWtiCuWsjl/v0Zo+zymN4giHr+mYO 4C1ktUQY1t7s3G4AOiKjfXqynA7K+GzOvr5DwtbRDQtyKahCr+LnJaP5/9B3IQ8IRWaT MVKyvbbViczpBKikc2iPWLBhnx544rbOIyDXsUcg8aDs8K2LChqa8w3kquZTSm5qtyuP GKXg== X-Gm-Message-State: AOJu0Yx9nULY692i59+CNR2v6tjGcv5GSubteIX1GsbK1Sm9zzhjxIph N0fr3eyHwT9mONKAMtaTowT+ohnPOvQ/sTcTW6YE9DcHRsaPEgfSigiDP2aA5DPvXDxqh/wrGpo f3AXcW0nGGHh31eoPl8oqi4siZ15IdN158E72x3Ur/K/SHk8kP9qFjkhUzU+J+S+XEnTMdvivzX FNW0mt0w== X-Received: by 2002:a17:906:144:b0:9b6:5811:d990 with SMTP id 4-20020a170906014400b009b65811d990mr12228164ejh.47.1696848574961; Mon, 09 Oct 2023 03:49:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFePsk54oDqHR4XesKnBdimsEkuNEd3AAUN7VvwqpoWKcfxji2O/I6VRfkuULBRbFOz+3W0pw== X-Received: by 2002:a17:906:144:b0:9b6:5811:d990 with SMTP id 4-20020a170906014400b009b65811d990mr12228145ejh.47.1696848574506; Mon, 09 Oct 2023 03:49:34 -0700 (PDT) Received: from localhost ([31.111.84.209]) by smtp.gmail.com with ESMTPSA id jp20-20020a170906f75400b009a1c05bd672sm6472217ejb.127.2023.10.09.03.49.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 03:49:34 -0700 (PDT) From: Andrew Burgess To: Jan Vrany via Gdb-patches , gdb-patches@sourceware.org Cc: Jan Vrany Subject: Re: [PATCH v3 0/2] gdb/python: implement support for sending custom MI async In-Reply-To: <20231006151106.315633-1-jan.vrany@labware.com> References: <87bkddtamc.fsf@redhat.com> <20231006151106.315633-1-jan.vrany@labware.com> Date: Mon, 09 Oct 2023 11:49:33 +0100 Message-ID: <871qe4dq9u.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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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: Jan Vrany via Gdb-patches writes: > I hope I addressed all comments raised by Andrew for V2 series Thanks for all your work on this series. The looks great now. Approved-By: Andrew Burgess Thanks, Andrew > > Changes since V2: > > * Fixed formatting errors in patch 1 of this series > * Fixed formatting errors in patch 2 of this series > * Added report name of incorrect data type into error message > as suggested. > * Moved target_terminal::ours_for_output () right after the > check if UI is an MI UI as suggested. > * Fixed tests. > > Changes since V1: > > * Moved serialize_mi_result and helpers to py-mi.c as suggested. > Also, renamed serialize_mi_result to serialize_mi_results > instead of serialize_mi_data and do not rename serialize_mi_result_1. > > The reason for this is that GDB documentation, > section GDB/MI Output Syntax, describes "result" being single 'variable = value' > pair and "result-record" and "async-output" contains zero or more of these "result"s, > so calling top-level serialization function serialize_mi_results seems > a better name than serialize_mi_data (used in previous version). > > * Made gdb.notify_mi DATA parameter optional as suggested. > > * Validate gdb.notify_mi NAME parameter as suggested. > > * Updated documentation: > * example formatted as black tool would do it, > * rephrase some sentences as suggested, > * document that DATA parameter is optional, > * document restrictions on NAME parameter and > * document that users should prefix user-defined notification > with hyphen to avoid possible conflicts. > > Jan Vrany (2): > gdb/python: generalize serialize_mi_result() > gdb/python: implement support for sending custom MI async > notifications > > gdb/NEWS | 3 + > gdb/doc/python.texi | 45 +++++ > gdb/python/py-mi.c | 233 ++++++++++++++++++++++ > gdb/python/py-micmd.c | 185 +---------------- > gdb/python/python-internal.h | 18 ++ > gdb/python/python.c | 4 + > gdb/testsuite/gdb.python/py-mi-notify.exp | 71 +++++++ > 7 files changed, 383 insertions(+), 176 deletions(-) > create mode 100644 gdb/testsuite/gdb.python/py-mi-notify.exp > > -- > 2.40.1