public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: add debug prints in buildsym.c
@ 2022-07-30  0:55 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2022-07-30  0:55 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=80affb9f80d22ee4b1463f23a36b083e05b6d2c3

commit 80affb9f80d22ee4b1463f23a36b083e05b6d2c3
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Thu Apr 7 09:27:18 2022 -0400

    gdb: add debug prints in buildsym.c
    
    Add a few debug prints in buildsym.c that were helpful to me in writing
    this series.
    
    Change-Id: If10a818feaee3ce1b78a2a254013b62dd578002b

Diff:
---
 gdb/buildsym.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 65c2ac5aff0..fae3d5ef4ce 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -493,6 +493,8 @@ buildsym_compunit::start_subfile (const char *name)
 {
   /* See if this subfile is already registered.  */
 
+  symtab_create_debug_printf ("name = %s", name);
+
   for (subfile *subfile = m_subfiles; subfile; subfile = subfile->next)
     {
       std::string subfile_name_holder;
@@ -513,6 +515,8 @@ buildsym_compunit::start_subfile (const char *name)
 
       if (FILENAME_CMP (subfile_name, name) == 0)
 	{
+	  symtab_create_debug_printf ("found existing symtab with name %s (%s)",
+				      subfile->name.c_str (), subfile_name);
 	  m_current_subfile = subfile;
 	  return;
 	}
@@ -741,6 +745,9 @@ buildsym_compunit::watch_main_source_file_lossage ()
 	     Copy its line_vector and symtab to the main subfile
 	     and then discard it.  */
 
+	  symtab_create_debug_printf ("using subfile %s as the main subfile",
+				      mainsub_alias->name.c_str ());
+
 	  mainsub->line_vector_entries
 	    = std::move (mainsub_alias->line_vector_entries);
 	  mainsub->symtab = mainsub_alias->symtab;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-30  0:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-30  0:55 [binutils-gdb] gdb: add debug prints in buildsym.c Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).