* RFA: switch to printf_unfiltered in symfile.c
@ 2003-10-22 18:42 J. Johnston
2003-10-28 4:30 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: J. Johnston @ 2003-10-22 18:42 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 833 bytes --]
The following patch switches over the majority of the printfs in symfile.c to
use printf_unfiltered. This fixes a problem whereby if you attach to a process
that has a lot of dynamic library references, you will get page breaks as it
displays loading symbols messages.
I purposely left printf_filtered for info_ext_lang_command(), and
list_overlays_command() as I felt that a user may want to examine the output and
this should allow paging if necessary.
Ok to commit?
-- Jeff J.
2003-10-22 Jeff Johnston <jjohnstn@redhat.com>
* symfile.c (symbol_file_add_with_addrs_or_offsets): Switch to use
printf_unfiltered instead of printf_filtered for output messages.
(add_symbol_file_command): Ditto.
(reread_symbols): Ditto.
(overlay_auto_command): Ditto.
(overlay_manual_command): Ditto.
(overlay_off_command): Ditto.
[-- Attachment #2: symfile.c.patch --]
[-- Type: text/plain, Size: 4730 bytes --]
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.100.2.2
diff -u -p -r1.100.2.2 symfile.c
--- symfile.c 14 Aug 2003 20:12:31 -0000 1.100.2.2
+++ symfile.c 22 Oct 2003 17:46:25 -0000
@@ -872,7 +872,7 @@ symbol_file_add_with_addrs_or_offsets (c
*/
if (from_tty || info_verbose)
{
- printf_filtered ("Mapped symbols for %s...", name);
+ printf_unfiltered ("Mapped symbols for %s...", name);
wrap_here ("");
gdb_flush (gdb_stdout);
}
@@ -890,7 +890,7 @@ symbol_file_add_with_addrs_or_offsets (c
pre_add_symbol_hook (name);
else
{
- printf_filtered ("Reading symbols from %s...", name);
+ printf_unfiltered ("Reading symbols from %s...", name);
wrap_here ("");
gdb_flush (gdb_stdout);
}
@@ -908,7 +908,7 @@ symbol_file_add_with_addrs_or_offsets (c
{
if (from_tty || info_verbose)
{
- printf_filtered ("expanding to full symbols...");
+ printf_unfiltered ("expanding to full symbols...");
wrap_here ("");
gdb_flush (gdb_stdout);
}
@@ -947,7 +947,7 @@ symbol_file_add_with_addrs_or_offsets (c
if (!have_partial_symbols () && !have_full_symbols ())
{
wrap_here ("");
- printf_filtered ("(no debugging symbols found)...");
+ printf_unfiltered ("(no debugging symbols found)...");
wrap_here ("");
}
@@ -957,7 +957,7 @@ symbol_file_add_with_addrs_or_offsets (c
post_add_symbol_hook ();
else
{
- printf_filtered ("done.\n");
+ printf_unfiltered ("done.\n");
}
}
@@ -1802,7 +1802,7 @@ add_symbol_file_command (char *args, int
statements because local_hex_string returns a local static
string. */
- printf_filtered ("add symbol table from file \"%s\" at\n", filename);
+ printf_unfiltered ("add symbol table from file \"%s\" at\n", filename);
section_addrs = alloc_section_addr_info (section_index);
make_cleanup (xfree, section_addrs);
for (i = 0; i < section_index; i++)
@@ -1817,7 +1817,7 @@ add_symbol_file_command (char *args, int
entered on the command line. */
section_addrs->other[sec_num].name = sec;
section_addrs->other[sec_num].addr = addr;
- printf_filtered ("\t%s_addr = %s\n",
+ printf_unfiltered ("\t%s_addr = %s\n",
sec,
local_hex_string ((unsigned long)addr));
sec_num++;
@@ -1882,7 +1882,7 @@ reread_symbols (void)
if (res != 0)
{
/* FIXME, should use print_sys_errmsg but it's not filtered. */
- printf_filtered ("`%s' has disappeared; keeping its symbols.\n",
+ printf_unfiltered ("`%s' has disappeared; keeping its symbols.\n",
objfile->name);
continue;
}
@@ -1894,7 +1894,7 @@ reread_symbols (void)
int num_offsets;
char *obfd_filename;
- printf_filtered ("`%s' has changed; re-reading symbols.\n",
+ printf_unfiltered ("`%s' has changed; re-reading symbols.\n",
objfile->name);
/* There are various functions like symbol_file_add,
@@ -2027,7 +2027,7 @@ reread_symbols (void)
if (!have_partial_symbols () && !have_full_symbols ())
{
wrap_here ("");
- printf_filtered ("(no debugging symbols found)\n");
+ printf_unfiltered ("(no debugging symbols found)\n");
wrap_here ("");
}
objfile->flags |= OBJF_SYMS;
@@ -3181,7 +3181,7 @@ the 'overlay manual' command.");
sec2->the_bfd_section))
{
if (info_verbose)
- printf_filtered ("Note: section %s unmapped by overlap\n",
+ printf_unfiltered ("Note: section %s unmapped by overlap\n",
bfd_section_name (objfile->obfd,
sec2->the_bfd_section));
sec2->ovly_mapped = 0; /* sec2 overlaps sec: unmap sec2 */
@@ -3231,7 +3231,7 @@ overlay_auto_command (char *args, int fr
overlay_debugging = ovly_auto;
enable_overlay_breakpoints ();
if (info_verbose)
- printf_filtered ("Automatic overlay debugging enabled.");
+ printf_unfiltered ("Automatic overlay debugging enabled.");
}
/* Function: overlay_manual_command
@@ -3244,7 +3244,7 @@ overlay_manual_command (char *args, int
overlay_debugging = ovly_on;
disable_overlay_breakpoints ();
if (info_verbose)
- printf_filtered ("Overlay debugging enabled.");
+ printf_unfiltered ("Overlay debugging enabled.");
}
/* Function: overlay_off_command
@@ -3257,7 +3257,7 @@ overlay_off_command (char *args, int fro
overlay_debugging = ovly_off;
disable_overlay_breakpoints ();
if (info_verbose)
- printf_filtered ("Overlay debugging disabled.");
+ printf_unfiltered ("Overlay debugging disabled.");
}
static void
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: RFA: switch to printf_unfiltered in symfile.c
2003-10-22 18:42 RFA: switch to printf_unfiltered in symfile.c J. Johnston
@ 2003-10-28 4:30 ` Daniel Jacobowitz
2003-10-28 16:08 ` Elena Zannoni
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-10-28 4:30 UTC (permalink / raw)
To: J. Johnston; +Cc: gdb-patches, jimb
On Wed, Oct 22, 2003 at 02:42:34PM -0400, J. Johnston wrote:
> The following patch switches over the majority of the printfs in symfile.c
> to use printf_unfiltered. This fixes a problem whereby if you attach to a
> process that has a lot of dynamic library references, you will get page
> breaks as it displays loading symbols messages.
>
> I purposely left printf_filtered for info_ext_lang_command(), and
> list_overlays_command() as I felt that a user may want to examine the
> output and this should allow paging if necessary.
>
> Ok to commit?
>
> -- Jeff J.
>
> 2003-10-22 Jeff Johnston <jjohnstn@redhat.com>
>
> * symfile.c (symbol_file_add_with_addrs_or_offsets): Switch to use
> printf_unfiltered instead of printf_filtered for output messages.
> (add_symbol_file_command): Ditto.
> (reread_symbols): Ditto.
> (overlay_auto_command): Ditto.
> (overlay_manual_command): Ditto.
> (overlay_off_command): Ditto.
Do any of our symtab maintainers have a comment on this patch? I
vaguely remember that you agreed with it on gdb@, Jim?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFA: switch to printf_unfiltered in symfile.c
2003-10-28 4:30 ` Daniel Jacobowitz
@ 2003-10-28 16:08 ` Elena Zannoni
2003-10-28 17:09 ` J. Johnston
2003-10-28 18:17 ` Jim Blandy
0 siblings, 2 replies; 5+ messages in thread
From: Elena Zannoni @ 2003-10-28 16:08 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: J. Johnston, gdb-patches, jimb
Daniel Jacobowitz writes:
> On Wed, Oct 22, 2003 at 02:42:34PM -0400, J. Johnston wrote:
> > The following patch switches over the majority of the printfs in symfile.c
> > to use printf_unfiltered. This fixes a problem whereby if you attach to a
> > process that has a lot of dynamic library references, you will get page
> > breaks as it displays loading symbols messages.
> >
> > I purposely left printf_filtered for info_ext_lang_command(), and
> > list_overlays_command() as I felt that a user may want to examine the
> > output and this should allow paging if necessary.
> >
> > Ok to commit?
> >
> > -- Jeff J.
> >
> > 2003-10-22 Jeff Johnston <jjohnstn@redhat.com>
> >
> > * symfile.c (symbol_file_add_with_addrs_or_offsets): Switch to use
> > printf_unfiltered instead of printf_filtered for output messages.
> > (add_symbol_file_command): Ditto.
> > (reread_symbols): Ditto.
> > (overlay_auto_command): Ditto.
> > (overlay_manual_command): Ditto.
> > (overlay_off_command): Ditto.
>
> Do any of our symtab maintainers have a comment on this patch? I
> vaguely remember that you agreed with it on gdb@, Jim?
>
I'll approve it. I did some digging in the old Cygnus repository that
dates back to 1991, and the code was already like that back then. So
there really seem to be no rationale other than letting the user read
the messages. Maybe back then nobody imagined that there would be more
than a screen of output.
elena
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFA: switch to printf_unfiltered in symfile.c
2003-10-28 16:08 ` Elena Zannoni
@ 2003-10-28 17:09 ` J. Johnston
2003-10-28 18:17 ` Jim Blandy
1 sibling, 0 replies; 5+ messages in thread
From: J. Johnston @ 2003-10-28 17:09 UTC (permalink / raw)
To: Elena Zannoni; +Cc: Daniel Jacobowitz, gdb-patches, jimb
Thanks. Patch committed to mainline.
-- Jeff J.
Elena Zannoni wrote:
> Daniel Jacobowitz writes:
> > On Wed, Oct 22, 2003 at 02:42:34PM -0400, J. Johnston wrote:
> > > The following patch switches over the majority of the printfs in symfile.c
> > > to use printf_unfiltered. This fixes a problem whereby if you attach to a
> > > process that has a lot of dynamic library references, you will get page
> > > breaks as it displays loading symbols messages.
> > >
> > > I purposely left printf_filtered for info_ext_lang_command(), and
> > > list_overlays_command() as I felt that a user may want to examine the
> > > output and this should allow paging if necessary.
> > >
> > > Ok to commit?
> > >
> > > -- Jeff J.
> > >
> > > 2003-10-22 Jeff Johnston <jjohnstn@redhat.com>
> > >
> > > * symfile.c (symbol_file_add_with_addrs_or_offsets): Switch to use
> > > printf_unfiltered instead of printf_filtered for output messages.
> > > (add_symbol_file_command): Ditto.
> > > (reread_symbols): Ditto.
> > > (overlay_auto_command): Ditto.
> > > (overlay_manual_command): Ditto.
> > > (overlay_off_command): Ditto.
> >
> > Do any of our symtab maintainers have a comment on this patch? I
> > vaguely remember that you agreed with it on gdb@, Jim?
> >
>
> I'll approve it. I did some digging in the old Cygnus repository that
> dates back to 1991, and the code was already like that back then. So
> there really seem to be no rationale other than letting the user read
> the messages. Maybe back then nobody imagined that there would be more
> than a screen of output.
>
> elena
>
>
> >
> > --
> > Daniel Jacobowitz
> > MontaVista Software Debian GNU/Linux Developer
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFA: switch to printf_unfiltered in symfile.c
2003-10-28 16:08 ` Elena Zannoni
2003-10-28 17:09 ` J. Johnston
@ 2003-10-28 18:17 ` Jim Blandy
1 sibling, 0 replies; 5+ messages in thread
From: Jim Blandy @ 2003-10-28 18:17 UTC (permalink / raw)
To: Elena Zannoni; +Cc: Daniel Jacobowitz, J. Johnston, gdb-patches
Elena Zannoni <ezannoni@redhat.com> writes:
> Daniel Jacobowitz writes:
> > On Wed, Oct 22, 2003 at 02:42:34PM -0400, J. Johnston wrote:
> > > The following patch switches over the majority of the printfs in symfile.c
> > > to use printf_unfiltered. This fixes a problem whereby if you attach to a
> > > process that has a lot of dynamic library references, you will get page
> > > breaks as it displays loading symbols messages.
> > >
> > > I purposely left printf_filtered for info_ext_lang_command(), and
> > > list_overlays_command() as I felt that a user may want to examine the
> > > output and this should allow paging if necessary.
> > >
> > > Ok to commit?
> > >
> > > -- Jeff J.
> > >
> > > 2003-10-22 Jeff Johnston <jjohnstn@redhat.com>
> > >
> > > * symfile.c (symbol_file_add_with_addrs_or_offsets): Switch to use
> > > printf_unfiltered instead of printf_filtered for output messages.
> > > (add_symbol_file_command): Ditto.
> > > (reread_symbols): Ditto.
> > > (overlay_auto_command): Ditto.
> > > (overlay_manual_command): Ditto.
> > > (overlay_off_command): Ditto.
> >
> > Do any of our symtab maintainers have a comment on this patch? I
> > vaguely remember that you agreed with it on gdb@, Jim?
> >
>
> I'll approve it. I did some digging in the old Cygnus repository that
> dates back to 1991, and the code was already like that back then. So
> there really seem to be no rationale other than letting the user read
> the messages. Maybe back then nobody imagined that there would be more
> than a screen of output.
Yes, I did mean to approve it as part of the discussion on gdb@.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-28 18:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-22 18:42 RFA: switch to printf_unfiltered in symfile.c J. Johnston
2003-10-28 4:30 ` Daniel Jacobowitz
2003-10-28 16:08 ` Elena Zannoni
2003-10-28 17:09 ` J. Johnston
2003-10-28 18:17 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox