From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11247 invoked by alias); 20 Jan 2012 20:16:31 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 11205 invoked by uid 9674); 20 Jan 2012 20:16:29 -0000 Date: Fri, 20 Jan 2012 20:16:00 -0000 Message-ID: <20120120201629.11190.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-jankratochvil-watchpoint3: Merge branch 'f-cleanup-fork-multifix' into archer-jankratochvil-watchpoint3 X-Git-Refname: refs/heads/archer-jankratochvil-watchpoint3 X-Git-Reftype: branch X-Git-Oldrev: c26d0d9f865ae8f84e3ff24551718ec3573d1397 X-Git-Newrev: b84a6a01b09b38dde9f5937ac12f45cc31b313a6 X-SW-Source: 2012-q1/txt/msg00018.txt.bz2 List-Id: The branch, archer-jankratochvil-watchpoint3 has been updated via b84a6a01b09b38dde9f5937ac12f45cc31b313a6 (commit) via d196843df7fda02f5f1074241296892c613c8e22 (commit) via 4639f9cad4b05bc28de54d7f7337df9d64c82c20 (commit) via d65b3567760f2b73634e3f9bf718fbc21880110d (commit) via 2f8d05dbd04f418b57e5019825cc8addc28b962c (commit) via 8ebd80fcf50e541b83d2836e345be5d95115a859 (commit) via 31b7799d28c5df6024bf1acf40c3386e3ac334c5 (commit) via 3c793506c35a3ab3ddac56e61ffc45c89fd27179 (commit) via b0fa505b7ff0b6691c0a59f657d7bcc940c8cd26 (commit) via 18136deaf55cc69935537f83c1d0d03dae9f71e7 (commit) via a343c3d56567d4c4e751b6204e8433e7775f9b97 (commit) via d20616615dcda64740247946bfbe8a725708ec80 (commit) from c26d0d9f865ae8f84e3ff24551718ec3573d1397 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit b84a6a01b09b38dde9f5937ac12f45cc31b313a6 Merge: c26d0d9 d196843 Author: Jan Kratochvil Date: Fri Jan 20 21:16:19 2012 +0100 Merge branch 'f-cleanup-fork-multifix' into archer-jankratochvil-watchpoint3 commit d196843df7fda02f5f1074241296892c613c8e22 Merge: d65b356 4639f9c Author: Jan Kratochvil Date: Fri Jan 20 21:16:16 2012 +0100 Merge branch 'f-cleanup-fork' into f-cleanup-fork-multifix commit 4639f9cad4b05bc28de54d7f7337df9d64c82c20 Author: Jan Kratochvil Date: Fri Jan 20 21:14:06 2012 +0100 . commit d65b3567760f2b73634e3f9bf718fbc21880110d Author: Jan Kratochvil Date: Fri Jan 20 21:10:17 2012 +0100 . commit 2f8d05dbd04f418b57e5019825cc8addc28b962c Author: Jan Kratochvil Date: Fri Jan 20 20:59:27 2012 +0100 expect extended-remote board commit 8ebd80fcf50e541b83d2836e345be5d95115a859 Merge: 68cbc25 3c79350 Author: Jan Kratochvil Date: Fri Jan 20 20:55:01 2012 +0100 Merge branch 'f-cleanup' into f-cleanup-fork commit 31b7799d28c5df6024bf1acf40c3386e3ac334c5 Merge: b0fa505 8ebd80f Author: Jan Kratochvil Date: Fri Jan 20 20:55:01 2012 +0100 Merge branch 'f-cleanup-fork' into f-cleanup-fork-multifix commit 3c793506c35a3ab3ddac56e61ffc45c89fd27179 Merge: a7e3ac7 18136de Author: Jan Kratochvil Date: Fri Jan 20 20:55:01 2012 +0100 Merge branch 'f' into f-cleanup commit b0fa505b7ff0b6691c0a59f657d7bcc940c8cd26 Author: Jan Kratochvil Date: Fri Jan 20 20:54:27 2012 +0100 . commit 18136deaf55cc69935537f83c1d0d03dae9f71e7 Author: Nick Clifton Date: Fri Jan 20 14:42:56 2012 +0000 PR binutils/13534 * archive.c (_bfd_ar_sizepad): New function. Correctly install and pad the size field in an archive header. (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan function for the archive size field. (bfd_generic_openr_next_archived_file): Likewise. (do_slurp_coff_armap): Likewise. (_bfd_write_archive_contents): Likewise. (_bfd_bsd44_write_ar_hdr): Use the new function. (bfd_ar_hdr_from_filesystem): Likewise. (_bfd_write_archive_contents): Likewise. (bsd_write_armap): Likewise. (coff_write_armap): Likewise. * archive64.c (bfd_elf64_archive_write_armap): Likewise. * bfdio.c (bfd_bread): Use correct type for archive element sizes. * ar.c (open_inarch): Likewise. (extract_file): Likewise. * libbfd-in.h (struct areltdata): Use correct types for parsed_size and extra_size fields. Prototype _bfd_ar_sizepad function. * libbfd.h: Regenerate. commit a343c3d56567d4c4e751b6204e8433e7775f9b97 Author: Jan Kratochvil Date: Fri Jan 20 12:10:20 2012 +0100 Revert "remove ppc" This reverts commit 821dff38c33be9d95a2c47aa56918d006e615254. commit d20616615dcda64740247946bfbe8a725708ec80 Author: Ulrich Weigand Date: Fri Jan 20 10:31:25 2012 +0000 * NEWS: Document remote "info proc" and "generate-core-file". ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 25 ++++++++++ bfd/archive.c | 63 ++++++++++++++++++------- bfd/archive64.c | 6 +- bfd/bfdio.c | 3 +- bfd/libbfd-in.h | 32 +++++++------ bfd/libbfd.h | 32 +++++++------ gdb/ChangeLog | 4 ++ gdb/NEWS | 3 + gdb/gdbserver/linux-low.c | 6 ++- gdb/ppc-linux-nat.c | 4 +- gdb/testsuite/gdb.multi/watchpoint-multi.exp | 14 +++--- gdb/testsuite/gdb.threads/watchpoint-fork.exp | 10 ++-- 12 files changed, 138 insertions(+), 64 deletions(-) First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ab9cde1..994a1ce 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,28 @@ +2012-01-20 Francois Gouget + + PR binutils/13534 + * archive.c (_bfd_ar_sizepad): New function. Correctly install and + pad the size field in an archive header. + (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan + function for the archive size field. + (bfd_generic_openr_next_archived_file): Likewise. + (do_slurp_coff_armap): Likewise. + (_bfd_write_archive_contents): Likewise. + (_bfd_bsd44_write_ar_hdr): Use the new function. + (bfd_ar_hdr_from_filesystem): Likewise. + (_bfd_write_archive_contents): Likewise. + (bsd_write_armap): Likewise. + (coff_write_armap): Likewise. + * archive64.c (bfd_elf64_archive_write_armap): Likewise. + * bfdio.c (bfd_bread): Use correct type for archive element + sizes. + * ar.c (open_inarch): Likewise. + (extract_file): Likewise. + * libbfd-in.h (struct areltdata): Use correct types for + parsed_size and extra_size fields. + Prototype _bfd_ar_sizepad function. + * libbfd.h: Regenerate. + 2012-01-20 Ulrich Weigand * elf.c (elfcore_write_prpsinfo): Provide unconditionally. diff --git a/bfd/archive.c b/bfd/archive.c index ac2be3e..86c62a5 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -1,7 +1,7 @@ /* BFD back-end for archive files (libraries). Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, + 2012 Free Software Foundation, Inc. Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault. This file is part of BFD, the Binary File Descriptor library. @@ -178,6 +178,29 @@ _bfd_ar_spacepad (char *p, size_t n, const char *fmt, long val) else memcpy (p, buf, n); } + +bfd_boolean +_bfd_ar_sizepad (char *p, size_t n, bfd_size_type size) +{ + static char buf[21]; + size_t len; + + snprintf (buf, sizeof (buf), "%-10" BFD_VMA_FMT "u", size); + len = strlen (buf); + if (len > n) + { + bfd_set_error (bfd_error_file_too_big); + return FALSE; + } + if (len < n) + { + memcpy (p, buf, len); + memset (p + len, ' ', n - len); + } + else + memcpy (p, buf, n); + return TRUE; +} bfd_boolean _bfd_generic_mkarchive (bfd *abfd) @@ -424,7 +447,7 @@ _bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag) { struct ar_hdr hdr; char *hdrp = (char *) &hdr; - size_t parsed_size; + bfd_size_type parsed_size; struct areltdata *ared; char *filename = NULL; bfd_size_type namelen = 0; @@ -448,8 +471,7 @@ _bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag) } errno = 0; - parsed_size = strtol (hdr.ar_size, NULL, 10); - if (errno != 0) + if (sscanf (hdr.ar_size, "%" BFD_VMA_FMT "u", &parsed_size) != 1) { bfd_set_error (bfd_error_malformed_archive); return NULL; @@ -721,7 +743,7 @@ bfd_generic_openr_next_archived_file (bfd *archive, bfd *last_file) filestart = bfd_ardata (archive)->first_file_filepos; else { - unsigned int size = arelt_size (last_file); + bfd_size_type size = arelt_size (last_file); filestart = last_file->proxy_origin; if (! bfd_is_thin_archive (archive)) @@ -917,7 +939,7 @@ do_slurp_coff_armap (bfd *abfd) struct artdata *ardata = bfd_ardata (abfd); char *stringbase; bfd_size_type stringsize; - unsigned int parsed_size; + bfd_size_type parsed_size; carsym *carsyms; bfd_size_type nsymz; /* Number of symbols in armap. */ bfd_vma (*swap) (const void *); @@ -1762,14 +1784,16 @@ _bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd) BFD_ASSERT (padded_len == arch_eltdata (abfd)->extra_size); - _bfd_ar_spacepad (hdr->ar_size, sizeof (hdr->ar_size), "%-10ld", - arch_eltdata (abfd)->parsed_size + padded_len); + if (!_bfd_ar_sizepad (hdr->ar_size, sizeof (hdr->ar_size), + arch_eltdata (abfd)->parsed_size + padded_len)) + return FALSE; if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) return FALSE; if (bfd_bwrite (fullname, len, archive) != len) return FALSE; + if (len & 3) { static const char pad[3] = { 0, 0, 0 }; @@ -1883,8 +1907,11 @@ bfd_ar_hdr_from_filesystem (bfd *abfd, const char *filename, bfd *member) status.st_gid); _bfd_ar_spacepad (hdr->ar_mode, sizeof (hdr->ar_mode), "%-8lo", status.st_mode); - _bfd_ar_spacepad (hdr->ar_size, sizeof (hdr->ar_size), "%-10ld", - status.st_size); + if (!_bfd_ar_sizepad (hdr->ar_size, sizeof (hdr->ar_size), status.st_size)) + { + free (ared); + return NULL; + } memcpy (hdr->ar_fmag, ARFMAG, 2); ared->parsed_size = status.st_size; ared->arch_header = (char *) hdr; @@ -2124,8 +2151,9 @@ _bfd_write_archive_contents (bfd *arch) memset (&hdr, ' ', sizeof (struct ar_hdr)); memcpy (hdr.ar_name, ename, strlen (ename)); /* Round size up to even number in archive header. */ - _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", - (elength + 1) & ~(bfd_size_type) 1); + if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), + (elength + 1) & ~(bfd_size_type) 1)) + return FALSE; memcpy (hdr.ar_fmag, ARFMAG, 2); if ((bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) != sizeof (struct ar_hdr)) @@ -2143,7 +2171,7 @@ _bfd_write_archive_contents (bfd *arch) current = current->archive_next) { char buffer[DEFAULT_BUFFERSIZE]; - unsigned int remaining = arelt_size (current); + bfd_size_type remaining = arelt_size (current); /* Write ar header. */ if (!_bfd_write_ar_hdr (arch, current)) @@ -2401,7 +2429,8 @@ bsd_write_armap (bfd *arch, bfd_ardata (arch)->armap_timestamp); _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", uid); _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", gid); - _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", mapsize); + if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) + return FALSE; memcpy (hdr.ar_fmag, ARFMAG, 2); if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) != sizeof (struct ar_hdr)) @@ -2556,8 +2585,8 @@ coff_write_armap (bfd *arch, memset (&hdr, ' ', sizeof (struct ar_hdr)); hdr.ar_name[0] = '/'; - _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", - mapsize); + if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) + return FALSE; _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0 ? time (NULL) : 0)); diff --git a/bfd/archive64.c b/bfd/archive64.c index bbc4c3f..f3a13d3 100644 --- a/bfd/archive64.c +++ b/bfd/archive64.c @@ -1,6 +1,6 @@ /* MIPS-specific support for 64-bit ELF Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, - 2010 Free Software Foundation, Inc. + 2010, 2012 Free Software Foundation, Inc. Ian Lance Taylor, Cygnus Support Linker support added by Mark Mitchell, CodeSourcery, LLC. @@ -169,8 +169,8 @@ bfd_elf64_archive_write_armap (bfd *arch, memset (&hdr, ' ', sizeof (struct ar_hdr)); memcpy (hdr.ar_name, "/SYM64/", strlen ("/SYM64/")); - _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", - mapsize); + if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) + return FALSE; _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", time (NULL)); /* This, at least, is what Intel coff sets the values to.: */ diff --git a/bfd/bfdio.c b/bfd/bfdio.c index c142c17..6f8a7c9 100644 --- a/bfd/bfdio.c +++ b/bfd/bfdio.c @@ -185,7 +185,8 @@ bfd_bread (void *ptr, bfd_size_type size, bfd *abfd) this element. */ if (abfd->arelt_data != NULL) { - size_t maxbytes = arelt_size (abfd); + bfd_size_type maxbytes = arelt_size (abfd); + if (abfd->where + size > maxbytes) { if (abfd->where >= maxbytes) diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h index f7a9e21..640768e 100644 --- a/bfd/libbfd-in.h +++ b/bfd/libbfd-in.h @@ -3,7 +3,7 @@ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, - 2010, 2011 + 2010, 2011, 2012 Free Software Foundation, Inc. Written by Cygnus Support. @@ -64,16 +64,17 @@ struct section_hash_entry /* tdata for an archive. For an input archive, cache needs to be free()'d. For an output archive, symdefs do. */ -struct artdata { +struct artdata +{ file_ptr first_file_filepos; /* Speed up searching the armap */ htab_t cache; - bfd *archive_head; /* Only interesting in output routines */ - carsym *symdefs; /* the symdef entries */ - symindex symdef_count; /* how many there are */ - char *extended_names; /* clever intel extension */ - bfd_size_type extended_names_size; /* Size of extended names */ - /* when more compilers are standard C, this can be a time_t */ + bfd *archive_head; /* Only interesting in output routines. */ + carsym *symdefs; /* The symdef entries. */ + symindex symdef_count; /* How many there are. */ + char *extended_names; /* Clever intel extension. */ + bfd_size_type extended_names_size; /* Size of extended names. */ + /* When more compilers are standard C, this can be a time_t. */ long armap_timestamp; /* Timestamp value written into armap. This is used for BSD archives to check that the timestamp is recent enough @@ -88,12 +89,13 @@ struct artdata { #define bfd_ardata(bfd) ((bfd)->tdata.aout_ar_data) /* Goes in bfd's arelt_data slot */ -struct areltdata { - char * arch_header; /* it's actually a string */ - unsigned int parsed_size; /* octets of filesize not including ar_hdr */ - unsigned int extra_size; /* BSD4.4: extra bytes after the header. */ - char *filename; /* null-terminated */ - file_ptr origin; /* for element of a thin archive */ +struct areltdata +{ + char * arch_header; /* It's actually a string. */ + bfd_size_type parsed_size; /* Octets of filesize not including ar_hdr. */ + bfd_size_type extra_size; /* BSD4.4: extra bytes after the header. */ + char *filename; /* Null-terminated. */ + file_ptr origin; /* For element of a thin archive. */ }; #define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size) @@ -203,6 +205,8 @@ extern void *_bfd_generic_read_ar_hdr (bfd *); extern void _bfd_ar_spacepad (char *, size_t, const char *, long); +extern bfd_boolean _bfd_ar_sizepad + (char *, size_t, bfd_size_type); extern void *_bfd_generic_read_ar_hdr_mag (bfd *, const char *); diff --git a/bfd/libbfd.h b/bfd/libbfd.h index a10a651..5e1cfe0 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -8,7 +8,7 @@ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, - 2010, 2011 + 2010, 2011, 2012 Free Software Foundation, Inc. Written by Cygnus Support. @@ -69,16 +69,17 @@ struct section_hash_entry /* tdata for an archive. For an input archive, cache needs to be free()'d. For an output archive, symdefs do. */ -struct artdata { +struct artdata +{ file_ptr first_file_filepos; /* Speed up searching the armap */ htab_t cache; - bfd *archive_head; /* Only interesting in output routines */ - carsym *symdefs; /* the symdef entries */ - symindex symdef_count; /* how many there are */ - char *extended_names; /* clever intel extension */ - bfd_size_type extended_names_size; /* Size of extended names */ - /* when more compilers are standard C, this can be a time_t */ + bfd *archive_head; /* Only interesting in output routines. */ + carsym *symdefs; /* The symdef entries. */ + symindex symdef_count; /* How many there are. */ + char *extended_names; /* Clever intel extension. */ + bfd_size_type extended_names_size; /* Size of extended names. */ + /* When more compilers are standard C, this can be a time_t. */ long armap_timestamp; /* Timestamp value written into armap. This is used for BSD archives to check that the timestamp is recent enough @@ -93,12 +94,13 @@ struct artdata { #define bfd_ardata(bfd) ((bfd)->tdata.aout_ar_data) /* Goes in bfd's arelt_data slot */ -struct areltdata { - char * arch_header; /* it's actually a string */ - unsigned int parsed_size; /* octets of filesize not including ar_hdr */ - unsigned int extra_size; /* BSD4.4: extra bytes after the header. */ - char *filename; /* null-terminated */ - file_ptr origin; /* for element of a thin archive */ +struct areltdata +{ + char * arch_header; /* It's actually a string. */ + bfd_size_type parsed_size; /* Octets of filesize not including ar_hdr. */ + bfd_size_type extra_size; /* BSD4.4: extra bytes after the header. */ + char *filename; /* Null-terminated. */ + file_ptr origin; /* For element of a thin archive. */ }; #define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size) @@ -208,6 +210,8 @@ extern void *_bfd_generic_read_ar_hdr (bfd *); extern void _bfd_ar_spacepad (char *, size_t, const char *, long); +extern bfd_boolean _bfd_ar_sizepad + (char *, size_t, bfd_size_type); extern void *_bfd_generic_read_ar_hdr_mag (bfd *, const char *); diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3f7669d..847cff9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2012-01-20 Ulrich Weigand + * NEWS: Document remote "info proc" and "generate-core-file". + +2012-01-20 Ulrich Weigand + * gdbarch.sh (find_memory_regions): New callback. * gdbarch.c, gdbarch.h: Regenerate. diff --git a/gdb/NEWS b/gdb/NEWS index eaf0b9d..128825e 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -28,6 +28,9 @@ now set a breakpoint in build/gcc/expr.c, but not build/libcpp/expr.c. +* The "info proc" and "generate-core-file" commands will now also + work on remote targets connected to GDBserver on Linux. + *** Changes in GDB 7.4 * GDB now handles ambiguous linespecs more consistently; the existing diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 517312f..dc79748 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -1579,7 +1579,8 @@ linux_wait_for_event (ptid_t ptid, int *wstat, int options) /* Check for a lwp with a pending status. */ - if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid)) + if (ptid_equal (ptid, minus_one_ptid) + || ptid_equal (pid_to_ptid (ptid_get_pid (ptid)), ptid)) { event_child = (struct lwp_info *) find_inferior (&all_lwps, status_pending_p_callback, &ptid); @@ -2089,11 +2090,14 @@ retry: if (thread == NULL) { struct thread_resume resume_info; + + /* Resume only a single process if requested so. */ if (!ptid_equal (cont_thread, minus_one_ptid) && ptid_get_lwp (cont_thread) == -1) resume_info.thread = cont_thread; else resume_info.thread = minus_one_ptid; + resume_info.kind = resume_continue; resume_info.sig = 0; linux_resume (&resume_info, 1); diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 0e61dc1..3077c4b 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -1773,7 +1773,7 @@ ppc_linux_insert_mask_watchpoint (struct target_ops *ops, CORE_ADDR addr, p.addr2 = mask; p.condition_value = 0; - iterate_over_lwps (minus_one_ptid, booke_insert_point_callback, &p); + linux_nat_iterate_watchpoint_lwps (booke_insert_point_callback, &p); return 0; } @@ -1799,7 +1799,7 @@ ppc_linux_remove_mask_watchpoint (struct target_ops *ops, CORE_ADDR addr, p.addr2 = mask; p.condition_value = 0; - iterate_over_lwps (minus_one_ptid, booke_remove_point_callback, &p); + linux_nat_iterate_watchpoint_lwps (booke_remove_point_callback, &p); return 0; } diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp index 92a81f7..3c4ad8b 100644 --- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp +++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp @@ -15,6 +15,13 @@ set testfile "watchpoint-multi" +# Multiple inferiors are needed, therefore both native and extended gdbserver +# modes are supported. Only non-extended gdbserver is not supported. +if [target_info exists use_gdb_stub] { + untested ${testfile}.exp + return +} + # Do not use simple hardware watchpoints ("watch") as its false hit may be # unnoticed by GDB if it reads it still has the same value. if [skip_hw_watchpoint_access_tests] { @@ -33,13 +40,6 @@ if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executa clean_restart $executable -if [is_remote target] { - set target_exec [gdbserver_download_current_prog] - gdbserver_start_extended - - gdb_test_no_output "set remote exec-file $target_exec" "set remote exec-file" -} - # Simulate non-stop+target-async which also uses breakpoint always-inserted. gdb_test_no_output "set breakpoint always-inserted on" # displaced-stepping is also needed as other GDB sometimes still removes the diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.exp b/gdb/testsuite/gdb.threads/watchpoint-fork.exp index 1785f87..96d2104 100644 --- a/gdb/testsuite/gdb.threads/watchpoint-fork.exp +++ b/gdb/testsuite/gdb.threads/watchpoint-fork.exp @@ -15,15 +15,15 @@ # Test case for forgotten hw-watchpoints after fork()-off of a process. +set testfile watchpoint-fork + if [is_remote target] { kfail "remote/13584" "gdbserver does not support debugging across fork" return } proc test {type symbol} { - global objdir subdir srcdir gdb_prompt - - set testfile watchpoint-fork + global testfile objdir subdir srcdir gdb_prompt global pf_prefix set prefix_test $pf_prefix @@ -151,8 +151,8 @@ proc test {type symbol} { test parent FOLLOW_PARENT # Only GNU/Linux is known to support `set follow-fork-mode child'. -if {[istarget "*-*-linux*"] && ![is_remote target]} { +if [istarget "*-*-linux*"] { hooks/post-receive -- Repository for Project Archer.