Tue Dec 3 17:24:57 1991 John Gilmore (gnu at cygnus.com)
+ * Makefile.in: VERSION 4.2.96.
+
+ * main.c (initialize_main): Revise command descriptions.
+ * command.c (show_user): `info user' -> `show user'.
+ * symtab.c (_initialize_symtab): Typo in `info types' desc.
+
* coffread.c (coff_symfile_read): Avoid select_source_symtab,
- since it is not needed and can cause errors when examining ".o"
- files.
+ since it is not needed and can cause errors when examining ".o"s.
+ (read_coff_symtab, decode_base_type): Use complain, not printf.
+ Print symbol name, not its number.
+ Remove "#if defined(clipper) #define BELIEVE_PCC_PROMOTION", which
+ someday should go in a clipper target config file.
* symfile.c (compact_misc_function_vector): Handle empty vector.
+ (complain, clear_complaints, syms_from_objfile): Fix complaint
+ formatting.
+ * xcoffexec.c: Change syms_from_objfile caller.
* sparc-xdep.c: Force tm-file as tm-sparc.h, to make it compile
when configured for cross debugging. FIXME, this needs a more
#include <stdio.h>
#include "defs.h"
-#include "command.h"
+#include "gdbcmd.h"
#include "symtab.h"
#include "value.h"
#include <ctype.h>
}
static void
-user_info_1 (c, stream)
+show_user_1 (c, stream)
struct cmd_list_element *c;
FILE *stream;
{
/* ARGSUSED */
static void
-user_info (args, from_tty)
+show_user (args, from_tty)
char *args;
int from_tty;
{
c = lookup_cmd (&args, cmdlist, "", 0, 1);
if (c->class != class_user)
error ("Not a user command.");
- user_info_1 (c, stdout);
+ show_user_1 (c, stdout);
}
else
{
for (c = cmdlist; c; c = c->next)
{
if (c->class == class_user)
- user_info_1 (c, stdout);
+ show_user_1 (c, stdout);
}
}
}
add_com ("make", class_support, make_command,
"Run the ``make'' program using the rest of the line as arguments.");
- add_info ("user", user_info, "Show definitions of user defined commands.\n\
+ add_cmd ("user", no_class, show_user,
+ "Show definitions of user defined commands.\n\
Argument is the name of the user defined command.\n\
-With no argument, show definitions of all user defined commands.");
+With no argument, show definitions of all user defined commands.", &showlist);
}
FROM_TTY says how verbose to be. MAINLINE specifies whether this
is the main symbol file, or whether it's an extra symbol file such
as dynamically loaded code. If !mainline, ADDR is the address
- where the text segment was loaded. */
+ where the text segment was loaded. If VERBO, the caller has printed
+ a verbose message about the symbol reading (and complaints can be
+ more terse about it). */
void
-syms_from_objfile (objfile, addr, mainline)
+syms_from_objfile (objfile, addr, mainline, verbo)
struct objfile *objfile;
CORE_ADDR addr;
int mainline;
+ int verbo;
{
asection *text_sect;
struct sym_fns *sf;
addr = bfd_section_vma (sym_bfd, text_sect);
}
- clear_complaints(); /* Allow complaints to appear for this new file. */
+ /* Allow complaints to appear for this new file, and record how
+ verbose to be. */
+
+ clear_complaints(1, verbo);
(*sf->sym_read) (sf, addr, mainline);
/* If we have wiped out any old symbol tables, clean up. */
clear_symtab_users_once ();
+
+ /* We're done reading the symbol file; finish off complaints. */
+ clear_complaints(0, verbo);
}
fflush (stdout);
}
- syms_from_objfile (objfile, addr, mainline);
+ syms_from_objfile (objfile, addr, mainline, from_tty);
if (from_tty)
{
static unsigned stop_whining = 0;
+/* Should each complaint be self explanatory, or should we assume that
+ a series of complaints is being produced?
+ case 0: self explanatory message.
+ case 1: First message of a series that must start off with explanation.
+ case 2: Subsequent message, when user already knows we are reading
+ symbols and we can just state our piece. */
+
+static int complaint_series = 0;
+
/* Print a complaint about the input symbols, and link the complaint block
into a chain for later handling. */
if (complaint->counter > stop_whining)
return;
wrap_here ("");
- if (!info_verbose) {
+
+ switch (complaint_series + (info_verbose << 1)) {
+
+ /* Isolated messages, must be self-explanatory. */
+ case 0:
+ puts_filtered ("During symbol reading, ");
+ wrap_here("");
+ printf_filtered (complaint->message, val);
+ puts_filtered (".\n");
+ break;
+
+ /* First of a series, without `set verbose'. */
+ case 1:
puts_filtered ("During symbol reading...");
+ printf_filtered (complaint->message, val);
+ puts_filtered ("...");
+ wrap_here("");
+ complaint_series++;
+ break;
+
+ /* Subsequent messages of a series, or messages under `set verbose'.
+ (We'll already have produced a "Reading in symbols for XXX..." message
+ and will clean up at the end with a newline.) */
+ default:
+ printf_filtered (complaint->message, val);
+ puts_filtered ("...");
+ wrap_here("");
}
- printf_filtered (complaint->message, val);
- puts_filtered ("...");
- wrap_here("");
- if (!info_verbose)
- puts_filtered ("\n");
}
-/* Clear out all complaint counters that have ever been incremented. */
+/* Clear out all complaint counters that have ever been incremented.
+ If sym_reading is 1, be less verbose about successive complaints,
+ since the messages are appearing all together during a command that
+ reads symbols (rather than scattered around as psymtabs get fleshed
+ out into symtabs at random times). If noisy is 1, we are in a
+ noisy symbol reading command, and our caller will print enough
+ context for the user to figure it out. */
void
-clear_complaints ()
+clear_complaints (sym_reading, noisy)
+ int sym_reading;
+ int noisy;
{
struct complaint *p;
for (p = complaint_root->next; p != complaint_root; p = p->next)
p->counter = 0;
+
+ if (!sym_reading && !noisy && complaint_series > 1) {
+ /* Terminate previous series, since caller won't. */
+ puts_filtered ("\n");
+ }
+
+ complaint_series = sym_reading? 1 + noisy: 0;
}
\f
enum language
for access from GDB.");
add_show_from_set
- (add_set_cmd ("complaints", class_support, var_uinteger,
+ (add_set_cmd ("complaints", class_support, var_zinteger,
(char *)&stop_whining,
"Set max number of complaints about incorrect symbols.",
&setlist),