From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1653 invoked by alias); 9 Oct 2002 12:00:13 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1553 invoked from network); 9 Oct 2002 12:00:09 -0000 Received: from unknown (HELO www.lampret.com) (193.189.173.98) by sources.redhat.com with SMTP; 9 Oct 2002 12:00:09 -0000 Received: from vili ([212.118.94.130]) by www.lampret.com (8.11.6/8.11.6) with ESMTP id g99EwKQ11929 for ; Wed, 9 Oct 2002 13:58:20 -0100 Content-Type: text/plain; charset="iso-8859-1" From: Marko Mlinar To: gdb-patches@sources.redhat.com Subject: Re: Merging OC gdb with official gdb Date: Wed, 09 Oct 2002 05:00:00 -0000 User-Agent: KMail/1.4.1 References: <200209041256.47379.markom@opencores.org> <200209201401.55531.markom@opencores.org> <3D9B8699.5000708@redhat.com> In-Reply-To: <3D9B8699.5000708@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200210091359.54866.markom@opencores.org> X-SW-Source: 2002-10/txt/msg00206.txt.bz2 > >> > #define HAVE_NONSTEPPABLE_WATCHPOINT > > > > What about this? > > Um, that will need thinking about (add to architecture or target vector)? > > Sigh, for the moment, add it (separate patch) as a variable to the > architecture vector and then create a bug report noteing that it needs a > re-think. I've sumbitted a bug report and committed the patch: Index: ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.3305 diff -c -3 -p -r1.3305 ChangeLog *** ChangeLog 9 Oct 2002 04:43:49 -0000 1.3305 --- ChangeLog 9 Oct 2002 11:44:06 -0000 *************** *** 1,3 **** --- 1,9 ---- + 2002-10-09 Marko Mlinar + + * infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT in= to=20 C. + * gdbarch.sh (HAVE_NONSTEPPABLE_WATCHPOINT): Add. + * gdbarch.h, gdbarch.c: Re-generate. + 2002-10-08 Petr Sorfa Revised and re-submitted by John Wolfe Index: gdbarch.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/gdbarch.c,v retrieving revision 1.151 diff -c -3 -p -r1.151 gdbarch.c *** gdbarch.c 2 Oct 2002 23:28:53 -0000 1.151 --- gdbarch.c 9 Oct 2002 11:44:07 -0000 *************** struct gdbarch *** 270,275 **** --- 270,276 ---- gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special; const char * name_of_malloc; int cannot_step_breakpoint; + int have_nonsteppable_watchpoint; }; *************** verify_gdbarch (struct gdbarch *gdbarch) *** 807,812 **** --- 808,814 ---- /* Skip verify of coff_make_msymbol_special, invalid_p =3D=3D 0 */ /* Skip verify of name_of_malloc, invalid_p =3D=3D 0 */ /* Skip verify of cannot_step_breakpoint, invalid_p =3D=3D 0 */ + /* Skip verify of have_nonsteppable_watchpoint, invalid_p =3D=3D 0 */ buf =3D ui_file_xstrdup (log, &dummy); make_cleanup (xfree, buf); if (strlen (buf) > 0) *************** gdbarch_dump (struct gdbarch *gdbarch, s *** 1383,1388 **** --- 1385,1398 ---- (long) current_gdbarch->get_saved_register /*GET_SAVED_REGISTER ()*/); #endif + #ifdef HAVE_STEPPABLE_WATCHPOINT + fprintf_unfiltered (file, + "gdbarch_dump: HAVE_STEPPABLE_WATCHPOINT # %s\n", + XSTRING (HAVE_STEPPABLE_WATCHPOINT)); + fprintf_unfiltered (file, + "gdbarch_dump: HAVE_STEPPABLE_WATCHPOINT =3D %d\n", + HAVE_STEPPABLE_WATCHPOINT); + #endif #ifdef INIT_EXTRA_FRAME_INFO #if GDB_MULTI_ARCH /* Macro might contain `[{}]' when not multi-arch */ *************** set_gdbarch_cannot_step_breakpoint (stru *** 5050,5055 **** --- 5060,5082 ---- int cannot_step_breakpoint) { gdbarch->cannot_step_breakpoint =3D cannot_step_breakpoint; + } + + int + gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch) + { + gdb_assert (gdbarch !=3D NULL); + /* Skip verify of have_nonsteppable_watchpoint, invalid_p =3D=3D 0 */ + if (gdbarch_debug >=3D 2) + fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint= =20 called\n"); + return gdbarch->have_nonsteppable_watchpoint; + } + + void + set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, + int have_nonsteppable_watchpoint) + { + gdbarch->have_nonsteppable_watchpoint =3D have_nonsteppable_watchpoint; } Index: gdbarch.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/gdbarch.h,v retrieving revision 1.119 diff -c -3 -p -r1.119 gdbarch.h *** gdbarch.h 2 Oct 2002 23:28:53 -0000 1.119 --- gdbarch.h 9 Oct 2002 11:44:07 -0000 *************** extern void set_gdbarch_cannot_step_brea *** 2595,2600 **** --- 2595,2616 ---- #endif #endif + /* Default (value) for non- multi-arch platforms. */ + #if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT) + #define HAVE_NONSTEPPABLE_WATCHPOINT (0) + #endif + + extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch); + extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch=20 *gdbarch, int have_nonsteppable_watchpoint); + #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined=20 (HAVE_NONSTEPPABLE_WATCHPOINT) + #error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT" + #endif + #if GDB_MULTI_ARCH + #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined=20 (HAVE_NONSTEPPABLE_WATCHPOINT) + #define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoin= t=20 (current_gdbarch)) + #endif + #endif + extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); Index: gdbarch.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/gdbarch.sh,v retrieving revision 1.163 diff -c -3 -p -r1.163 gdbarch.sh *** gdbarch.sh 2 Oct 2002 23:28:53 -0000 1.163 --- gdbarch.sh 9 Oct 2002 11:44:07 -0000 *************** f:2:ELF_MAKE_MSYMBOL_SPECIAL:void:elf_ma *** 663,668 **** --- 663,669 ---- f:2:COFF_MAKE_MSYMBOL_SPECIAL:void:coff_make_msymbol_special:int val, str= uct=20 minimal_symbol *msym:val, msym:::default_coff_make_msymbol_special::0 v::NAME_OF_MALLOC:const char *:name_of_malloc::::"malloc":"malloc"::0 v::CANNOT_STEP_BREAKPOINT:int:cannot_step_breakpoint::::0:0::0 + v::HAVE_NONSTEPPABLE_WATCHPOINT:int:have_nonsteppable_watchpoint::::0:0::0 EOF }