aboutsummaryrefslogtreecommitdiff
path: root/gdb/mipsread.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-05-03 01:07:12 +0000
committerJohn Gilmore <gnu@cygnus>1991-05-03 01:07:12 +0000
commit8ffd75c8a93075fb4a23bda7ae66e3b579038c6b (patch)
tree49685682ddada743c17ff32ee585d5c03b1054d7 /gdb/mipsread.c
parent2bff8e38bcfa1cbc460bd605e6907bc99158a096 (diff)
downloadgdb-8ffd75c8a93075fb4a23bda7ae66e3b579038c6b.zip
gdb-8ffd75c8a93075fb4a23bda7ae66e3b579038c6b.tar.gz
gdb-8ffd75c8a93075fb4a23bda7ae66e3b579038c6b.tar.bz2
Mips bringup and general cleanup
* cplus-dem.c: Move CPLUS_MARKER define to after defs.h. * infptrace.c (PT_WRITE_D, PT_READ_D): Use correct values. (This still doesn't seem to make MIPS bkpts work.) * mipsread.c: Remove dup "Reading symbol data..." msg. (symbol_file_command, add_file_command): Remove, obsol. * printcmd.c (ptype_command): Say "an enum" rather than "a enum". Wrap output appropriately. * stack.c (locals_info, catch_info, args_info): Check selected_frame rather than target_has_stack or coredumping. * valprint.c (type_print_varspec_suffix): Wrap "ptype" output of enums appropriately.
Diffstat (limited to 'gdb/mipsread.c')
-rw-r--r--gdb/mipsread.c234
1 files changed, 0 insertions, 234 deletions
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index 1e1202c..ce7f5ef 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -224,8 +224,6 @@ mipscoff_symfile_read(sf, addr, mainline)
/* Now that the executable file is positioned at symbol table,
process it and define symbols accordingly. */
- printf("Reading symbol data from %s...", name);
- fflush(stdout);
read_mips_symtab(desc, 0);
/* patch_opaque_types ();*/
@@ -248,235 +246,6 @@ mipscoff_symfile_discard()
{
}
-
-#if 0
-/* Exported procedure: Reads symbols from file NAME.
- Invoked at startup time if executable was given.
- When invoked cleans up the world */
-
-void
-symbol_file_command(name, from_tty)
- char *name;
- int from_tty;
-{
- int desc;
- struct coff_exec hdr;
- register int val;
- extern void close();
- struct cleanup *old_chain;
-
- dont_repeat();
-
- /*
- * Make sure s/he means it
- */
- if (name == 0) {
- if ((symtab_list || partial_symtab_list)
- && from_tty
- && !query("Discard symbol table? ", 0))
- error("Not confirmed.");
- destroy_all_symtabs();
- return;
- }
-
- name = tilde_expand(name);
- make_cleanup(free, name);
-
- if (symtab_list &&
- !query("Load new symbol table from \"%s\"? ", name))
- error("Not confirmed.");
-
- /* Open the file */
- {
- char *absolute_name;
- desc = openp (getenv ("PATH"), 1, name, O_RDONLY, 0, &absolute_name);
- if (desc < 0)
- perror_with_name (name);
- else
- name = absolute_name;
- }
-
- old_chain = make_cleanup (close, desc);
- make_cleanup (free_current_contents, &name);
-
- /*
- * Check file is indeed executable
- */
- val = myread(desc, &hdr, sizeof hdr);
- if (val < 0)
- perror_with_name(name);
-
- if (N_BADMAG(hdr))
- error("File \"%s\" not in executable format.", name);
-
- if (hdr.a.entry < SAFE_TEXT_ADDR && access(name, 1))
- printf_filtered("Warning: %s is not executable!\n", name);
-
- if (hdr.a_syms == 0) {
- printf_filtered("%s does not have a symbol-table.\n", name);
- fflush(stdout);
- return;
- }
-
- /* Get the modification time. */
- {
- struct stat symstat;
-
- if (fstat (desc, &symstat) < 0)
- perror_with_name (name);
-
- symfile_mtime = symstat.st_mtime;
- }
-
- /*
- * Throw away the old symbol table.
- */
-
- destroy_all_symtabs();
-
- /* Make a default for file to list. */
-
- symfile = savestring (name, strlen (name));
-
- /* Prepare to remember misc symbol values */
-
- init_misc_bunches ();
- make_cleanup (discard_misc_bunches, 0);
-
- /*
- * Now read the new symbol table
- */
-
- read_mips_symtab(desc, 0);
-
- /* Go over the misc symbol bunches and install them in vector. */
-
- condense_misc_bunches (0);
-
- /* Don't allow char * to have a typename (else would get caddr_t.) */
-
- TYPE_NAME (lookup_pointer_type (builtin_type_char)) = 0;
-
- /* Force reinit of the sigtramp info */
- sigtramp_address = 0;
-
- do_cleanups (old_chain); /* Descriptor closed here */
-
- if (!partial_symtab_list)
- printf ("\n(no debugging symbols found)...");
-
- printf ("done.\n");
- fflush(stdout);
-}
-#endif
-
-/* C++:
- This function allows the addition of incrementally linked object files.
- Since this has a fair amount of code in common with symbol_file_command,
- it might be worthwhile to consolidate things, as was done with
- read_dbx_symtab and condense_misc_bunches. */
-
-/* Exported procedure: add more symbols from file NAME. */
-
-void
-add_file_command(arg_string)
- char* arg_string;
-{
- int desc;
- struct coff_exec hdr;
- register int val;
- extern void close();
- struct cleanup *old_chain;
- char *name;
- unsigned text_addr;
-
- if (arg_string == 0)
- error ("add-file takes a file name and an address");
-
- if (arg_string == 0)
- error ("add-file takes a file name and an address");
-
- arg_string = tilde_expand (arg_string);
- make_cleanup (free, arg_string);
-
- for( ; *arg_string == ' '; arg_string++ );
- name = arg_string;
- for( ; *arg_string && *arg_string != ' ' ; arg_string++ );
- *arg_string++ = (char) 0;
-
- if (name[0] == 0)
- error ("add-file takes a file name and an address");
-
- text_addr = parse_and_eval_address (arg_string);
-
- dont_repeat();
-
- if (!query ("add symbol table from filename \"%s\" at text_addr = 0x%x\n",
- name, text_addr))
- error ("Not confirmed.");
-
- /*
- * Open the file
- */
- {
- char *absolute_name;
-
- desc = openp(getenv("PATH"), 1, name, O_RDONLY, 0, &absolute_name);
- if (desc < 0)
- perror_with_name(name);
- else
- name = absolute_name;
- }
- old_chain = make_cleanup (close, desc);
-
-
- /*
- * Check file is indeed executable
- */
- val = myread(desc, &hdr, sizeof hdr);
- if (val < 0)
- perror_with_name(name);
-
- if (N_BADMAG(hdr))
- error("File \"%s\" not in executable format.", name);
-
- if (hdr.a.entry < SAFE_TEXT_ADDR && access(name, 1))
- printf_filtered("Warning: %s is not executable!\n", name);
-
- if (hdr.a_syms == 0) {
- printf_filtered("%s does not have a symbol-table.\n", name);
- fflush(stdout);
- return;
- }
-
- if (symfile)
- free(symfile);
- symfile = 0;
-
- /*
- * Now read the new symbol table
- */
-
- symfile = savestring(name, strlen(name));
-
- init_misc_bunches ();
- make_cleanup (discard_misc_bunches, 0);
- read_mips_symtab(desc, 1);
-
- /* Go over the misc symbol bunches and install them in vector. */
-
- condense_misc_bunches (1);
-
- /* Don't allow char * to have a typename (else would get caddr_t.) */
-
- TYPE_NAME (lookup_pointer_type (builtin_type_char)) = 0;
-
- do_cleanups (old_chain);
-
- printf_filtered("done.\n");
- fflush(stdout);
-}
-
/* Exported procedure: Allocate zeroed memory */
char *xzalloc(size)
@@ -2868,9 +2637,6 @@ _initialize_mipsread ()
bzero (&global_psymbols, sizeof (global_psymbols));
bzero (&static_psymbols, sizeof (static_psymbols));
- add_com("add-file", class_files, add_file_command,
- "Add a new symbol table (in mips format) from file FILE.");
-
/* Missing basic types */
builtin_type_string = make_type(TYPE_CODE_PASCAL_ARRAY,
1, 0, "string");