diff options
author | nobody <> | 2006-11-15 00:00:36 +0000 |
---|---|---|
committer | nobody <> | 2006-11-15 00:00:36 +0000 |
commit | 6ea925ed04e69ecd81fe4b1167d9f4570c564924 (patch) | |
tree | e8266757d03d8acce1ff252ca82cf2080f4b6578 /gdb/target.c | |
parent | c9a129a5d1574b9b27f9fc84b0f5f0f63bc6bf34 (diff) | |
download | fsf-binutils-gdb-nickrob-async-20060828-mergepoint.zip fsf-binutils-gdb-nickrob-async-20060828-mergepoint.tar.gz fsf-binutils-gdb-nickrob-async-20060828-mergepoint.tar.bz2 |
This commit was manufactured by cvs2svn to create tag 'nickrob-nickrob-async-20060828-mergepoint
async-20060828-mergepoint'.
Sprout from gdb_6_6-branch 2006-11-15 00:00:34 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'gdb_6_6-branch'.'
Cherrypick from master 2006-08-28 00:56:25 UTC DJ Delorie <dj@redhat.com> 'merge from gcc':
COPYING.LIBGLOSS
COPYING.NEWLIB
ChangeLog
Makefile.def
Makefile.in
Makefile.tpl
bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in
bfd/archive.c
bfd/archive64.c
bfd/archures.c
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/coff-arm.c
bfd/coff-maxq.c
bfd/coff-ppc.c
bfd/coff-stgo32.c
bfd/coffcode.h
bfd/cofflink.c
bfd/config.bfd
bfd/configure
bfd/configure.in
bfd/cpu-arm.c
bfd/cpu-i960.c
bfd/dwarf2.c
bfd/ecoff.c
bfd/elf-bfd.h
bfd/elf-eh-frame.c
bfd/elf-m10300.c
bfd/elf.c
bfd/elf32-arm.c
bfd/elf32-avr.c
bfd/elf32-bfin.c
bfd/elf32-cr16c.c
bfd/elf32-cris.c
bfd/elf32-crx.c
bfd/elf32-d10v.c
bfd/elf32-fr30.c
bfd/elf32-frv.c
bfd/elf32-h8300.c
bfd/elf32-hppa.c
bfd/elf32-i370.c
bfd/elf32-i386.c
bfd/elf32-ip2k.c
bfd/elf32-iq2000.c
bfd/elf32-m32c.c
bfd/elf32-m32r.c
bfd/elf32-m68hc11.c
bfd/elf32-m68hc12.c
bfd/elf32-m68hc1x.c
bfd/elf32-m68hc1x.h
bfd/elf32-m68k.c
bfd/elf32-mcore.c
bfd/elf32-mips.c
bfd/elf32-msp430.c
bfd/elf32-mt.c
bfd/elf32-openrisc.c
bfd/elf32-ppc.c
bfd/elf32-s390.c
bfd/elf32-sh-symbian.c
bfd/elf32-sh.c
bfd/elf32-sh64.c
bfd/elf32-sparc.c
bfd/elf32-v850.c
bfd/elf32-vax.c
bfd/elf32-xstormy16.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-mips.c
bfd/elf64-mmix.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-sh64.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c
bfd/elfcode.h
bfd/elflink.c
bfd/elfn32-mips.c
bfd/elfxx-ia64.c
bfd/elfxx-mips.c
bfd/elfxx-sparc.c
bfd/elfxx-target.h
bfd/hpux-core.c
bfd/i386linux.c
bfd/ieee.c
bfd/libbfd-in.h
bfd/libbfd.h
bfd/libpei.h
bfd/linker.c
bfd/m68klinux.c
bfd/merge.c
bfd/mmo.c
bfd/nlmcode.h
bfd/osf-core.c
bfd/pe-arm-wince.c
bfd/pe-i386.c
bfd/peXXigen.c
bfd/pef.c
bfd/pei-arm-wince.c
bfd/pei-i386.c
bfd/peicode.h
bfd/po/BLD-POTFILES.in
bfd/po/SRC-POTFILES.in
bfd/reloc.c
bfd/section.c
bfd/som.c
bfd/sparclinux.c
bfd/stabs.c
bfd/targets.c
bfd/version.h
bfd/vms-hdr.c
config.guess
config.sub
config/ChangeLog
config/tls.m4
configure
configure.in
gdb/ChangeLog
gdb/ChangeLog-2004
gdb/Makefile.in
gdb/NEWS
gdb/ada-lex.l
gdb/arch-utils.c
gdb/arch-utils.h
gdb/arm-tdep.c
gdb/blockframe.c
gdb/breakpoint.c
gdb/cli/cli-cmds.c
gdb/cli/cli-cmds.h
gdb/cli/cli-decode.c
gdb/cli/cli-setshow.c
gdb/command.h
gdb/configure.host
gdb/configure.tgt
gdb/defs.h
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/doc/gdbint.texinfo
gdb/doc/stabs.texinfo
gdb/dwarf2loc.c
gdb/dwarf2read.c
gdb/eval.c
gdb/exceptions.h
gdb/exec.c
gdb/expprint.c
gdb/expression.h
gdb/fork-child.c
gdb/frame.c
gdb/frame.h
gdb/gcore.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gdbcmd.h
gdb/gdbserver/ChangeLog
gdb/gdbserver/acinclude.m4
gdb/gdbserver/config.in
gdb/gdbserver/configure
gdb/gdbserver/configure.ac
gdb/gdbserver/configure.srv
gdb/gdbserver/inferiors.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/linux-low.h
gdb/gdbserver/linux-s390-low.c
gdb/gdbserver/remote-utils.c
gdb/gdbserver/server.c
gdb/gdbserver/server.h
gdb/gdbserver/target.h
gdb/gdbserver/thread-db.c
gdb/infcall.c
gdb/infcmd.c
gdb/inferior.h
gdb/infrun.c
gdb/interps.c
gdb/linux-fork.c
gdb/linux-nat.c
gdb/linux-thread-db.c
gdb/m32c-tdep.c
gdb/m68k-tdep.c
gdb/memattr.c
gdb/memattr.h
gdb/mi/mi-cmd-stack.c
gdb/minsyms.c
gdb/monitor.c
gdb/p-valprint.c
gdb/parse.c
gdb/parser-defs.h
gdb/ppc-linux-tdep.c
gdb/printcmd.c
gdb/remote-sds.c
gdb/remote-sim.c
gdb/remote.c
gdb/ser-mingw.c
gdb/serial.c
gdb/solib-svr4.c
gdb/solib.c
gdb/somread.c
gdb/sparc-tdep.c
gdb/stack.c
gdb/symfile.c
gdb/symtab.c
gdb/symtab.h
gdb/target.c
gdb/target.h
gdb/testsuite/ChangeLog
gdb/testsuite/config/abug.exp
gdb/testsuite/config/cpu32bug.exp
gdb/testsuite/config/est.exp
gdb/testsuite/config/hmsirom.exp
gdb/testsuite/config/nind.exp
gdb/testsuite/gdb.ada/array_return/p.adb
gdb/testsuite/gdb.ada/array_return/pck.adb
gdb/testsuite/gdb.ada/array_return/pck.ads
gdb/testsuite/gdb.ada/arrayidx.exp
gdb/testsuite/gdb.ada/exec_changed/first.adb
gdb/testsuite/gdb.ada/exec_changed/second.adb
gdb/testsuite/gdb.base/annota1.exp
gdb/testsuite/gdb.base/args.c
gdb/testsuite/gdb.base/args.exp
gdb/testsuite/gdb.base/completion.exp
gdb/testsuite/gdb.base/constvars.c
gdb/testsuite/gdb.base/help.exp
gdb/testsuite/gdb.base/maint.exp
gdb/testsuite/gdb.base/multi-forks.exp
gdb/testsuite/gdb.base/sepdebug.exp
gdb/testsuite/gdb.cp/maint.exp
gdb/testsuite/gdb.mi/mi-basics.exp
gdb/testsuite/gdb.mi/mi-file.exp
gdb/testsuite/gdb.mi/mi-stack.exp
gdb/testsuite/gdb.mi/mi2-basics.exp
gdb/testsuite/gdb.stabs/weird.exp
gdb/testsuite/gdb.threads/manythreads.c
gdb/testsuite/gdb.threads/manythreads.exp
gdb/testsuite/gdb.trace/tracecmd.exp
gdb/testsuite/lib/gdb.exp
gdb/testsuite/lib/gdbserver-support.exp
gdb/tui/tui-source.c
gdb/utils.c
gdb/valops.c
gdb/version.in
include/ChangeLog
include/bfdlink.h
include/coff/ChangeLog
include/coff/external.h
include/coff/internal.h
include/coff/pe.h
include/dis-asm.h
include/elf/ChangeLog
include/elf/arm.h
include/elf/common.h
include/elf/mips.h
include/opcode/ChangeLog
include/opcode/arm.h
include/opcode/i386.h
include/opcode/ppc.h
intl/ChangeLog
intl/Makefile.in
intl/dgettext.c
intl/dngettext.c
libiberty/ChangeLog
libiberty/Makefile.in
libiberty/bcopy.c
libiberty/configure
libiberty/configure.ac
libiberty/cp-demangle.c
libiberty/floatformat.c
libiberty/pex-win32.c
libiberty/pexecute.txh
libiberty/testsuite/Makefile.in
libiberty/testsuite/demangle-expected
opcodes/ChangeLog
opcodes/Makefile.am
opcodes/Makefile.in
opcodes/arm-dis.c
opcodes/configure
opcodes/configure.in
opcodes/cris-dis.c
opcodes/disassemble.c
opcodes/h8300-dis.c
opcodes/i386-dis.c
opcodes/ia64-gen.c
opcodes/mips-dis.c
opcodes/po/POTFILES.in
opcodes/ppc-dis.c
opcodes/ppc-opc.c
opcodes/sh-dis.c
readline/ChangeLog.gdb
readline/Makefile.in
readline/callback.c
readline/terminal.c
sim/ChangeLog
sim/MAINTAINERS
sim/common/ChangeLog
sim/common/gentmap.c
sim/common/sim-base.h
sim/common/sim-fpu.c
sim/common/sim-profile.c
sim/cris/config.in
sim/cris/configure
sim/cris/configure.ac
sim/cris/cris-sim.h
sim/cris/sim-if.c
sim/cris/traps.c
sim/mips/ChangeLog
sim/mips/Makefile.in
sim/mips/configure.ac
sim/mips/dsp.igen
sim/mips/m16e.igen
sim/mips/mips.igen
sim/mips/sim-main.h
sim/testsuite/ChangeLog
sim/testsuite/sim/cris/c/clone5.c
sim/testsuite/sim/cris/c/fcntl1.c
sim/testsuite/sim/cris/c/mprotect1.c
sim/testsuite/sim/cris/c/pipe2.c
sim/testsuite/sim/cris/c/readlink2.c
sim/testsuite/sim/cris/c/rtsigprocmask1.c
sim/testsuite/sim/cris/c/rtsigsuspend1.c
sim/testsuite/sim/cris/c/sig7.c
sim/testsuite/sim/cris/c/sigreturn1.c
sim/testsuite/sim/cris/c/sigreturn2.c
sim/testsuite/sim/cris/c/syscall1.c
sim/testsuite/sim/cris/c/syscall2.c
sim/testsuite/sim/cris/c/sysctl2.c
sim/testsuite/sim/mips/ChangeLog
sim/testsuite/sim/mips/basic.exp
sim/testsuite/sim/mips/testutils.inc
Delete:
bfd/coff-x86_64.c
bfd/cpu-score.c
bfd/cpu-spu.c
bfd/elf32-score.c
bfd/elf32-spu.c
bfd/elf32-spu.h
bfd/pe-x86_64.c
bfd/pei-x86_64.c
config/multi.m4
gdb/config/xtensa/xtensa.mt
gdb/gdb_expat.h
gdb/memory-map.c
gdb/memory-map.h
gdb/target-memory.c
gdb/testsuite/gdb.ada/watch_arg.exp
gdb/testsuite/gdb.ada/watch_arg/watch.adb
gdb/testsuite/gdb.base/sepsymtab.c
gdb/testsuite/gdb.base/sepsymtab.exp
gdb/testsuite/gdb.base/subst.exp
gdb/testsuite/gdb.cp/call-c-1.c
gdb/testsuite/gdb.cp/call-c.cc
gdb/testsuite/gdb.cp/call-c.exp
gdb/testsuite/gdb.threads/tls-nodebug.c
gdb/testsuite/gdb.threads/tls-nodebug.exp
gdb/vec.c
gdb/vec.h
gdb/xml-support.c
gdb/xml-support.h
gdb/xtensa-config.c
gdb/xtensa-tdep.c
gdb/xtensa-tdep.h
include/coff/x86_64.h
include/elf/score.h
include/elf/spu.h
include/opcode/score-datadep.h
include/opcode/score-inst.h
include/opcode/spu-insns.h
include/opcode/spu.h
opcodes/score-dis.c
opcodes/score-opc.h
opcodes/spu-dis.c
opcodes/spu-opc.c
sim/mips/smartmips.igen
sim/testsuite/sim/cris/asm/option3.ms
sim/testsuite/sim/cris/asm/option4.ms
sim/testsuite/sim/cris/c/clone6.c
sim/testsuite/sim/cris/c/fcntl2.c
sim/testsuite/sim/cris/c/mprotect2.c
sim/testsuite/sim/cris/c/readlink11.c
sim/testsuite/sim/cris/c/rtsigprocmask2.c
sim/testsuite/sim/cris/c/rtsigsuspend2.c
sim/testsuite/sim/cris/c/sig13.c
sim/testsuite/sim/cris/c/sigreturn3.c
sim/testsuite/sim/cris/c/sigreturn4.c
sim/testsuite/sim/cris/c/syscall3.c
sim/testsuite/sim/cris/c/syscall4.c
sim/testsuite/sim/cris/c/syscall5.c
sim/testsuite/sim/cris/c/syscall6.c
sim/testsuite/sim/cris/c/syscall7.c
sim/testsuite/sim/cris/c/syscall8.c
sim/testsuite/sim/cris/c/sysctl3.c
Diffstat (limited to 'gdb/target.c')
-rw-r--r-- | gdb/target.c | 246 |
1 files changed, 0 insertions, 246 deletions
diff --git a/gdb/target.c b/gdb/target.c index 2ff882c..65d24a5 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -39,7 +39,6 @@ #include "regcache.h" #include "gdb_assert.h" #include "gdbcore.h" -#include "exceptions.h" static void target_info (char *, int); @@ -465,9 +464,6 @@ update_current_target (void) INHERIT (to_make_corefile_notes, t); INHERIT (to_get_thread_local_address, t); INHERIT (to_magic, t); - /* Do not inherit to_memory_map. */ - /* Do not inherit to_flash_erase. */ - /* Do not inherit to_flash_done. */ } #undef INHERIT @@ -649,56 +645,6 @@ update_current_target (void) current_target.beneath = target_stack; } -/* Mark OPS as a running target. This reverses the effect - of target_mark_exited. */ - -void -target_mark_running (struct target_ops *ops) -{ - struct target_ops *t; - - for (t = target_stack; t != NULL; t = t->beneath) - if (t == ops) - break; - if (t == NULL) - internal_error (__FILE__, __LINE__, - "Attempted to mark unpushed target \"%s\" as running", - ops->to_shortname); - - ops->to_has_execution = 1; - ops->to_has_all_memory = 1; - ops->to_has_memory = 1; - ops->to_has_stack = 1; - ops->to_has_registers = 1; - - update_current_target (); -} - -/* Mark OPS as a non-running target. This reverses the effect - of target_mark_running. */ - -void -target_mark_exited (struct target_ops *ops) -{ - struct target_ops *t; - - for (t = target_stack; t != NULL; t = t->beneath) - if (t == ops) - break; - if (t == NULL) - internal_error (__FILE__, __LINE__, - "Attempted to mark unpushed target \"%s\" as running", - ops->to_shortname); - - ops->to_has_execution = 0; - ops->to_has_all_memory = 0; - ops->to_has_memory = 0; - ops->to_has_stack = 0; - ops->to_has_registers = 0; - - update_current_target (); -} - /* Push a new target type into the stack of the existing target accessors, possibly superseding some of the existing accessors. @@ -809,92 +755,6 @@ pop_target (void) internal_error (__FILE__, __LINE__, _("failed internal consistency check")); } -/* Using the objfile specified in BATON, find the address for the - current thread's thread-local storage with offset OFFSET. */ -CORE_ADDR -target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset) -{ - volatile CORE_ADDR addr = 0; - - if (target_get_thread_local_address_p () - && gdbarch_fetch_tls_load_module_address_p (current_gdbarch)) - { - ptid_t ptid = inferior_ptid; - volatile struct gdb_exception ex; - - TRY_CATCH (ex, RETURN_MASK_ALL) - { - CORE_ADDR lm_addr; - - /* Fetch the load module address for this objfile. */ - lm_addr = gdbarch_fetch_tls_load_module_address (current_gdbarch, - objfile); - /* If it's 0, throw the appropriate exception. */ - if (lm_addr == 0) - throw_error (TLS_LOAD_MODULE_NOT_FOUND_ERROR, - _("TLS load module not found")); - - addr = target_get_thread_local_address (ptid, lm_addr, offset); - } - /* If an error occurred, print TLS related messages here. Otherwise, - throw the error to some higher catcher. */ - if (ex.reason < 0) - { - int objfile_is_library = (objfile->flags & OBJF_SHARED); - - switch (ex.error) - { - case TLS_NO_LIBRARY_SUPPORT_ERROR: - error (_("Cannot find thread-local variables in this thread library.")); - break; - case TLS_LOAD_MODULE_NOT_FOUND_ERROR: - if (objfile_is_library) - error (_("Cannot find shared library `%s' in dynamic" - " linker's load module list"), objfile->name); - else - error (_("Cannot find executable file `%s' in dynamic" - " linker's load module list"), objfile->name); - break; - case TLS_NOT_ALLOCATED_YET_ERROR: - if (objfile_is_library) - error (_("The inferior has not yet allocated storage for" - " thread-local variables in\n" - "the shared library `%s'\n" - "for %s"), - objfile->name, target_pid_to_str (ptid)); - else - error (_("The inferior has not yet allocated storage for" - " thread-local variables in\n" - "the executable `%s'\n" - "for %s"), - objfile->name, target_pid_to_str (ptid)); - break; - case TLS_GENERIC_ERROR: - if (objfile_is_library) - error (_("Cannot find thread-local storage for %s, " - "shared library %s:\n%s"), - target_pid_to_str (ptid), - objfile->name, ex.message); - else - error (_("Cannot find thread-local storage for %s, " - "executable file %s:\n%s"), - target_pid_to_str (ptid), - objfile->name, ex.message); - break; - default: - throw_exception (ex); - break; - } - } - } - /* It wouldn't be wrong here to try a gdbarch method, too; finding - TLS is an ABI-specific thing. But we don't do that yet. */ - else - error (_("Cannot find thread-local variables on this target")); - - return addr; -} - #undef MIN #define MIN(A, B) (((A) <= (B)) ? (A) : (B)) @@ -1031,12 +891,6 @@ memory_xfer_partial (struct target_ops *ops, void *readbuf, const void *writebuf if (readbuf != NULL) return -1; break; - - case MEM_FLASH: - /* We only support writing to flash during "load" for now. */ - if (writebuf != NULL) - error (_("Writing to flash memory forbidden in this context")); - break; } if (region->attrib.cache) @@ -1186,87 +1040,6 @@ target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len) return EIO; } -/* Fetch the target's memory map. */ - -VEC(mem_region_s) * -target_memory_map (void) -{ - VEC(mem_region_s) *result; - struct mem_region *last_one, *this_one; - int ix; - struct target_ops *t; - - if (targetdebug) - fprintf_unfiltered (gdb_stdlog, "target_memory_map ()\n"); - - for (t = current_target.beneath; t != NULL; t = t->beneath) - if (t->to_memory_map != NULL) - break; - - if (t == NULL) - return NULL; - - result = t->to_memory_map (t); - if (result == NULL) - return NULL; - - qsort (VEC_address (mem_region_s, result), - VEC_length (mem_region_s, result), - sizeof (struct mem_region), mem_region_cmp); - - /* Check that regions do not overlap. Simultaneously assign - a numbering for the "mem" commands to use to refer to - each region. */ - last_one = NULL; - for (ix = 0; VEC_iterate (mem_region_s, result, ix, this_one); ix++) - { - this_one->number = ix; - - if (last_one && last_one->hi > this_one->lo) - { - warning (_("Overlapping regions in memory map: ignoring")); - VEC_free (mem_region_s, result); - return NULL; - } - last_one = this_one; - } - - return result; -} - -void -target_flash_erase (ULONGEST address, LONGEST length) -{ - struct target_ops *t; - - for (t = current_target.beneath; t != NULL; t = t->beneath) - if (t->to_flash_erase != NULL) - { - if (targetdebug) - fprintf_unfiltered (gdb_stdlog, "target_flash_erase (%s, %s)\n", - paddr (address), phex (length, 0)); - return t->to_flash_erase (t, address, length); - } - - tcomplain (); -} - -void -target_flash_done (void) -{ - struct target_ops *t; - - for (t = current_target.beneath; t != NULL; t = t->beneath) - if (t->to_flash_done != NULL) - { - if (targetdebug) - fprintf_unfiltered (gdb_stdlog, "target_flash_done\n"); - return t->to_flash_done (t); - } - - tcomplain (); -} - #ifndef target_stopped_data_address_p int target_stopped_data_address_p (struct target_ops *target) @@ -1407,11 +1180,6 @@ target_write_with_progress (struct target_ops *ops, void (*progress) (ULONGEST, void *), void *baton) { LONGEST xfered = 0; - - /* Give the progress callback a chance to set up. */ - if (progress) - (*progress) (0, baton); - while (xfered < len) { LONGEST xfer = target_write_partial (ops, object, annex, @@ -1588,18 +1356,6 @@ target_info (char *args, int from_tty) } } -/* This function is called before any new inferior is created, e.g. - by running a program, attaching, or connecting to a target. - It cleans up any state from previous invocations which might - change between runs. This is a subset of what target_preopen - resets (things which might change between targets). */ - -void -target_pre_inferior (int from_tty) -{ - invalidate_target_mem_regions (); -} - /* This is to be called by the open routine before it does anything. */ @@ -1622,8 +1378,6 @@ target_preopen (int from_tty) if (target_has_execution) pop_target (); - - target_pre_inferior (from_tty); } /* Detach a target after doing deferred register stores. */ |