From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3124 invoked by alias); 18 Jun 2007 04:19:49 -0000 Received: (qmail 3110 invoked by uid 22791); 18 Jun 2007 04:19:47 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.29.156) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 18 Jun 2007 04:19:44 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.8/8.13.8) with ESMTP id l5I4JfeI121976 for ; Mon, 18 Jun 2007 04:19:41 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l5I4JfF23862534 for ; Mon, 18 Jun 2007 06:19:41 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l5I4Jfr8000578 for ; Mon, 18 Jun 2007 06:19:41 +0200 Received: from [9.152.248.39] (dyn-9-152-248-39.boeblingen.de.ibm.com [9.152.248.39]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l5I4Jeoj000573 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Jun 2007 06:19:41 +0200 Message-ID: <4676078B.8030301@de.ibm.com> Date: Mon, 18 Jun 2007 04:19:00 -0000 From: Markus Deuling User-Agent: Thunderbird 1.5.0.10 (X11/20070301) MIME-Version: 1.0 To: GDB Patches CC: Ulrich Weigand Subject: [rfc] Remove macro SOFTWARE_SINGLE_STEP Content-Type: multipart/mixed; boundary="------------000203090102070606020806" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00322.txt.bz2 This is a multi-part message in MIME format. --------------000203090102070606020806 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 518 Hello, this patch removes macro SOFTWARE_SINGLE_STEP from gdbarch.sh. ChangeLog: * gdbarch.sh (SOFTWARE_SINGLE_STEP): Replace by gdbarch_software_single_step. * infrun.c (resume): Likewise. * gdbarch.sh (SOFTWARE_SINGLE_STEP_P): Replace by gdbarch_software_single_step_p. * infrun.c (resume): Likewise (handle_inferior_event): Likewise. (adjust_pc_after_break): Likewise. * gdbarch.c, gdbarch.h: Regenerate. Is this ok to commit? -- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com --------------000203090102070606020806 Content-Type: text/plain; name="diff-remove-SOFTWARE_SINGLE_STEP" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diff-remove-SOFTWARE_SINGLE_STEP" Content-length: 6854 diff -urN src/gdb/gdbarch.c dev/gdb/gdbarch.c --- src/gdb/gdbarch.c 2007-06-18 05:36:42.000000000 +0200 +++ dev/gdb/gdbarch.c 2007-06-18 06:07:32.000000000 +0200 @@ -1067,21 +1067,9 @@ fprintf_unfiltered (file, "gdbarch_dump: smash_text_address = <0x%lx>\n", (long) current_gdbarch->smash_text_address); -#ifdef SOFTWARE_SINGLE_STEP_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "SOFTWARE_SINGLE_STEP_P()", - XSTRING (SOFTWARE_SINGLE_STEP_P ())); -#endif fprintf_unfiltered (file, "gdbarch_dump: gdbarch_software_single_step_p() = %d\n", gdbarch_software_single_step_p (current_gdbarch)); -#ifdef SOFTWARE_SINGLE_STEP - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "SOFTWARE_SINGLE_STEP(frame)", - XSTRING (SOFTWARE_SINGLE_STEP (frame))); -#endif fprintf_unfiltered (file, "gdbarch_dump: software_single_step = <0x%lx>\n", (long) current_gdbarch->software_single_step); diff -urN src/gdb/gdbarch.h dev/gdb/gdbarch.h --- src/gdb/gdbarch.h 2007-06-18 05:36:42.000000000 +0200 +++ dev/gdb/gdbarch.h 2007-06-18 06:07:23.000000000 +0200 @@ -659,30 +659,11 @@ A return value of 1 means that the software_single_step breakpoints were inserted; 0 means they were not. */ -#if defined (SOFTWARE_SINGLE_STEP) -/* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */ -#if !defined (SOFTWARE_SINGLE_STEP_P) -#define SOFTWARE_SINGLE_STEP_P() (1) -#endif -#endif - extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch); -#if !defined (GDB_TM_FILE) && defined (SOFTWARE_SINGLE_STEP_P) -#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" -#endif -#if !defined (SOFTWARE_SINGLE_STEP_P) -#define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch)) -#endif typedef int (gdbarch_software_single_step_ftype) (struct frame_info *frame); extern int gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame); extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); -#if !defined (GDB_TM_FILE) && defined (SOFTWARE_SINGLE_STEP) -#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" -#endif -#if !defined (SOFTWARE_SINGLE_STEP) -#define SOFTWARE_SINGLE_STEP(frame) (gdbarch_software_single_step (current_gdbarch, frame)) -#endif /* Return non-zero if the processor is executing a delay slot and a further single-step is needed before the instruction finishes. */ diff -urN src/gdb/gdbarch.sh dev/gdb/gdbarch.sh --- src/gdb/gdbarch.sh 2007-06-18 05:36:42.000000000 +0200 +++ dev/gdb/gdbarch.sh 2007-06-18 06:07:09.000000000 +0200 @@ -606,7 +606,7 @@ # # A return value of 1 means that the software_single_step breakpoints # were inserted; 0 means they were not. -F:=:int:software_single_step:struct frame_info *frame:frame +F::int:software_single_step:struct frame_info *frame:frame # Return non-zero if the processor is executing a delay slot and a # further single-step is needed before the instruction finishes. diff -urN src/gdb/infrun.c dev/gdb/infrun.c --- src/gdb/infrun.c 2007-06-18 05:36:42.000000000 +0200 +++ dev/gdb/infrun.c 2007-06-18 06:13:17.000000000 +0200 @@ -537,10 +537,10 @@ a command like `return' or `jump' to continue execution.")); } - if (SOFTWARE_SINGLE_STEP_P () && step) + if (gdbarch_software_single_step_p (current_gdbarch) && step) { /* Do it the hard way, w/temp breakpoints */ - if (SOFTWARE_SINGLE_STEP (get_current_frame ())) + if (gdbarch_software_single_step (current_gdbarch, get_current_frame ())) { /* ...and don't ask hardware to do it. */ step = 0; @@ -1184,7 +1184,7 @@ breakpoint_pc = read_pc_pid (ecs->ptid) - gdbarch_decr_pc_after_break (current_gdbarch); - if (SOFTWARE_SINGLE_STEP_P ()) + if (gdbarch_software_single_step_p (current_gdbarch)) { /* When using software single-step, a SIGTRAP can only indicate an inserted breakpoint. This actually makes things @@ -1373,7 +1373,8 @@ (LONGEST) ecs->ws.value.integer)); gdb_flush (gdb_stdout); target_mourn_inferior (); - singlestep_breakpoints_inserted_p = 0; /* SOFTWARE_SINGLE_STEP_P() */ + /* gdbarch_software_single_step_p */ + singlestep_breakpoints_inserted_p = 0; stop_print_frame = 0; stop_stepping (ecs); return; @@ -1393,7 +1394,8 @@ target_mourn_inferior (); print_stop_reason (SIGNAL_EXITED, stop_signal); - singlestep_breakpoints_inserted_p = 0; /* SOFTWARE_SINGLE_STEP_P() */ + /* gdbarch_software_single_step_p */ + singlestep_breakpoints_inserted_p = 0; stop_stepping (ecs); return; @@ -1549,7 +1551,7 @@ if (stepping_past_singlestep_breakpoint) { - gdb_assert (SOFTWARE_SINGLE_STEP_P () + gdb_assert (gdbarch_software_single_step_p (current_gdbarch) && singlestep_breakpoints_inserted_p); gdb_assert (ptid_equal (singlestep_ptid, ecs->ptid)); gdb_assert (!ptid_equal (singlestep_ptid, saved_singlestep_ptid)); @@ -1599,7 +1601,8 @@ if (!breakpoint_thread_match (stop_pc, ecs->ptid)) thread_hop_needed = 1; } - else if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) + else if (gdbarch_software_single_step_p (current_gdbarch) + && singlestep_breakpoints_inserted_p) { /* We have not context switched yet, so this should be true no matter which thread hit the singlestep breakpoint. */ @@ -1670,7 +1673,8 @@ /* Saw a breakpoint, but it was hit by the wrong thread. Just continue. */ - if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) + if (gdbarch_software_single_step_p (current_gdbarch) + && singlestep_breakpoints_inserted_p) { /* Pull the single step breakpoints out of the target. */ remove_single_step_breakpoints (); @@ -1719,7 +1723,8 @@ return; } } - else if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) + else if (gdbarch_software_single_step_p (current_gdbarch) + && singlestep_breakpoints_inserted_p) { sw_single_step_trap_p = 1; ecs->random_signal = 0; @@ -1741,7 +1746,8 @@ deprecated_context_hook (pid_to_thread_id (ecs->ptid)); } - if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) + if (gdbarch_software_single_step_p (current_gdbarch) + && singlestep_breakpoints_inserted_p) { /* Pull the single step breakpoints out of the target. */ remove_single_step_breakpoints (); --------------000203090102070606020806--