This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Fri, Jun 22, 2012 at 7:06 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <dje@google.com> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]