WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: [doc RFA] "set debug dwarf2-read" and "set debug symtab-create"

Re: [doc RFA] "set debug dwarf2-read" and "set debug symtab-create"

by Doug Evans-3 :: Rate this Message:

| View in Thread

On Fri, Jun 22, 2012 at 7:06 AM, Tom Tromey <tromey@...> wrote:

>>>>>> "Doug" == Doug Evans <dje@...> writes:
>
> Doug> I'm committing this after a doc RFA.
> Doug> [But feel free to suggest changes or enhancements.]
>
> Seems nice; I've wanted something like this before.  I have one
> suggestion:
>
> Doug> @@ -5286,6 +5300,13 @@ process_queue (void)
>
> Doug> +      fprintf_unfiltered (gdb_stdlog,
> Doug> +                   "Expanding one or more symtabs of objfile %s ...\n",
> Doug> +                   dwarf2_per_objfile->objfile->name);
>
> This seems a little vague; it would be nice to, say, print the CU offset
> here.
>
> Tom

This message is part A of a two part set.
The other part is:

@@ -5690,6 +5717,14 @@ process_full_comp_unit (struct
dwarf2_per_cu_data *per_cu,
   struct cleanup *back_to, *delayed_list_cleanup;
   CORE_ADDR baseaddr;

+  if (dwarf2_read_debug)
+    {
+      fprintf_unfiltered (gdb_stdlog,
+                         "Expanding symtab of %s at offset 0x%x\n",
+                         per_cu->is_debug_types ? "TU" : "CU",
+                         per_cu->offset.sect_off);
+    }
+
   baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));

   buildsym_init ();

I want to keep the S/N ratio high and thus I don't want to print the
objfile name for each expanded symtab (expanding one symtab can
involve expanding others as well).
So part A (so to speak) prints the objfile name and part B (possibly
replicated multiple times) prints all the CUs that get expanded.

I can add a comment noting this fact if you like.

 « Return to Thread: [doc RFA] "set debug dwarf2-read" and "set debug symtab-create"