From patchwork Sat Aug 29 22:33:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 8514 Received: (qmail 42321 invoked by alias); 29 Aug 2015 22:34:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 42312 invoked by uid 89); 29 Aug 2015 22:34:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-qk0-f179.google.com Received: from mail-qk0-f179.google.com (HELO mail-qk0-f179.google.com) (209.85.220.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 29 Aug 2015 22:34:00 +0000 Received: by qkbm65 with SMTP id m65so46109101qkb.2 for ; Sat, 29 Aug 2015 15:33:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7eT6+LhzStqygNF2Ko4XCXJjTsDp44qMcWeJH5+8tFI=; b=mHjzbFoLU6CJroogG9qFHUoHBkybOkGNDXwWU2UGeFfUbCdy4AYAdZ6EoVerkPHK8J 2KzzdYPxnakLBHKUm/i3Xqz0romZ6svVh5+/57J6p//cBbz/HqaWZkRfrDeur3EXjOr2 OrMZSFWrlhRKKj8BGguOeUsDGysTN5PzuN19SLHn0C8PBFEdEdfflLANSm4Apy7T7gP8 Hvid4VETN9gWSITGuXAlD3AeDRX1wHAKg8/dv0vLgOGAGgMTIKcHbsE2HI7ZXzj7Mllp rKuTnpp1Lc4HGFPVK47Ynzf2l0HdG31JJRjMAFru/K74Ty4nd4s0F1LZf7cCvJaEvtkB awMw== X-Gm-Message-State: ALoCoQk1gR7ZN2TYWJU3B6ktJ+Iuph28idYdEJWxB8rZQLWfDZ6P1F6yS0ih0JudBQM3fkNhcD6d X-Received: by 10.55.42.163 with SMTP id q35mr26672143qkq.107.1440887638030; Sat, 29 Aug 2015 15:33:58 -0700 (PDT) Received: from localhost.localdomain (ool-4353acd8.dyn.optonline.net. [67.83.172.216]) by smtp.gmail.com with ESMTPSA id k85sm934787qhk.2.2015.08.29.15.33.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 29 Aug 2015 15:33:57 -0700 (PDT) From: Patrick Palka To: gdb-patches@sourceware.org Cc: xdje42@gmail.com, Patrick Palka Subject: [PATCH] Update documentation of function copy_type_recursive Date: Sat, 29 Aug 2015 18:33:51 -0400 Message-Id: <1440887631-23069-1-git-send-email-patrick@parcs.ath.cx> Following commit 8f57eec2fb3 ("Use gdbarch obstack to allocate types in alloc_type_arch") it is no longer the case that the type returned by copy_type_recursive is allocated using malloc. Because the function uses alloc_type_arch internally, the new type is now allocated on the gdbarch associated with the type, and is thus owned by that gdbarch. gdb/ChangeLog: * gdbtypes.c (copy_type_recursive): Update documentation. --- gdb/gdbtypes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 8204d39..7a18bed 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -4356,9 +4356,9 @@ copy_dynamic_prop_list (struct obstack *objfile_obstack, } /* Recursively copy (deep copy) TYPE, if it is associated with - OBJFILE. Return a new type allocated using malloc, a saved type if - we have already visited TYPE (using COPIED_TYPES), or TYPE if it is - not associated with OBJFILE. */ + OBJFILE. Return a new type owned by the gdbarch associated with the type, a + saved type if we have already visited TYPE (using COPIED_TYPES), or TYPE if + it is not associated with OBJFILE. */ struct type * copy_type_recursive (struct objfile *objfile,