aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog31
-rw-r--r--gdb/corefile.c34
-rw-r--r--gdb/corelow.c65
-rw-r--r--gdb/gnu-nat.c1
-rw-r--r--gdb/inftarg.c1
-rw-r--r--gdb/mac-nat.c1
-rw-r--r--gdb/monitor.c1
-rw-r--r--gdb/ppc-bdm.c1
-rw-r--r--gdb/remote-adapt.c1
-rw-r--r--gdb/remote-array.c1
-rw-r--r--gdb/remote-bug.c1
-rw-r--r--gdb/remote-e7000.c1
-rw-r--r--gdb/remote-eb.c1
-rw-r--r--gdb/remote-es.c2
-rw-r--r--gdb/remote-mm.c1
-rw-r--r--gdb/remote-nindy.c1
-rw-r--r--gdb/remote-nrom.c1
-rw-r--r--gdb/remote-os9k.c1
-rw-r--r--gdb/remote-rdp.c1
-rw-r--r--gdb/remote-sim.c1
-rw-r--r--gdb/remote-st.c1
-rw-r--r--gdb/target.c18
-rw-r--r--gdb/target.h1
-rw-r--r--gdb/v850ice.c1
24 files changed, 37 insertions, 132 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8716961..ee3364d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,34 @@
+2001-04-14 J.T. Conklin <jtc@redback.com>
+
+ * 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 <fnasser@redhat.com>
From Adam Mirowski <Adam.Mirowski@Sun.COM>
diff --git a/gdb/corefile.c b/gdb/corefile.c
index 716bb04..846208e 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -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);
}
diff --git a/gdb/corelow.c b/gdb/corelow.c
index f03a9ea..127b891 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -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;
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 3ec3352..7feac1c 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -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 */
diff --git a/gdb/inftarg.c b/gdb/inftarg.c
index b5130d7..18a42f1 100644
--- a/gdb/inftarg.c
+++ b/gdb/inftarg.c
@@ -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;
diff --git a/gdb/mac-nat.c b/gdb/mac-nat.c
index 1a1daca..23da860 100644
--- a/gdb/mac-nat.c
+++ b/gdb/mac-nat.c
@@ -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;
diff --git a/gdb/monitor.c b/gdb/monitor.c
index e3a74dc..15b11d5 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -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;
diff --git a/gdb/ppc-bdm.c b/gdb/ppc-bdm.c
index faa35f3..7aae995 100644
--- a/gdb/ppc-bdm.c
+++ b/gdb/ppc-bdm.c
@@ -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;
diff --git a/gdb/remote-adapt.c b/gdb/remote-adapt.c
index c52560b..10139b4 100644
--- a/gdb/remote-adapt.c
+++ b/gdb/remote-adapt.c
@@ -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;
diff --git a/gdb/remote-array.c b/gdb/remote-array.c
index df6bf18..10f9c90 100644
--- a/gdb/remote-array.c
+++ b/gdb/remote-array.c
@@ -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;
diff --git a/gdb/remote-bug.c b/gdb/remote-bug.c
index 96c2491..498edc6 100644
--- a/gdb/remote-bug.c
+++ b/gdb/remote-bug.c
@@ -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;
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index 10a329a..0f63703 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -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;
diff --git a/gdb/remote-eb.c b/gdb/remote-eb.c
index 476b150..aa7608c 100644
--- a/gdb/remote-eb.c
+++ b/gdb/remote-eb.c
@@ -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;
diff --git a/gdb/remote-es.c b/gdb/remote-es.c
index 19ec208..11653e9 100644
--- a/gdb/remote-es.c
+++ b/gdb/remote-es.c
@@ -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;
diff --git a/gdb/remote-mm.c b/gdb/remote-mm.c
index ed72d4b..ccbacc5 100644
--- a/gdb/remote-mm.c
+++ b/gdb/remote-mm.c
@@ -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;
diff --git a/gdb/remote-nindy.c b/gdb/remote-nindy.c
index 34bf17e..419a1b1 100644
--- a/gdb/remote-nindy.c
+++ b/gdb/remote-nindy.c
@@ -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;
diff --git a/gdb/remote-nrom.c b/gdb/remote-nrom.c
index 61e61aa..9b6b047 100644
--- a/gdb/remote-nrom.c
+++ b/gdb/remote-nrom.c
@@ -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;
diff --git a/gdb/remote-os9k.c b/gdb/remote-os9k.c
index 8694ee6..08b35fd 100644
--- a/gdb/remote-os9k.c
+++ b/gdb/remote-os9k.c
@@ -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;
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index 573e080..f680960 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -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;
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 3f4975c..890970f 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -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;
diff --git a/gdb/remote-st.c b/gdb/remote-st.c
index cc10a36..b341aeb 100644
--- a/gdb/remote-st.c
+++ b/gdb/remote-st.c
@@ -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;
diff --git a/gdb/target.c b/gdb/target.c
index f21518f..a60405f 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -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;
}
diff --git a/gdb/target.h b/gdb/target.h
index 22c152f..6d41029 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -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 */
diff --git a/gdb/v850ice.c b/gdb/v850ice.c
index 887b813..704d2a2 100644
--- a/gdb/v850ice.c
+++ b/gdb/v850ice.c
@@ -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;