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.133.124]) by sourceware.org (Postfix) with ESMTPS id CFCA1389EC69 for ; Wed, 26 Jan 2022 21:59:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CFCA1389EC69 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-646-sAPalyAqOeOl_2R7YGipGg-1; Wed, 26 Jan 2022 16:59:17 -0500 X-MC-Unique: sAPalyAqOeOl_2R7YGipGg-1 Received: by mail-wm1-f72.google.com with SMTP id bg32-20020a05600c3ca000b00349f2aca1beso517912wmb.9 for ; Wed, 26 Jan 2022 13:59:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=XOQolUCH8ub0tmHZSHDVqqPOgkabn/cVrTTMw1A5C4Q=; b=Hab+fnlJ1hSmvzlW6T9Bn0f2k1zhBcSpE/MeKN7ecjzzDeMAvXeg6BXDZ45kUscNHD laSNlLCYZkMxgCTB1eKwOUYdfIvrhVcRcrvgZEbg03caDNDVUdlqs0wuDd/kJFuSuqQZ HJHAsww9XWUYGn5Wt5cN9NdxxE0Yd9XyxlEWYELuKU0m81Ny2wthdj02c9GsAspnris/ QdV9achRt4iyDTBcd8++9gXmjosJ75jXUkHMzBAE4zZjL5NH53X6rxjimfY/wg0bF6rO /YBphjFHo1TzVRniqhgiLVitog+P6vVMlmeQOlNdRPc8XqkyOcNKaWIeEsAvoRrw5VSx HW0g== X-Gm-Message-State: AOAM533MQyNc3eLmLcvV+U7QiFpjNY0ly+g9eEl/pgOP2JPUGTt9/wqG wGJNlWR8xaa51cBaWvs51IXJrGLFRgF58CFX5O5F7wxN7UXWW6jXT4P1FgwN4qOj37BewZOxBF6 hSJ4ZNtQ9kMMnyqDNfc8q9Q== X-Received: by 2002:a05:600c:2245:: with SMTP id a5mr8814038wmm.8.1643234355586; Wed, 26 Jan 2022 13:59:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHN+fmVkko8lotmYIqOdCdY0+c/d7YlkabHc5jMYxSc3br06aJehrflnmeTPH0FLeOmJY3Xg== X-Received: by 2002:a05:600c:2245:: with SMTP id a5mr8814030wmm.8.1643234355378; Wed, 26 Jan 2022 13:59:15 -0800 (PST) Received: from localhost (host86-140-92-93.range86-140.btcentralplus.com. [86.140.92.93]) by smtp.gmail.com with ESMTPSA id 11sm510758wrb.30.2022.01.26.13.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 13:59:15 -0800 (PST) From: Andrew Burgess To: Tom Tromey , Andrew Burgess via Gdb-patches Subject: Re: [PATCH] gdb/python: add gdb.history_count function In-Reply-To: <87v8y6a5tk.fsf@tromey.com> References: <20220124223431.216455-1-aburgess@redhat.com> <87v8y6a5tk.fsf@tromey.com> Date: Wed, 26 Jan 2022 21:59:13 +0000 Message-ID: <87mtjiqhu6.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.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2022 21:59:23 -0000 Tom Tromey writes: >>>>>> "Andrew" == Andrew Burgess via Gdb-patches writes: > > Andrew> Add a new function gdb.history_count to the Python api, this function > Andrew> returns an integer, the number of items in GDB's value history. > > Andrew> This is useful if you want to pull items from the history by their > Andrew> absolute number, for example, if you wanted to show a complete history > Andrew> list. Previously we could figure out how many items are in the > Andrew> history list by trying to fetch the items, and then catching the > Andrew> exception when the item is not available, but having this function > Andrew> seems nicer. > > Looks good to me, thank you. Thanks, pushed. Andrew