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: 47197 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3D49B2121F for ; Wed, 15 Apr 2015 14:24:06 +0000 (UTC) Received: by labgx2 with SMTP id gx2sf10466606lab.1 for ; Wed, 15 Apr 2015 07:24:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:x-original-sender:x-original-authentication-results; bh=v2YAHTZZdKKY7u4xrXLg+xt7QAmU4dK2QGyDJBt6ous=; b=CaLUXiWTKFb0y7oN62+1pvvl6c4knu/ZqjxRz3C2lsHervrok398CxVXb7ytrx5NPR GtiQmiEVfeKI+/7ULc6cm0dakHuBxy0SIhp7YUNpaO6ZSXJfzmYFER8HNHCV1206j3zj EiEjbnsb1ZOvTFORhwrm/lrylLB/xfYlQjQ/QJO39H4Jml/F57n09zBzBUFUzC8cwyop 9AvKN0nLfp0x8xSLPKBwfG/sT2LuM35RAdua7eW+uHBJcwD4O2Offs8nAAVVbmmk+4a8 mxHisu7WslrURFBHSPd1H37pa7agC4JYpQM9HmeaIf/rATSedsIqr7fwa1Q2h6KElCYm DPng== X-Gm-Message-State: ALoCoQlFBp332HgO1voekwkP0AF99iyonAZ69yghNHfF9ZhVmRHIQ2vCN9tHc88F4loGTDBAwfMf X-Received: by 10.112.42.236 with SMTP id r12mr5808892lbl.2.1429107845179; Wed, 15 Apr 2015 07:24:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.82 with SMTP id u18ls217627lal.79.gmail; Wed, 15 Apr 2015 07:24:04 -0700 (PDT) X-Received: by 10.152.6.1 with SMTP id w1mr23538626law.91.1429107844913; Wed, 15 Apr 2015 07:24:04 -0700 (PDT) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com. [2a00:1450:4010:c03::236]) by mx.google.com with ESMTPS id js14si4005608lab.166.2015.04.15.07.24.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Apr 2015 07:24:04 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::236 as permitted sender) client-ip=2a00:1450:4010:c03::236; Received: by laat2 with SMTP id t2so34004657laa.1 for ; Wed, 15 Apr 2015 07:24:04 -0700 (PDT) X-Received: by 10.112.160.227 with SMTP id xn3mr23692685lbb.112.1429107844593; Wed, 15 Apr 2015 07:24:04 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp2546881lbt; Wed, 15 Apr 2015 07:24:03 -0700 (PDT) X-Received: by 10.68.97.2 with SMTP id dw2mr46867196pbb.89.1429107842762; Wed, 15 Apr 2015 07:24:02 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id u13si7285633pdl.192.2015.04.15.07.24.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Apr 2015 07:24:02 -0700 (PDT) Received-SPF: pass (google.com: domain of gdb-patches-return-121979-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 58948 invoked by alias); 15 Apr 2015 14:23:54 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 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 X-Original-Sender: qiyaoltc@gmail.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::236 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com X-Google-Group-Id: 836684582541 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.