Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Doug Evans" <dje@google.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA] watch for ^c in maint info {symtabs,psymtabs}
Date: Sat, 04 Oct 2008 16:57:00 -0000	[thread overview]
Message-ID: <e394668d0810040956m124d2fc9j460e816f5abd5701@mail.gmail.com> (raw)
In-Reply-To: <20081004124752.GA10832@caradoc.them.org>

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

On Sat, Oct 4, 2008 at 5:47 AM, Daniel Jacobowitz <drow@false.org> wrote:
> On Sat, Oct 04, 2008 at 12:28:25AM -0700, Doug Evans wrote:
>> If debugging a large app, it's painful if ^c doesn't work in
>> maint info {symtabs,psymtabs}.
>>
>> Ok to check in?
>
> Shouldn't it be inside the loop?

You mean "Shouldn't it be inside the inner loop?"

How about this?

[-- Attachment #2: gdb-081004-symmisc-2.patch.txt --]
[-- Type: text/plain, Size: 8236 bytes --]

2008-10-04  Doug Evans  <dje@google.com>

	* symmisc.c (maintenance_info_symtabs): Watch for ^c.
	(maintenance_info_psymtabs): Ditto.

==== //depot2/gcctools/google_vendor_src_branch/gdb/gdb-6.8.x/gdb/symmisc.c#1 - /usr/local/google/home/dje/ctools/gdb/dwarf-reduction/depot2/gcctools/google_vendor_src_branch/gdb/gdb-6.8.x/gdb/symmisc.c ====
--- /tmp/g4-67641/cache/depot2/gcctools/google_vendor_src_branch/gdb/gdb-6.8.x/gdb/symmisc.c#1	2008-10-04 00:23:12.000000000 -0700
+++ /usr/local/google/home/dje/ctools/gdb/dwarf-reduction/depot2/gcctools/google_vendor_src_branch/gdb/gdb-6.8.x/gdb/symmisc.c	2008-10-04 09:44:11.000000000 -0700
@@ -1015,32 +1015,36 @@
       int printed_objfile_start = 0;
 
       ALL_OBJFILE_SYMTABS (objfile, symtab)
-        if (! regexp
-            || re_exec (symtab->filename))
-          {
-            if (! printed_objfile_start)
-              {
-                printf_filtered ("{ objfile %s ", objfile->name);
-                wrap_here ("  ");
-                printf_filtered ("((struct objfile *) %p)\n", objfile);
-                printed_objfile_start = 1;
-              }
-
-            printf_filtered ("  { symtab %s ", symtab->filename);
-            wrap_here ("    ");
-            printf_filtered ("((struct symtab *) %p)\n", symtab);
-            printf_filtered ("    dirname %s\n",
-                             symtab->dirname ? symtab->dirname : "(null)");
-            printf_filtered ("    fullname %s\n",
-                             symtab->fullname ? symtab->fullname : "(null)");
-            printf_filtered ("    blockvector ((struct blockvector *) %p)%s\n",
-                             symtab->blockvector,
-                             symtab->primary ? " (primary)" : "");
-            printf_filtered ("    linetable ((struct linetable *) %p)\n",
-                             symtab->linetable);
-            printf_filtered ("    debugformat %s\n", symtab->debugformat);
-            printf_filtered ("  }\n");
-          }
+	{
+	  QUIT;
+
+	  if (! regexp
+	      || re_exec (symtab->filename))
+	    {
+	      if (! printed_objfile_start)
+		{
+		  printf_filtered ("{ objfile %s ", objfile->name);
+		  wrap_here ("  ");
+		  printf_filtered ("((struct objfile *) %p)\n", objfile);
+		  printed_objfile_start = 1;
+		}
+
+	      printf_filtered ("	{ symtab %s ", symtab->filename);
+	      wrap_here ("    ");
+	      printf_filtered ("((struct symtab *) %p)\n", symtab);
+	      printf_filtered ("	  dirname %s\n",
+			       symtab->dirname ? symtab->dirname : "(null)");
+	      printf_filtered ("	  fullname %s\n",
+			       symtab->fullname ? symtab->fullname : "(null)");
+	      printf_filtered ("	  blockvector ((struct blockvector *) %p)%s\n",
+			       symtab->blockvector,
+			       symtab->primary ? " (primary)" : "");
+	      printf_filtered ("	  linetable ((struct linetable *) %p)\n",
+			       symtab->linetable);
+	      printf_filtered ("	  debugformat %s\n", symtab->debugformat);
+	      printf_filtered ("	}\n");
+	    }
+	}
 
       if (printed_objfile_start)
         printf_filtered ("}\n");
@@ -1066,70 +1070,74 @@
       int printed_objfile_start = 0;
 
       ALL_OBJFILE_PSYMTABS (objfile, psymtab)
-        if (! regexp
-            || re_exec (psymtab->filename))
-          {
-            if (! printed_objfile_start)
-              {
-                printf_filtered ("{ objfile %s ", objfile->name);
-                wrap_here ("  ");
-                printf_filtered ("((struct objfile *) %p)\n", objfile);
-                printed_objfile_start = 1;
-              }
-
-            printf_filtered ("  { psymtab %s ", psymtab->filename);
-            wrap_here ("    ");
-            printf_filtered ("((struct partial_symtab *) %p)\n", psymtab);
-            printf_filtered ("    readin %s\n",
-                             psymtab->readin ? "yes" : "no");
-            printf_filtered ("    fullname %s\n",
-                             psymtab->fullname ? psymtab->fullname : "(null)");
-            printf_filtered ("    text addresses ");
-	    fputs_filtered (paddress (psymtab->textlow), gdb_stdout);
-            printf_filtered (" -- ");
-	    fputs_filtered (paddress (psymtab->texthigh), gdb_stdout);
-            printf_filtered ("\n");
-            printf_filtered ("    globals ");
-            if (psymtab->n_global_syms)
-              {
-                printf_filtered ("(* (struct partial_symbol **) %p @ %d)\n",
-                                 (psymtab->objfile->global_psymbols.list
-                                  + psymtab->globals_offset),
-                                 psymtab->n_global_syms);
-              }
-            else
-              printf_filtered ("(none)\n");
-            printf_filtered ("    statics ");
-            if (psymtab->n_static_syms)
-              {
-                printf_filtered ("(* (struct partial_symbol **) %p @ %d)\n",
-                                 (psymtab->objfile->static_psymbols.list
-                                  + psymtab->statics_offset),
-                                 psymtab->n_static_syms);
-              }
-            else
-              printf_filtered ("(none)\n");
-            printf_filtered ("    dependencies ");
-            if (psymtab->number_of_dependencies)
-              {
-                int i;
-
-                printf_filtered ("{\n");
-                for (i = 0; i < psymtab->number_of_dependencies; i++)
-                  {
-                    struct partial_symtab *dep = psymtab->dependencies[i];
-
-                    /* Note the string concatenation there --- no comma.  */
-                    printf_filtered ("      psymtab %s "
-                                     "((struct partial_symtab *) %p)\n",
-                                     dep->filename, dep);
-                  }
-                printf_filtered ("    }\n");
-              }
-            else
-              printf_filtered ("(none)\n");
-            printf_filtered ("  }\n");
-          }
+	{
+	  QUIT;
+
+	  if (! regexp
+	      || re_exec (psymtab->filename))
+	    {
+	      if (! printed_objfile_start)
+		{
+		  printf_filtered ("{ objfile %s ", objfile->name);
+		  wrap_here ("  ");
+		  printf_filtered ("((struct objfile *) %p)\n", objfile);
+		  printed_objfile_start = 1;
+		}
+
+	      printf_filtered ("  { psymtab %s ", psymtab->filename);
+	      wrap_here ("    ");
+	      printf_filtered ("((struct partial_symtab *) %p)\n", psymtab);
+	      printf_filtered ("    readin %s\n",
+			       psymtab->readin ? "yes" : "no");
+	      printf_filtered ("    fullname %s\n",
+			       psymtab->fullname ? psymtab->fullname : "(null)");
+	      printf_filtered ("    text addresses ");
+	      fputs_filtered (paddress (psymtab->textlow), gdb_stdout);
+	      printf_filtered (" -- ");
+	      fputs_filtered (paddress (psymtab->texthigh), gdb_stdout);
+	      printf_filtered ("\n");
+	      printf_filtered ("    globals ");
+	      if (psymtab->n_global_syms)
+		{
+		  printf_filtered ("(* (struct partial_symbol **) %p @ %d)\n",
+				   (psymtab->objfile->global_psymbols.list
+				    + psymtab->globals_offset),
+				   psymtab->n_global_syms);
+		}
+	      else
+		printf_filtered ("(none)\n");
+	      printf_filtered ("    statics ");
+	      if (psymtab->n_static_syms)
+		{
+		  printf_filtered ("(* (struct partial_symbol **) %p @ %d)\n",
+				   (psymtab->objfile->static_psymbols.list
+				    + psymtab->statics_offset),
+				   psymtab->n_static_syms);
+		}
+	      else
+		printf_filtered ("(none)\n");
+	      printf_filtered ("    dependencies ");
+	      if (psymtab->number_of_dependencies)
+		{
+		  int i;
+
+		  printf_filtered ("{\n");
+		  for (i = 0; i < psymtab->number_of_dependencies; i++)
+		    {
+		      struct partial_symtab *dep = psymtab->dependencies[i];
+
+		      /* Note the string concatenation there --- no comma.  */
+		      printf_filtered ("      psymtab %s "
+				       "((struct partial_symtab *) %p)\n",
+				       dep->filename, dep);
+		    }
+		  printf_filtered ("    }\n");
+		}
+	      else
+		printf_filtered ("(none)\n");
+	      printf_filtered ("  }\n");
+	    }
+	}
 
       if (printed_objfile_start)
         printf_filtered ("}\n");

  reply	other threads:[~2008-10-04 16:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-04  7:29 Doug Evans
2008-10-04 12:48 ` Daniel Jacobowitz
2008-10-04 16:57   ` Doug Evans [this message]
2008-10-04 18:15     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e394668d0810040956m124d2fc9j460e816f5abd5701@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox