From c0edd9edadfe292d00ea18c410f73cafa2657beb Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 19 Jul 2010 17:51:25 +0000 Subject: gdb/ Make core files the process_stratum. * corefile.c (core_target): New variable. (core_file_command): Remove variable t, use core_target. * corelow.c (core_ops): Make it static. (init_core_ops): Change to process_stratum. Initialize CORE_TARGET. * defs.h (make_cleanup_unpush_target): New prototype. * gdbarch.h: Regenerate. * gdbarch.sh (core_pid_to_str): Remove core_stratum from its comment. * gdbcore.h (core_target): New declaration. * inf-ptrace.c (inf_ptrace_create_inferior, inf_ptrace_attach): New variables ops_already_pushed and back_to. Use push_target, make_cleanup_unpush_target and discard_cleanups calls. * record.c (record_open): Replace core_stratum by a core_bfd check. * target.c (target_is_pushed): New function. (find_core_target): Remove. * target.h (enum strata) : Remove. (target_is_pushed): New declaration. (find_core_target): Remove declaration. * tracepoint.c (init_tfile_ops) : Remove comment. * utils.c (do_unpush_target, make_cleanup_unpush_target): New functions. gdb/doc/ Make core files the process_stratum. * gdb.texinfo (Active Targets): Remove core_stratum. Include record_stratum example. gdb/testsuite/ Make core files the process_stratum. * gdb.base/corefile.exp (run: load core again) (run: sanity check we see the core file, run: with core) (run: core file is cleared, attach: load core again) (attach: sanity check we see the core file, attach: with core) (attach: core file is cleared): New tests. * gdb.base/coremaker.c (main): New parameters. Implement "sleep" argv. --- gdb/tracepoint.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'gdb/tracepoint.c') diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 28ba550..80be63e 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -4098,8 +4098,6 @@ init_tfile_ops (void) tfile_ops.to_get_trace_status = tfile_get_trace_status; tfile_ops.to_trace_find = tfile_trace_find; tfile_ops.to_get_trace_state_variable_value = tfile_get_trace_state_variable_value; - /* core_stratum might seem more logical, but GDB doesn't like having - more than one core_stratum vector. */ tfile_ops.to_stratum = process_stratum; tfile_ops.to_has_all_memory = tfile_has_all_memory; tfile_ops.to_has_memory = tfile_has_memory; -- cgit v1.1