From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95518 invoked by alias); 31 Aug 2016 15:06:25 -0000 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 Received: (qmail 95339 invoked by uid 89); 31 Aug 2016 15:06:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=welcome!, gdb-patches, HERE X-HELO: mail-pf0-f194.google.com Received: from mail-pf0-f194.google.com (HELO mail-pf0-f194.google.com) (209.85.192.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Aug 2016 15:06:14 +0000 Received: by mail-pf0-f194.google.com with SMTP id i6so2903732pfe.0 for ; Wed, 31 Aug 2016 08:06:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=SIn/09VnClbhapuL0VzYu4FrkEmqoLXWdn/p4o7QaUs=; b=JbL4w5AqT/2vvdwoSWPzHKeilSRLPhx+6KCgSZSwknnr6+L7fbB01MKvvdarbsoV/J Lv4Wh73XLBPDRvbDfFdjp0n+URC/rWUsZ9//MSZCGjoaMwRrlXONG+2h/eYEakBJcc7w 8vfV8/c/4ihcjeBdvv8O9Gdt+ws+RKGKaJKBjkXu9Xkt7Y2m1qJHvSw3dP8PWo1ZDWSM p4XcIBy6VUqf0uQ+b/zZL8J+JAVuy0iJLv9DpEvToOk46qwtFgNbmvqM5AkbhqNHevFx whiahdgbiWXHkuKqIVZkfCXM2YwyTQxMlDoS1EGlyAVBB2lQWmTs4xxF2jadsTCHPN+W bxhg== X-Gm-Message-State: AE9vXwOH2yCn241Br6dAdNBQs9lrDXlBJLYDOij3jfzQBkBvqtQsSuC7vRQKEdKWOHoP3w== X-Received: by 10.98.29.201 with SMTP id d192mr17777470pfd.142.1472655969864; Wed, 31 Aug 2016 08:06:09 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc115.osuosl.org. [140.211.9.73]) by smtp.gmail.com with ESMTPSA id c125sm464809pfc.40.2016.08.31.08.06.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Aug 2016 08:06:09 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 00/13] Split brekapoint_from_pc to breakpoint_kind_from_pc and sw_breakpoint_from_kind Date: Wed, 31 Aug 2016 15:06:00 -0000 Message-Id: <1472655965-12212-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00318.txt.bz2 This patch series is to split gdbarch method brekapoint_from_pc to methods breakpoint_kind_from_pc and sw_breakpoint_from_kind. After these changes, new gdbarch methods breakpoint_kind_from_pc and sw_breakpoint_from_kind are more preferred than brekapoint_from_pc. In this patch https://sourceware.org/ml/gdb-patches/2016-05/msg00201.html, I wanted to remove a global variable arm_override_mode, and the discussion leads to a design here https://sourceware.org/ml/gdb-patches/2016-07/msg00211.html In short, we reuse bp_target_info.placed_size as the "kind" of a breakpoint, which can be got by gdbarch breakpoint_kind_from_pc or breakpoint_kind_from_current_state. I choose a way that I can change the code incrementally, and make the review easier. Patch #1, #2, #5, and #8 are obvious, IMO. Patch #7 and #12 do the major work, and the rest are code refactor. Regression tested on arm-linux and x86_64-linux. Tests on other architectures are welcome! *** BLURB HERE *** Yao Qi (13): Remove v850_dbtrap_breakpoint_from_pc Rename 'arch' by 'gdbarch' in m32c_gdbarch_init gdbarch_breakpoint_from_pc doesn't return NULL GDBARCH_BREAKPOINT_MANIPULATION and SET_GDBARCH_BREAKPOINT_MANIPULATION Share enum arm_breakpoint_kinds Add enum for mips breakpoint kinds Split brekapoint_from_pc to breakpoint_kind_from_pc and sw_breakpoint_from_kind New gdbarch methods breakpoint_kind_from_pc and sw_breakpoint_from_kind Rename placed_size to kind Remove gdbarch_remote_breakpoint_from_pc Add default_breakpoint_from_pc Determine the kind of single step breakpoint Remove arm_override_mode gdb/aarch64-tdep.c | 12 +- gdb/alpha-tdep.c | 12 +- gdb/arch-utils.c | 18 ++- gdb/arch-utils.h | 52 ++++++++- gdb/arch/arm.h | 8 ++ gdb/arm-tdep.c | 125 +++++++++++++------- gdb/avr-tdep.c | 13 +-- gdb/bfin-tdep.c | 32 +++--- gdb/breakpoint.c | 27 +++++ gdb/breakpoint.h | 10 +- gdb/cris-tdep.c | 24 ++-- gdb/frv-tdep.c | 12 +- gdb/ft32-tdep.c | 13 +-- gdb/gdbarch.c | 76 +++++++++--- gdb/gdbarch.h | 26 ++++- gdb/gdbarch.sh | 20 +++- gdb/gdbserver/linux-aarch32-low.c | 8 -- gdb/h8300-tdep.c | 14 +-- gdb/hppa-tdep.c | 12 +- gdb/i386-tdep.c | 11 +- gdb/ia64-tdep.c | 15 ++- gdb/iq2000-tdep.c | 21 ++-- gdb/lm32-tdep.c | 12 +- gdb/m32c-tdep.c | 53 ++++----- gdb/m32r-tdep.c | 51 ++++---- gdb/m68hc11-tdep.c | 13 +-- gdb/m68k-tdep.c | 13 +-- gdb/m88k-tdep.c | 15 +-- gdb/mem-break.c | 15 ++- gdb/mep-tdep.c | 12 +- gdb/microblaze-linux-tdep.c | 2 - gdb/microblaze-tdep.c | 13 +-- gdb/mips-tdep.c | 236 +++++++++++++++++++------------------- gdb/mn10300-tdep.c | 12 +- gdb/moxie-tdep.c | 14 +-- gdb/msp430-tdep.c | 14 +-- gdb/mt-tdep.c | 27 +++-- gdb/nios2-tdep.c | 98 +++++++++------- gdb/ppc-linux-tdep.c | 2 - gdb/record-full.c | 10 -- gdb/remote.c | 20 +--- gdb/rl78-tdep.c | 22 ++-- gdb/rs6000-tdep.c | 19 +-- gdb/rx-tdep.c | 13 +-- gdb/s390-linux-tdep.c | 14 +-- gdb/score-tdep.c | 119 ++++++++++--------- gdb/sh-tdep.c | 38 +++--- gdb/sh64-tdep.c | 69 +++++------ gdb/sparc-tdep.c | 12 +- gdb/spu-tdep.c | 13 +-- gdb/tic6x-tdep.c | 17 ++- gdb/tilegx-tdep.c | 18 +-- gdb/v850-tdep.c | 60 +++++----- gdb/vax-tdep.c | 13 +-- gdb/xstormy16-tdep.c | 13 +-- gdb/xtensa-tdep.c | 55 ++++----- 56 files changed, 879 insertions(+), 809 deletions(-) -- 1.9.1