diff -uprN src0/gdb/target.c src1/gdb/target.c --- src0/gdb/target.c 2009-07-31 14:43:27.000000000 -0400 +++ src1/gdb/target.c 2009-08-06 09:24:00.000000000 -0400 @@ -46,8 +46,6 @@ static void target_info (char *, int); -static void kill_or_be_killed (int); - static void default_terminal_info (char *, int); static int default_watchpoint_addr_within_range (struct target_ops *, @@ -73,8 +71,6 @@ static void target_command (char *, int) static struct target_ops *find_default_run_target (char *); -static void nosupport_runtime (void); - static LONGEST default_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, @@ -480,48 +476,11 @@ nosymbol (char *name, CORE_ADDR *addrp) } static void -nosupport_runtime (void) -{ - if (ptid_equal (inferior_ptid, null_ptid)) - noprocess (); - else - error (_("No run-time support for this")); -} - - -static void default_terminal_info (char *args, int from_tty) { printf_unfiltered (_("No saved terminal information.\n")); } -/* This is the default target_create_inferior and target_attach function. - If the current target is executing, it asks whether to kill it off. - If this function returns without calling error(), it has killed off - the target, and the operation should be attempted. */ - -static void -kill_or_be_killed (int from_tty) -{ - if (target_has_execution) - { - printf_unfiltered (_("You are already running a program:\n")); - target_files_info (); - if (query (_("Kill it? "))) - { - target_kill (); - if (target_has_execution) - error (_("Killing the program did not help.")); - return; - } - else - { - error (_("Program not killed.")); - } - } - tcomplain (); -} - /* A default implementation for the to_get_ada_task_ptid target method. This function builds the PTID by using both LWP and TID as part of @@ -1221,6 +1180,9 @@ memory_xfer_partial (struct target_ops * case MEM_NONE: return -1; + + case MEM_RW: + break; } if (region->attrib.cache) @@ -1807,7 +1769,7 @@ target_read_stralloc (struct target_ops return xstrdup (""); buffer[transferred] = 0; - if (strlen (buffer) < transferred) + if (strlen ((char *)buffer) < transferred) warning (_("target object %d, annex %s, " "contained unexpected null characters"), (int) object, annex ? annex : "(none)"); @@ -2428,7 +2390,6 @@ target_supports_non_stop (void) char * target_get_osdata (const char *type) { - char *document; struct target_ops *t; /* If we're already connected to something that can get us OS