aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-04-07 09:27:18 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-07-29 20:54:48 -0400
commit80affb9f80d22ee4b1463f23a36b083e05b6d2c3 (patch)
tree263f7181d9419d3b70cd83b9fc8aec4dd6888167 /gdb
parent2ab317fb8290ea96bdb446957d2e221634fd25c8 (diff)
downloadgdb-80affb9f80d22ee4b1463f23a36b083e05b6d2c3.zip
gdb-80affb9f80d22ee4b1463f23a36b083e05b6d2c3.tar.gz
gdb-80affb9f80d22ee4b1463f23a36b083e05b6d2c3.tar.bz2
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
Diffstat (limited to 'gdb')
-rw-r--r--gdb/buildsym.c7
1 files changed, 7 insertions, 0 deletions
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;