From patchwork Wed Apr 15 14:23:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 6233 Received: (qmail 58948 invoked by alias); 15 Apr 2015 14:23:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 58938 invoked by uid 89); 15 Apr 2015 14:23:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f174.google.com Received: from mail-pd0-f174.google.com (HELO mail-pd0-f174.google.com) (209.85.192.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 15 Apr 2015 14:23:52 +0000 Received: by pdbnk13 with SMTP id nk13so54327605pdb.0 for ; Wed, 15 Apr 2015 07:23:51 -0700 (PDT) X-Received: by 10.68.65.1 with SMTP id t1mr47299923pbs.63.1429107831259; Wed, 15 Apr 2015 07:23:51 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id ox4sm4341952pdb.36.2015.04.15.07.23.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Apr 2015 07:23:50 -0700 (PDT) From: Yao Qi To: gdb-patches@sourceware.org Subject: [obv] Fix code indentation Date: Wed, 15 Apr 2015 15:23:42 +0100 Message-Id: <1429107822-12189-1-git-send-email-qiyaoltc@gmail.com> X-IsSubscribed: yes From: Yao Qi Hi, I find the indentation of the code in function arm_linux_copy_svc is incorrect. This patch is fix it. I'll commit it. gdb: 2015-04-15 Yao Qi * arm-linux-tdep.c (arm_linux_copy_svc): Fix indentation. --- gdb/arm-linux-tdep.c | 83 ++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 60266b5..16e8f44 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -980,49 +980,50 @@ arm_linux_copy_svc (struct gdbarch *gdbarch, struct regcache *regs, &return_to, &is_thumb); if (is_sigreturn) { - struct symtab_and_line sal; - - if (debug_displaced) - fprintf_unfiltered (gdb_stdlog, "displaced: found " - "sigreturn/rt_sigreturn SVC call. PC in frame = %lx\n", - (unsigned long) get_frame_pc (frame)); - - if (debug_displaced) - fprintf_unfiltered (gdb_stdlog, "displaced: unwind pc = %lx. " - "Setting momentary breakpoint.\n", (unsigned long) return_to); - - gdb_assert (inferior_thread ()->control.step_resume_breakpoint - == NULL); - - sal = find_pc_line (return_to, 0); - sal.pc = return_to; - sal.section = find_pc_overlay (return_to); - sal.explicit_pc = 1; - - frame = get_prev_frame (frame); - - if (frame) - { - inferior_thread ()->control.step_resume_breakpoint - = set_momentary_breakpoint (gdbarch, sal, get_frame_id (frame), - bp_step_resume); - - /* set_momentary_breakpoint invalidates FRAME. */ - frame = NULL; - - /* We need to make sure we actually insert the momentary - breakpoint set above. */ - insert_breakpoints (); - } - else if (debug_displaced) - fprintf_unfiltered (gdb_stderr, "displaced: couldn't find previous " - "frame to set momentary breakpoint for " - "sigreturn/rt_sigreturn\n"); + struct symtab_and_line sal; + + if (debug_displaced) + fprintf_unfiltered (gdb_stdlog, "displaced: found " + "sigreturn/rt_sigreturn SVC call. PC in " + "frame = %lx\n", + (unsigned long) get_frame_pc (frame)); + + if (debug_displaced) + fprintf_unfiltered (gdb_stdlog, "displaced: unwind pc = %lx. " + "Setting momentary breakpoint.\n", + (unsigned long) return_to); + + gdb_assert (inferior_thread ()->control.step_resume_breakpoint + == NULL); + + sal = find_pc_line (return_to, 0); + sal.pc = return_to; + sal.section = find_pc_overlay (return_to); + sal.explicit_pc = 1; + + frame = get_prev_frame (frame); + + if (frame) + { + inferior_thread ()->control.step_resume_breakpoint + = set_momentary_breakpoint (gdbarch, sal, get_frame_id (frame), + bp_step_resume); + + /* set_momentary_breakpoint invalidates FRAME. */ + frame = NULL; + + /* We need to make sure we actually insert the momentary + breakpoint set above. */ + insert_breakpoints (); } else if (debug_displaced) - fprintf_unfiltered (gdb_stdlog, "displaced: sigreturn/rt_sigreturn " - "SVC call not in signal trampoline frame\n"); - + fprintf_unfiltered (gdb_stderr, "displaced: couldn't find previous " + "frame to set momentary breakpoint for " + "sigreturn/rt_sigreturn\n"); + } + else if (debug_displaced) + fprintf_unfiltered (gdb_stdlog, "displaced: sigreturn/rt_sigreturn " + "SVC call not in signal trampoline frame\n"); /* Preparation: If we detect sigreturn, set momentary breakpoint at resume location, else nothing.