* 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"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.
This commit is contained in:
John Gilmore 1991-12-04 08:36:17 +00:00
parent 01a8219f15
commit 4369a1406f
4 changed files with 89 additions and 23 deletions

View File

@ -1,10 +1,22 @@
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

View File

@ -17,7 +17,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <stdio.h>
#include "defs.h"
#include "command.h"
#include "gdbcmd.h"
#include "symtab.h"
#include "value.h"
#include <ctype.h>
@ -1152,7 +1152,7 @@ make_command (arg, from_tty)
}
static void
user_info_1 (c, stream)
show_user_1 (c, stream)
struct cmd_list_element *c;
FILE *stream;
{
@ -1172,7 +1172,7 @@ user_info_1 (c, stream)
/* ARGSUSED */
static void
user_info (args, from_tty)
show_user (args, from_tty)
char *args;
int from_tty;
{
@ -1184,14 +1184,14 @@ user_info (args, 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);
}
}
}
@ -1206,7 +1206,8 @@ With no arguments, run an inferior shell.");
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);
}

View File

@ -475,13 +475,16 @@ psymtab_to_symtab (pst)
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;
@ -531,7 +534,10 @@ syms_from_objfile (objfile, addr, mainline)
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);
@ -550,6 +556,9 @@ syms_from_objfile (objfile, 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);
}
@ -600,7 +609,7 @@ symbol_file_add (name, from_tty, addr, mainline)
fflush (stdout);
}
syms_from_objfile (objfile, addr, mainline);
syms_from_objfile (objfile, addr, mainline, from_tty);
if (from_tty)
{
@ -916,6 +925,15 @@ fill_in_vptr_fieldno (type)
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. */
@ -932,25 +950,60 @@ complain (complaint, val)
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;
}
enum language
@ -1268,7 +1321,7 @@ The second argument provides the starting address of the file's text.");
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),

View File

@ -299,7 +299,7 @@ map_vmap (bfd *bf, bfd *arch)
if (exec_bfd && !obj) {
name = savestring (bfd_get_filename (bf), strlen (bfd_get_filename (bf)));
obj = allocate_objfile (bf, name);
syms_from_objfile (obj, 0, 0);
syms_from_objfile (obj, 0, 0, 0);
}
/* find the end of the list, and append. */