From 80affb9f80d22ee4b1463f23a36b083e05b6d2c3 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 7 Apr 2022 09:27:18 -0400 Subject: 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 --- gdb/buildsym.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gdb') diff --git a/gdb/buildsym.c b/gdb/buildsym.c index 65c2ac5..fae3d5e 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; -- cgit v1.1