From patchwork Thu Nov 13 12:54:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 3704 Received: (qmail 11232 invoked by alias); 13 Nov 2014 12:55:41 -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 11185 invoked by uid 89); 13 Nov 2014 12:55:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 13 Nov 2014 12:55:40 +0000 Received: by mail-pa0-f54.google.com with SMTP id hz1so4060984pad.27 for ; Thu, 13 Nov 2014 04:55:38 -0800 (PST) X-Received: by 10.66.222.41 with SMTP id qj9mr2378945pac.21.1415883338617; Thu, 13 Nov 2014 04:55:38 -0800 (PST) Received: from sspiff.org (173-13-178-53-sfba.hfc.comcastbusiness.net. [173.13.178.53]) by mx.google.com with ESMTPSA id ye3sm19388863pbb.93.2014.11.13.04.55.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Nov 2014 04:55:38 -0800 (PST) Message-ID: <5464aa4a.03a3440a.5721.ffff95f9@mx.google.com> Received: by sspiff.org (sSMTP sendmail emulation); Thu, 13 Nov 2014 04:54:46 -0800 Date: Thu, 13 Nov 2014 04:54:46 -0800 From: Doug Evans To: gdb-patches@sourceware.org Subject: [PATCH 19/21] struct symtab split part 2: source.c X-IsSubscribed: yes This patch contains the changes to source.c. Full ChangeLog: https://sourceware.org/ml/gdb-patches/2014-11/msg00233.html 2014-11-12 Doug Evans * source.c (forget_cached_source_info_for_objfile): Fetch debugformat and macro_table from compunit. diff --git a/gdb/source.c b/gdb/source.c index 0f69578..031ea67 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -259,6 +259,7 @@ select_source_symtab (struct symtab *s) struct symtabs_and_lines sals; struct symtab_and_line sal; struct objfile *ofp; + struct compunit_symtab *cu; if (s) { @@ -291,7 +292,7 @@ select_source_symtab (struct symtab *s) current_source_line = 1; - ALL_SYMTABS (ofp, s) + ALL_FILETABS (ofp, cu, s) { const char *name = s->filename; int len = strlen (name); @@ -369,9 +370,10 @@ show_directories_command (struct ui_file *file, int from_tty, void forget_cached_source_info_for_objfile (struct objfile *objfile) { + struct compunit_symtab *cu; struct symtab *s; - ALL_OBJFILE_SYMTABS (objfile, s) + ALL_OBJFILE_FILETABS (objfile, cu, s) { if (s->line_charpos != NULL) { @@ -668,9 +670,11 @@ source_info (char *ignore, int from_tty) s->nlines == 1 ? "" : "s"); printf_filtered (_("Source language is %s.\n"), language_str (s->language)); - printf_filtered (_("Compiled with %s debugging format.\n"), s->debugformat); + printf_filtered (_("Compiled with %s debugging format.\n"), + COMPUNIT_DEBUGFORMAT (SYMTAB_COMPUNIT (s))); printf_filtered (_("%s preprocessor macro info.\n"), - s->macro_table ? "Includes" : "Does not include"); + COMPUNIT_MACRO_TABLE (SYMTAB_COMPUNIT (s)) != NULL + ? "Includes" : "Does not include"); }