From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97427 invoked by alias); 26 Sep 2019 00:00:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 91811 invoked by uid 89); 26 Sep 2019 00:00:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-wm1-f68.google.com Received: from mail-wm1-f68.google.com (HELO mail-wm1-f68.google.com) (209.85.128.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Sep 2019 00:00:02 +0000 Received: by mail-wm1-f68.google.com with SMTP id y21so556946wmi.0 for ; Wed, 25 Sep 2019 17:00:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NkcYFhyxHjvjW2uGhEBvRQoYnvvaXDEnVT12H4bru4w=; b=eXLnZ/Dqlpg5ENCoga857c727PgPlr9sDmniaNZ8/46dgGIFLCMMpz3tnYFeyOeLq3 FlxBP5P4Zfws4BaRluJuQaEDTpJ3uCPA5RiuDsJlOZ1+PFnIIP3c4lcyjQzioX/7eIzP AJsF6DqWdb9QN+Uc5nyO2D+ztQx+Bqz2prZsKhaOziTG+RO0KoIq+0ernpttxg2s+P6/ 16zUqY+GXO6ihvUAhIGBEjuunQOlFCDN0lkD2QiYqSPRw6e97Wq0P56PopvdoQzfaSYF 95XuPIFxlGhC2WJaS8NFZpuzLx4Ib4IXUhT639aVz+ZDSW19uQoG7nKQtmsIM+DozDM0 R6Aw== Return-Path: Received: from localhost (host86-128-12-122.range86-128.btcentralplus.com. [86.128.12.122]) by smtp.gmail.com with ESMTPSA id h17sm1864414wme.6.2019.09.25.16.59.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Sep 2019 16:59:59 -0700 (PDT) From: Andrew Burgess To: gdb-patches Cc: Simon Marchi , Tom Tromey , Andrew Burgess Subject: [PATCHv3 0/3] Remove some uses of VEC Date: Thu, 26 Sep 2019 00:00:00 -0000 Message-Id: In-Reply-To: <87lfucf2qs.fsf@tromey.com> References: <87lfucf2qs.fsf@tromey.com> X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00495.txt.bz2 Tom raised some good points about patch #3, specifically that some of the query functions like VEC_length and VEC_empty will return a sane answer even when the vector pointer is NULL. He also pointed out that VEC_free resets theh vector pointer back to NULL. This revision of the series is a little more defensive about checking for the std::vector pointer being null before dereferencing it. In places where I'm reasonably sure the vector pointer won't be NULL I've added an assert - then at least if I'm wrong we'll get a nice error rather than a random crash. Thanks, Andrew --- Andrew Burgess (3): gdb: Remove a VEC from gdbsupport/btrace-common.h gdb: Change a VEC to std::vector in btrace.{c,h} gdb: Remove a use of VEC from dwarf2read.{c,h} gdb/ChangeLog | 46 ++++++++++++++++++++ gdb/btrace.c | 98 ++++++++++++++++++++---------------------- gdb/btrace.h | 5 +-- gdb/dwarf2read.c | 17 ++++---- gdb/dwarf2read.h | 3 -- gdb/gdbserver/ChangeLog | 5 +++ gdb/gdbserver/linux-low.c | 8 +--- gdb/gdbsupport/btrace-common.c | 20 ++++----- gdb/gdbsupport/btrace-common.h | 19 ++++---- gdb/nat/linux-btrace.c | 16 +++---- 10 files changed, 139 insertions(+), 98 deletions(-) -- 2.14.5