]> Git Repo - binutils.git/commitdiff
* target.h (target_ops): Removed to_core_file_to_sym_file vector
authorJ.T. Conklin <[email protected]>
Sat, 14 Apr 2001 19:23:02 +0000 (19:23 +0000)
committerJ.T. Conklin <[email protected]>
Sat, 14 Apr 2001 19:23:02 +0000 (19:23 +0000)
function.
* corelow.c (core_ops): Updated for above change.
* gnu-nat.c (core_ops): Likewise.
* inftarg.c (child_ops): Likewise.
* monitor.c (monitor_ops): Likewise.
* ppc-bdm.c (bdm_ppc_ops): Likewise.
* remote-adapt.c (adapt_ops): Likewise.
* remote-bug.c (bug_ops): Likewise.
* remote-e7000.c (e7000_ops): Likewise.
* remote-eb.c (eb_ops): Likewise.
* remote-es.c (es1800_ops, es1800_child_ops): Likewise.
* remote-mm.c (mm_ops): Likewise.
* remote-nindy.c (nindy_ops): Likewise.
* remote-nrom.c (nrom_ops): Likewise.
* remote-os9k.c (rombug_ops): Likewise.
* remote-rdp.c (remote_rdp_ops): Likewise.
* remote-sim.c (gdbsim_ops): Likewise.
* remote-st.c (st2000_ops): Likewise.
* v850ice.c (v850ice_ops): Likewise.
* target.c (cleanup_target): Likewise
(update_current_target): Likewise.
(setup_target_debug): Likewise
(debug_to_core_file_to_sym_file): Removed.

* corefile.c (core_file_command) [HPUXHPPA]: Removed code that
sets symbol file from information obtained from the core file.
* corelow.c (core_file_to_sym_file): Removed.

24 files changed:
gdb/ChangeLog
gdb/corefile.c
gdb/corelow.c
gdb/gnu-nat.c
gdb/inftarg.c
gdb/mac-nat.c
gdb/monitor.c
gdb/ppc-bdm.c
gdb/remote-adapt.c
gdb/remote-array.c
gdb/remote-bug.c
gdb/remote-e7000.c
gdb/remote-eb.c
gdb/remote-es.c
gdb/remote-mm.c
gdb/remote-nindy.c
gdb/remote-nrom.c
gdb/remote-os9k.c
gdb/remote-rdp.c
gdb/remote-sim.c
gdb/remote-st.c
gdb/target.c
gdb/target.h
gdb/v850ice.c

index 8716961d68410164b1c4763796d21324d4f65fc7..ee3364d4287535d86ff646bfe6e5fe09c898bb59 100644 (file)
@@ -1,3 +1,34 @@
+2001-04-14  J.T. Conklin  <[email protected]>
+       
+       * target.h (target_ops): Removed to_core_file_to_sym_file vector
+       function.
+       * corelow.c (core_ops): Updated for above change.
+       * gnu-nat.c (core_ops): Likewise.
+       * inftarg.c (child_ops): Likewise.
+       * monitor.c (monitor_ops): Likewise.
+       * ppc-bdm.c (bdm_ppc_ops): Likewise.
+       * remote-adapt.c (adapt_ops): Likewise.
+       * remote-bug.c (bug_ops): Likewise.
+       * remote-e7000.c (e7000_ops): Likewise.
+       * remote-eb.c (eb_ops): Likewise.
+       * remote-es.c (es1800_ops, es1800_child_ops): Likewise.
+       * remote-mm.c (mm_ops): Likewise.
+       * remote-nindy.c (nindy_ops): Likewise.
+       * remote-nrom.c (nrom_ops): Likewise.
+       * remote-os9k.c (rombug_ops): Likewise.
+       * remote-rdp.c (remote_rdp_ops): Likewise.
+       * remote-sim.c (gdbsim_ops): Likewise.
+       * remote-st.c (st2000_ops): Likewise.
+       * v850ice.c (v850ice_ops): Likewise.
+       * target.c (cleanup_target): Likewise
+       (update_current_target): Likewise.
+       (setup_target_debug): Likewise
+       (debug_to_core_file_to_sym_file): Removed.
+
+       * corefile.c (core_file_command) [HPUXHPPA]: Removed code that
+       sets symbol file from information obtained from the core file.
+       * corelow.c (core_file_to_sym_file): Removed.
+       
 2001-04-13  Fernando Nasser  <[email protected]>
 
        From  Adam Mirowski  <[email protected]>
index 716bb04735ae82db26b764087805bd2fde8b22a9..846208ed1cd086423f84fe6440a094dac7a3790b 100644 (file)
@@ -69,35 +69,13 @@ core_file_command (char *filename, int from_tty)
   dont_repeat ();              /* Either way, seems bogus. */
 
   t = find_core_target ();
-  if (t != NULL)
-    if (!filename)
-      (t->to_detach) (filename, from_tty);
-    else
-      {
-       /* Yes, we were given the path of a core file.  Do we already
-          have a symbol file?  If not, can we determine it from the
-          core file?  If we can, do so.
-        */
-#ifdef HPUXHPPA
-       if (symfile_objfile == NULL)
-         {
-           char *symfile;
-           symfile = t->to_core_file_to_sym_file (filename);
-           if (symfile)
-             {
-               char *symfile_copy = xstrdup (symfile);
-
-               make_cleanup (xfree, symfile_copy);
-               symbol_file_add_main (symfile_copy, from_tty);
-             }
-           else
-             warning ("Unknown symbols for '%s'; use the 'symbol-file' command.", filename);
-         }
-#endif
-       (t->to_open) (filename, from_tty);
-      }
-  else
+  if (t == NULL)
     error ("GDB can't read core files on this machine.");
+
+  if (!filename)
+    (t->to_detach) (filename, from_tty);
+  else
+    (t->to_open) (filename, from_tty);
 }
 \f
 
index f03a9eab75dac202320c40f95e3a9bdeea90e75b..127b891aa502d405faf6ec69691dcb9733588367 100644 (file)
@@ -77,8 +77,6 @@ static void add_to_thread_list (bfd *, asection *, PTR);
 
 static int ignore (CORE_ADDR, char *);
 
-static char *core_file_to_sym_file (char *);
-
 static int core_file_thread_alive (int tid);
 
 static void init_core_ops (void);
@@ -464,68 +462,6 @@ get_core_registers (int regno)
   registers_fetched ();
 }
 
-static char *
-core_file_to_sym_file (char *core)
-{
-  CONST char *failing_command;
-  char *p;
-  char *temp;
-  bfd *temp_bfd;
-  int scratch_chan;
-
-  if (!core)
-    error ("No core file specified.");
-
-  core = tilde_expand (core);
-  if (core[0] != '/')
-    {
-      temp = concat (current_directory, "/", core, NULL);
-      core = temp;
-    }
-
-  scratch_chan = open (core, write_files ? O_RDWR : O_RDONLY, 0);
-  if (scratch_chan < 0)
-    perror_with_name (core);
-
-  temp_bfd = bfd_fdopenr (core, gnutarget, scratch_chan);
-  if (temp_bfd == NULL)
-    perror_with_name (core);
-
-  if (!bfd_check_format (temp_bfd, bfd_core))
-    {
-      /* Do it after the err msg */
-      /* FIXME: should be checking for errors from bfd_close (for one thing,
-         on error it does not free all the storage associated with the
-         bfd).  */
-      make_cleanup_bfd_close (temp_bfd);
-      error ("\"%s\" is not a core dump: %s",
-            core, bfd_errmsg (bfd_get_error ()));
-    }
-
-  /* Find the data section */
-  if (build_section_table (temp_bfd, &core_ops.to_sections,
-                          &core_ops.to_sections_end))
-    error ("\"%s\": Can't find sections: %s",
-          bfd_get_filename (temp_bfd), bfd_errmsg (bfd_get_error ()));
-
-  failing_command = bfd_core_file_failing_command (temp_bfd);
-
-  bfd_close (temp_bfd);
-
-  /* If we found a filename, remember that it is probably saved
-     relative to the executable that created it.  If working directory
-     isn't there now, we may not be able to find the executable.  Rather
-     than trying to be sauve about finding it, just check if the file
-     exists where we are now.  If not, then punt and tell our client
-     we couldn't find the sym file.
-   */
-  p = (char *) failing_command;
-  if ((p != NULL) && (access (p, F_OK) != 0))
-    p = NULL;
-
-  return p;
-}
-
 static void
 core_files_info (struct target_ops *t)
 {
@@ -577,7 +513,6 @@ init_core_ops (void)
   core_ops.to_create_inferior = find_default_create_inferior;
   core_ops.to_clone_and_follow_inferior = find_default_clone_and_follow_inferior;
   core_ops.to_thread_alive = core_file_thread_alive;
-  core_ops.to_core_file_to_sym_file = core_file_to_sym_file;
   core_ops.to_stratum = core_stratum;
   core_ops.to_has_memory = 1;
   core_ops.to_has_stack = 1;
index 3ec33520fbe013b72fd138d91e5073c94ceedf94..7feac1c324780ccc9ca230f3a8673a6704e9f0c7 100644 (file)
@@ -2561,7 +2561,6 @@ init_gnu_ops (void)
   gnu_ops.to_pid_to_str = gnu_pid_to_str;   /* to_pid_to_str */
   gnu_ops.to_stop = gnu_stop;  /* to_stop */
   gnu_ops.to_pid_to_exec_file = gnu_pid_to_exec_file; /* to_pid_to_exec_file */
-  gnu_ops.to_core_file_to_sym_file = NULL;
   gnu_ops.to_stratum = process_stratum;                /* to_stratum */
   gnu_ops.DONT_USE = 0;                        /* to_next */
   gnu_ops.to_has_all_memory = 1;       /* to_has_all_memory */
index b5130d7e0857a485746bf8c0bd89ae0e07c232d6..18a42f12dc6f432adbdadbccc6354c71d6c186bb 100644 (file)
@@ -797,7 +797,6 @@ init_child_ops (void)
   child_ops.to_enable_exception_callback = child_enable_exception_callback;
   child_ops.to_get_current_exception_event = child_get_current_exception_event;
   child_ops.to_pid_to_exec_file = child_pid_to_exec_file;
-  child_ops.to_core_file_to_sym_file = child_core_file_to_sym_file;
   child_ops.to_stratum = process_stratum;
   child_ops.to_has_all_memory = 1;
   child_ops.to_has_memory = 1;
index 1a1daca454454bf82b401402dcc0fb4e835d3a6f..23da860498d5859926d28f8ab7fcb803ab098ddf 100644 (file)
@@ -381,7 +381,6 @@ init_child_ops (void)
   child_ops.to_thread_alive = 0;
   child_ops.to_stop = child_stop;
   child_ops.to_pid_to_exec_file = NULL;                /* to_pid_to_exec_file */
-  child_ops.to_core_file_to_sym_file = NULL;
   child_ops.to_stratum = process_stratum;
   child_ops.DONT_USE = 0;
   child_ops.to_has_all_memory = 1;
index e3a74dc92075e4916f2329568de1c58357f251c6..15b11d56e4b2ed6cdacc1e3f93b85fb7c677ac78 100644 (file)
@@ -2309,7 +2309,6 @@ init_base_monitor_ops (void)
   monitor_ops.to_stop = monitor_stop;
   monitor_ops.to_rcmd = monitor_rcmd;
   monitor_ops.to_pid_to_exec_file = NULL;
-  monitor_ops.to_core_file_to_sym_file = NULL;
   monitor_ops.to_stratum = process_stratum;
   monitor_ops.DONT_USE = 0;
   monitor_ops.to_has_all_memory = 1;
index faa35f33ed521397d854c3a7f6c06d7bb98ca9fe..7aae995c40f20a1a82c973c431fe50b2a1b79f63 100644 (file)
@@ -364,7 +364,6 @@ a wiggler, specify wiggler and then the port it is connected to\n\
   bdm_ppc_ops.to_thread_alive = ocd_thread_alive;
   bdm_ppc_ops.to_stop = ocd_stop;
   bdm_ppc_ops.to_pid_to_exec_file = NULL;
-  bdm_ppc_ops.to_core_file_to_sym_file = NULL;
   bdm_ppc_ops.to_stratum = process_stratum;
   bdm_ppc_ops.DONT_USE = NULL;
   bdm_ppc_ops.to_has_all_memory = 1;
index c52560b0f3f772266d9f13df2f6b4e3482e54d93..10139b44f1b7b5b115fc164e2196717ba24c5440 100644 (file)
@@ -1502,7 +1502,6 @@ init_adapt_ops (void)
   adapt_ops.to_thread_alive = 0;
   adapt_ops.to_stop = 0;       /* process_stratum; */
   adapt_ops.to_pid_to_exec_file = NULL;
-  adapt_ops.to_core_file_to_sym_file = NULL;
   adapt_ops.to_stratum = 0;
   adapt_ops.DONT_USE = 0;
   adapt_ops.to_has_all_memory = 1;
index df6bf186434b45cd9c48b711c944cd015d4f6ebe..10f9c9045afba0a903122008bd1a270b1736826b 100644 (file)
@@ -178,7 +178,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
   array_ops.to_thread_alive = 0;
   array_ops.to_stop = 0;
   array_ops.to_pid_to_exec_file = NULL;
-  array_ops.to_core_file_to_sym_file = NULL;
   array_ops.to_stratum = process_stratum;
   array_ops.DONT_USE = 0;
   array_ops.to_has_all_memory = 1;
index 96c24913a731cacb5a1e0be594c2cdb197c812d4..498edc6e5b3f5770e44abef5f889940acac45818 100644 (file)
@@ -946,7 +946,6 @@ init_bug_ops (void)
   bug_ops.to_thread_alive = 0;
   bug_ops.to_stop = 0;
   bug_ops.to_pid_to_exec_file = NULL;
-  bug_ops.to_core_file_to_sym_file = NULL;
   bug_ops.to_stratum = process_stratum;
   bug_ops.DONT_USE = 0;
   bug_ops.to_has_all_memory = 1;
index 10a329aad5d0880d67233762af3c755b91c7e714..0f63703df47c1b87e0baa68b2f608c18abac365b 100644 (file)
@@ -2199,7 +2199,6 @@ target e7000 foobar";
   e7000_ops.to_thread_alive = 0;
   e7000_ops.to_stop = e7000_stop;
   e7000_ops.to_pid_to_exec_file = NULL;
-  e7000_ops.to_core_file_to_sym_file = NULL;
   e7000_ops.to_stratum = process_stratum;
   e7000_ops.DONT_USE = 0;
   e7000_ops.to_has_all_memory = 1;
index 476b1507367425fe89cd4c299484e3b806d62f2b..aa7608c28e31502f54d83cd29f30bc3dc905b154 100644 (file)
@@ -1068,7 +1068,6 @@ target amd-eb /dev/ttya 9600 demo",
   eb_ops.to_thread_alive = 0;  /* thread-alive */
   eb_ops.to_stop = 0;          /* to_stop */
   eb_ops.to_pid_to_exec_file = NULL;
-  eb_ops.to_core_file_to_sym_file = NULL;
   eb_ops.to_stratum = process_stratum;
   eb_ops.DONT_USE = 0;         /* next */
   eb_ops.to_has_all_memory = 1;
index 19ec2083efca302a9b6005ade975ee72ac1e29b3..11653e9b2d3ff1409282e8144c01943650382679 100644 (file)
@@ -2026,7 +2026,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
   es1800_ops.to_thread_alive = 0;
   es1800_ops.to_stop = 0;
   es1800_ops.to_pid_to_exec_file = NULL;
-  es1800_ops.to_core_file_to_sym_file = NULL;
   es1800_ops.to_stratum = core_stratum;
   es1800_ops.DONT_USE = 0;
   es1800_ops.to_has_all_memory = 0;
@@ -2099,7 +2098,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
   es1800_child_ops.to_thread_alive = 0;
   es1800_child_ops.to_stop = 0;
   es1800_child_ops.to_pid_to_exec_file = NULL;
-  es1800_child_ops.to_core_file_to_sym_file = NULL;
   es1800_child_ops.to_stratum = process_stratum;
   es1800_child_ops.DONT_USE = 0;
   es1800_child_ops.to_has_all_memory = 1;
index ed72d4bb6426f5bfd4a4c54cf9923917069d8e55..ccbacc5cee2f720ed35b750efa4e2ba792818ce0 100644 (file)
@@ -1821,7 +1821,6 @@ init_mm_ops (void)
   mm_ops.to_thread_alive = 0;
   mm_ops.to_stop = 0;
   mm_ops.to_pid_to_exec_file = NULL;
-  mm_ops.to_core_file_to_sym_file = NULL;
   mm_ops.to_stratum = process_stratum;
   mm_ops.DONT_USE = 0;
   mm_ops.to_has_all_memory = 1;
index 34bf17e9b0135f467a39df4a2bff9f9053d53fc1..419a1b15c1f8bd3bc9f94d130423cd2a97f4ba8d 100644 (file)
@@ -738,7 +738,6 @@ specified when you started GDB.";
   nindy_ops.to_thread_alive = 0;       /* to_thread_alive */
   nindy_ops.to_stop = 0;       /* to_stop */
   nindy_ops.to_pid_to_exec_file = NULL;
-  nindy_ops.to_core_file_to_sym_file = NULL;
   nindy_ops.to_stratum = process_stratum;
   nindy_ops.DONT_USE = 0;      /* next */
   nindy_ops.to_has_all_memory = 1;
index 61e61aa99cd71a91af22fb7382e38545a287b7d5..9b6b0477fcb90e51eebfa2ce7452736f5bafcadd 100644 (file)
@@ -317,7 +317,6 @@ init_nrom_ops (void)
   nrom_ops.to_thread_alive = 0;
   nrom_ops.to_stop = 0;
   nrom_ops.to_pid_to_exec_file = NULL;
-  nrom_ops.to_core_file_to_sym_file = NULL;
   nrom_ops.to_stratum = download_stratum;
   nrom_ops.DONT_USE = NULL;
   nrom_ops.to_has_all_memory = 1;
index 8694ee6a63c763c3533ece7bd63c5d5c85cd35ce..08b35fd03f0100fafcd89518084991f27a77280b 100644 (file)
@@ -1169,7 +1169,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
   rombug_ops.to_thread_alive = 0;
   rombug_ops.to_stop = 0;      /* to_stop */
   rombug_ops.to_pid_to_exec_file = NULL;
-  rombug_ops.to_core_file_to_sym_file = NULL;
   rombug_ops.to_stratum = process_stratum;
   rombug_ops.DONT_USE = 0;     /* next */
   rombug_ops.to_has_all_memory = 1;
index 573e080ce9f1024ad189150a885813755974e553..f680960303b47ebd1ec80620a69d100df57a2b0e 100644 (file)
@@ -1433,7 +1433,6 @@ init_remote_rdp_ops (void)
   remote_rdp_ops.to_thread_alive = 0;
   remote_rdp_ops.to_stop = 0;
   remote_rdp_ops.to_pid_to_exec_file = NULL;
-  remote_rdp_ops.to_core_file_to_sym_file = NULL;
   remote_rdp_ops.to_stratum = process_stratum;
   remote_rdp_ops.DONT_USE = NULL;
   remote_rdp_ops.to_has_all_memory = 1;
index 3f4975c83ded846a3b006c57ede9aceeaa5ecd6f..890970f7e9b4b54fdbb55e9ea288186195ce0642 100644 (file)
@@ -915,7 +915,6 @@ init_gdbsim_ops (void)
   gdbsim_ops.to_thread_alive = 0;
   gdbsim_ops.to_stop = gdbsim_stop;
   gdbsim_ops.to_pid_to_exec_file = NULL;
-  gdbsim_ops.to_core_file_to_sym_file = NULL;
   gdbsim_ops.to_stratum = process_stratum;
   gdbsim_ops.DONT_USE = NULL;
   gdbsim_ops.to_has_all_memory = 1;
index cc10a3601f9b19ad9e5a17a5a4d4ae31cbac60e5..b341aeb5f64536d6eff09aaec9ad9c4d20c35dcf 100644 (file)
@@ -807,7 +807,6 @@ the speed to connect at in bits per second.";
   st2000_ops.to_thread_alive = 0;      /* thread alive */
   st2000_ops.to_stop = 0;      /* to_stop */
   st2000_ops.to_pid_to_exec_file = NULL;
-  st2000_run_ops.to_core_file_to_sym_file = NULL;
   st2000_ops.to_stratum = process_stratum;
   st2000_ops.DONT_USE = 0;     /* next */
   st2000_ops.to_has_all_memory = 1;
index f21518ff04de4ad8a437227e046e640981195870..a60405f658aaf5686b4803f70af1845c091a66bb 100644 (file)
@@ -503,9 +503,6 @@ cleanup_target (struct target_ops *t)
   de_fault (to_pid_to_exec_file, 
            (char *(*) (int)) 
            return_zero);
-  de_fault (to_core_file_to_sym_file, 
-           (char *(*) (char *)) 
-           return_zero);
   de_fault (to_can_async_p, 
            (int (*) (void)) 
            return_zero);
@@ -599,7 +596,6 @@ update_current_target (void)
       INHERIT (to_enable_exception_callback, t);
       INHERIT (to_get_current_exception_event, t);
       INHERIT (to_pid_to_exec_file, t);
-      INHERIT (to_core_file_to_sym_file, t);
       INHERIT (to_stratum, t);
       INHERIT (DONT_USE, t);
       INHERIT (to_has_all_memory, t);
@@ -2873,19 +2869,6 @@ debug_to_pid_to_exec_file (int pid)
   return exec_file;
 }
 
-static char *
-debug_to_core_file_to_sym_file (char *core)
-{
-  char *sym_file;
-
-  sym_file = debug_target.to_core_file_to_sym_file (core);
-
-  fprintf_unfiltered (gdb_stdlog, "target_core_file_to_sym_file (%s) = %s\n",
-                     core, sym_file);
-
-  return sym_file;
-}
-
 static void
 setup_target_debug (void)
 {
@@ -2946,7 +2929,6 @@ setup_target_debug (void)
   current_target.to_enable_exception_callback = debug_to_enable_exception_callback;
   current_target.to_get_current_exception_event = debug_to_get_current_exception_event;
   current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file;
-  current_target.to_core_file_to_sym_file = debug_to_core_file_to_sym_file;
 
 }
 \f
index 22c152f6d85b0ada30b489b006130324fa476914..6d41029ede0b012fb622d2306b611cb0b4773be4 100644 (file)
@@ -294,7 +294,6 @@ struct target_ops
                                                             int);
     struct exception_event_record *(*to_get_current_exception_event) (void);
     char *(*to_pid_to_exec_file) (int pid);
-    char *(*to_core_file_to_sym_file) (char *);
     enum strata to_stratum;
     struct target_ops
      *DONT_USE;                        /* formerly to_next */
index 887b813589b85e629c59b47348a666a86667b11d..704d2a2f895b6868e2187325af6f020a5b484be0 100644 (file)
@@ -931,7 +931,6 @@ init_850ice_ops (void)
   v850ice_ops.to_thread_alive = NULL;
   v850ice_ops.to_stop = v850ice_stop;
   v850ice_ops.to_pid_to_exec_file = NULL;
-  v850ice_ops.to_core_file_to_sym_file = NULL;
   v850ice_ops.to_stratum = process_stratum;
   v850ice_ops.DONT_USE = NULL;
   v850ice_ops.to_has_all_memory = 1;
This page took 0.054027 seconds and 4 git commands to generate.