* [PATCH 00/11] Regset rework preparations part 1 @ 2014-05-15 15:49 Andreas Arnez 2014-05-15 15:49 ` [PATCH 02/11] Remove 'arch' field from regset structure Andreas Arnez ` (11 more replies) 0 siblings, 12 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:49 UTC (permalink / raw) To: gdb-patches This is the first half of the "regset rework preparations" series I've posted as RFC: https://sourceware.org/ml/gdb-patches/2014-04/msg00560.html Changes since original post: * Split initializers of the form "tdep = gdbarch_tdep (get_regcache_arch (...))" in two lines. (https://sourceware.org/ml/gdb-patches/2014-05/msg00042.html) * Keep i386_supply_gregset as a global function. (https://sourceware.org/ml/gdb-patches/2014-04/msg00607.html) * Added ChangeLog to SPARC renaming patch. * Clipped off the second half of the series. I will ping that later again, when we're done with the first half. Andreas Arnez (11): Constify regset structures. Remove 'arch' field from regset structure. AARCH64: Replace regset_alloc() invocations by static regset structures. ARM: Replace regset_alloc() invocations by static regset structures. X86: Replace regset_alloc() invocations by static regset structures. MIPS: Replace regset_alloc() invocations by static regset structures. MN10300: Replace regset_alloc() invocations by static regset structures. SCORE: Replace regset_alloc() invocation by a static regset structure. SPARC: Rename register maps from "*regset" to "*regmap" SPARC: Replace regset_alloc() invocations by static regset structures. Drop regset_alloc(). gdb/Makefile.in | 4 +-- gdb/aarch64-linux-tdep.c | 29 ++++++++--------- gdb/aarch64-tdep.h | 4 --- gdb/alpha-linux-tdep.c | 4 +-- gdb/alphanbsd-tdep.c | 6 ++-- gdb/amd64-tdep.c | 33 ++++++++++--------- gdb/amd64obsd-tdep.c | 14 +++++---- gdb/arm-linux-tdep.c | 38 +++++++++++----------- gdb/arm-tdep.h | 3 -- gdb/armbsd-tdep.c | 4 +-- gdb/frv-linux-tdep.c | 4 +-- gdb/hppa-hpux-tdep.c | 2 +- gdb/hppa-linux-tdep.c | 4 +-- gdb/hppanbsd-tdep.c | 2 +- gdb/hppaobsd-tdep.c | 4 +-- gdb/i386-cygwin-tdep.c | 9 +----- gdb/i386-nto-tdep.c | 8 ++--- gdb/i386-tdep.c | 58 +++++++++++++++++----------------- gdb/i386-tdep.h | 14 ++------- gdb/i386obsd-tdep.c | 15 ++++----- gdb/m32r-linux-tdep.c | 2 +- gdb/m68kbsd-tdep.c | 4 +-- gdb/m88k-tdep.c | 2 +- gdb/mips-linux-tdep.c | 53 ++++++++++++++----------------- gdb/mips-tdep.c | 4 --- gdb/mips-tdep.h | 8 ----- gdb/mips64obsd-tdep.c | 2 +- gdb/mipsnbsd-tdep.c | 4 +-- gdb/mn10300-linux-tdep.c | 21 +++++++------ gdb/nios2-linux-tdep.c | 3 +- gdb/ppc-linux-tdep.c | 15 +++------ gdb/ppcfbsd-tdep.c | 8 ++--- gdb/ppcnbsd-tdep.c | 4 +-- gdb/ppcnbsd-tdep.h | 4 +-- gdb/ppcobsd-tdep.c | 4 +-- gdb/ppcobsd-tdep.h | 4 +-- gdb/regset.c | 44 -------------------------- gdb/regset.h | 14 --------- gdb/rs6000-aix-tdep.c | 4 +-- gdb/score-tdep.c | 21 +++++-------- gdb/score-tdep.h | 7 ----- gdb/sh-tdep.c | 4 +-- gdb/sh-tdep.h | 2 +- gdb/sparc-linux-nat.c | 10 +++--- gdb/sparc-linux-tdep.c | 30 ++++++++++++------ gdb/sparc-nat.c | 28 ++++++++--------- gdb/sparc-nat.h | 16 +++++----- gdb/sparc-sol2-nat.c | 16 +++++----- gdb/sparc-sol2-tdep.c | 4 +-- gdb/sparc-tdep.c | 50 ++++++++++++++--------------- gdb/sparc-tdep.h | 28 ++++++++--------- gdb/sparc64-linux-nat.c | 14 ++++----- gdb/sparc64-linux-tdep.c | 30 ++++++++++++------ gdb/sparc64-sol2-tdep.c | 4 +-- gdb/sparc64-tdep.c | 82 ++++++++++++++++++++++++------------------------ gdb/sparc64-tdep.h | 20 ++++++------ gdb/sparc64fbsd-nat.c | 2 +- gdb/sparc64fbsd-tdep.c | 26 +++++++++------ gdb/sparc64nbsd-nat.c | 24 +++++++------- gdb/sparc64nbsd-tdep.c | 20 +++++++++--- gdb/sparc64obsd-nat.c | 4 +-- gdb/sparc64obsd-tdep.c | 27 ++++++++++------ gdb/sparcnbsd-nat.c | 4 +-- gdb/sparcnbsd-tdep.c | 22 +++++++++---- gdb/tilegx-linux-tdep.c | 2 +- gdb/vax-tdep.c | 2 +- 66 files changed, 452 insertions(+), 510 deletions(-) delete mode 100644 gdb/regset.c -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 02/11] Remove 'arch' field from regset structure. 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez @ 2014-05-15 15:49 ` Andreas Arnez 2014-05-15 15:49 ` [PATCH 09/11] SPARC: Rename register maps from "*regset" to "*regmap" Andreas Arnez ` (10 subsequent siblings) 11 siblings, 0 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:49 UTC (permalink / raw) To: gdb-patches Removes the 'arch' field from the regset structure, since it represents the only "dynamic" data in a regset. It was referenced in some regset supply- and collect routines, to get access to the gdbarch associated with the regset. Naturally, the affected routines always have access to the regcache to be supplied to or collected from. Thus the gdbarch associated with that regcache can be used instead. gdb/ * regset.h (struct regset): Remove gdbarch field. * regset.c (regset_alloc): Drop initialization of gdbarch field. * nios2-linux-tdep.c (nios2_core_regset): Likewise. * ppcfbsd-tdep.c (ppc32_fbsd_gregset, ppc64_fbsd_gregset): Likewise. * ppc-linux-tdep.c (ppc32_linux_gregset, ppc64_linux_gregset) (ppc32_linux_fpregset, ppc32_linux_vrregset) (ppc32_linux_vsxregset): Likewise. * i386obsd-tdep.c (i386obsd_aout_supply_regset): Get the gdbarch via the regcache instead of the regset. * i386-tdep.c (i386_supply_gregset, i386_collect_gregset) (i386_supply_fpregset, i386_collect_fpregset): Likewise. * amd64obsd-tdep.c (amd64obsd_supply_regset): Likewise. * amd64-tdep.c (amd64_supply_fpregset, amd64_collect_fpregset): Likewise. --- gdb/amd64-tdep.c | 6 ++++-- gdb/amd64obsd-tdep.c | 3 ++- gdb/i386-tdep.c | 12 ++++++++---- gdb/i386obsd-tdep.c | 3 ++- gdb/nios2-linux-tdep.c | 1 - gdb/ppc-linux-tdep.c | 15 +++++---------- gdb/ppcfbsd-tdep.c | 6 ++---- gdb/regset.c | 1 - gdb/regset.h | 3 --- 9 files changed, 23 insertions(+), 27 deletions(-) diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 035b460..1b9797a 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -2842,7 +2842,8 @@ static void amd64_supply_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len) { - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); gdb_assert (len == tdep->sizeof_fpregset); amd64_supply_fxsave (regcache, regnum, fpregs); @@ -2858,7 +2859,8 @@ amd64_collect_fpregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *fpregs, size_t len) { - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); gdb_assert (len == tdep->sizeof_fpregset); amd64_collect_fxsave (regcache, regnum, fpregs); diff --git a/gdb/amd64obsd-tdep.c b/gdb/amd64obsd-tdep.c index 9446318..2cc0a0f 100644 --- a/gdb/amd64obsd-tdep.c +++ b/gdb/amd64obsd-tdep.c @@ -45,7 +45,8 @@ amd64obsd_supply_regset (const struct regset *regset, struct regcache *regcache, int regnum, const void *regs, size_t len) { - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FXSAVE); diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index ecbf730..7d2363f 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -3724,7 +3724,8 @@ void i386_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len) { - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); const gdb_byte *regs = gregs; int i; @@ -3748,7 +3749,8 @@ i386_collect_gregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len) { - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); gdb_byte *regs = gregs; int i; @@ -3770,7 +3772,8 @@ static void i386_supply_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len) { - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); if (len == I387_SIZEOF_FXSAVE) { @@ -3792,7 +3795,8 @@ i386_collect_fpregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *fpregs, size_t len) { - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); if (len == I387_SIZEOF_FXSAVE) { diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c index cf19c50..7d9ba93 100644 --- a/gdb/i386obsd-tdep.c +++ b/gdb/i386obsd-tdep.c @@ -142,7 +142,8 @@ i386obsd_aout_supply_regset (const struct regset *regset, struct regcache *regcache, int regnum, const void *regs, size_t len) { - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); const gdb_byte *gregs = regs; gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE); diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c index d9a51a8..84ab576 100644 --- a/gdb/nios2-linux-tdep.c +++ b/gdb/nios2-linux-tdep.c @@ -78,7 +78,6 @@ static const struct regset nios2_core_regset = NULL, nios2_supply_gregset, NULL, - NULL }; /* Implement the regset_from_core_section gdbarch method. */ diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 5278a24..5410554 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -498,36 +498,31 @@ static const struct ppc_reg_offsets ppc64_linux_reg_offsets = static const struct regset ppc32_linux_gregset = { &ppc32_linux_reg_offsets, ppc_linux_supply_gregset, - ppc_linux_collect_gregset, - NULL + ppc_linux_collect_gregset }; static const struct regset ppc64_linux_gregset = { &ppc64_linux_reg_offsets, ppc_linux_supply_gregset, - ppc_linux_collect_gregset, - NULL + ppc_linux_collect_gregset }; static const struct regset ppc32_linux_fpregset = { &ppc32_linux_reg_offsets, ppc_supply_fpregset, - ppc_collect_fpregset, - NULL + ppc_collect_fpregset }; static const struct regset ppc32_linux_vrregset = { &ppc32_linux_reg_offsets, ppc_supply_vrregset, - ppc_collect_vrregset, - NULL + ppc_collect_vrregset }; static const struct regset ppc32_linux_vsxregset = { &ppc32_linux_reg_offsets, ppc_supply_vsxregset, - ppc_collect_vsxregset, - NULL + ppc_collect_vsxregset }; const struct regset * diff --git a/gdb/ppcfbsd-tdep.c b/gdb/ppcfbsd-tdep.c index 77292f3..28f5b7b 100644 --- a/gdb/ppcfbsd-tdep.c +++ b/gdb/ppcfbsd-tdep.c @@ -100,8 +100,7 @@ static const struct ppc_reg_offsets ppc64_fbsd_reg_offsets = static const struct regset ppc32_fbsd_gregset = { &ppc32_fbsd_reg_offsets, ppc_supply_gregset, - ppc_collect_gregset, - NULL + ppc_collect_gregset }; /* 64-bit general-purpose register set. */ @@ -109,8 +108,7 @@ static const struct regset ppc32_fbsd_gregset = { static const struct regset ppc64_fbsd_gregset = { &ppc64_fbsd_reg_offsets, ppc_supply_gregset, - ppc_collect_gregset, - NULL + ppc_collect_gregset }; /* 32-/64-bit floating-point register set. */ diff --git a/gdb/regset.c b/gdb/regset.c index a56641f..1d19d34 100644 --- a/gdb/regset.c +++ b/gdb/regset.c @@ -36,7 +36,6 @@ regset_alloc (struct gdbarch *arch, { struct regset *regset = GDBARCH_OBSTACK_ZALLOC (arch, struct regset); - regset->arch = arch; regset->supply_regset = supply_regset; regset->collect_regset = collect_regset; diff --git a/gdb/regset.h b/gdb/regset.h index fe804cc..f1a6e24 100644 --- a/gdb/regset.h +++ b/gdb/regset.h @@ -50,9 +50,6 @@ struct regset /* Function collecting values in a register set from a register cache. */ collect_regset_ftype *collect_regset; - - /* Architecture associated with the register set. */ - struct gdbarch *arch; }; /* Allocate a fresh 'struct regset' whose supply_regset function is -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 09/11] SPARC: Rename register maps from "*regset" to "*regmap" 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez 2014-05-15 15:49 ` [PATCH 02/11] Remove 'arch' field from regset structure Andreas Arnez @ 2014-05-15 15:49 ` Andreas Arnez 2014-05-15 15:49 ` [PATCH 03/11] AARCH64: Replace regset_alloc() invocations by static regset structures Andreas Arnez ` (9 subsequent siblings) 11 siblings, 0 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:49 UTC (permalink / raw) To: gdb-patches Clear the naming confusion about "regset" versus "sparc*regset". The latter was used to represent the *map* of a register set, not the register set itself, and is thus renamed accordingly. The following identifiers are renamed: sparc32_bsd_fpregset => sparc32_bsd_fpregmap sparc32_linux_core_gregset => sparc32_linux_core_gregmap sparc32_sol2_fpregset => sparc32_sol2_fpregmap sparc32_sol2_gregset => sparc32_sol2_gregmap sparc32_sunos4_fpregset => sparc32_sunos4_fpregmap sparc32_sunos4_gregset => sparc32_sunos4_gregmap sparc32nbsd_gregset => sparc32nbsd_gregmap sparc64_bsd_fpregset => sparc64_bsd_fpregmap sparc64_linux_core_gregset => sparc64_linux_core_gregmap sparc64_linux_ptrace_gregset => sparc64_linux_ptrace_gregmap sparc64_sol2_fpregset => sparc64_sol2_fpregmap sparc64_sol2_gregset => sparc64_sol2_gregmap sparc64fbsd_gregset => sparc64fbsd_gregmap sparc64nbsd_gregset => sparc64nbsd_gregmap sparc64obsd_core_gregset => sparc64obsd_core_gregmap sparc64obsd_gregset => sparc64obsd_gregmap sparc_fpregset => sparc_fpregmap sparc_gregset => sparc_gregmap sparc_sol2_fpregset => sparc_sol2_fpregmap sparc_sol2_gregset => sparc_sol2_gregmap Also, all local variables 'gregset' and 'fpregset' are renamed to 'gregmap' and 'fpregmap', respectively. gdb/ * sparc-linux-nat.c (supply_gregset, supply_fpregset) (fill_gregset, fill_fpregset, _initialize_sparc_linux_nat): Rename register maps ("regmaps") from "*regset" to "*regmap". Do this for all regmap types and variables. * sparc-linux-tdep.c (sparc32_linux_step_trap) (sparc32_linux_supply_core_gregset) (sparc32_linux_collect_core_gregset) (sparc32_linux_supply_core_fpregset) (sparc32_linux_collect_core_fpregset): Likewise. * sparc-nat.c (sparc_gregset, sparc_fpregset): Rename to... (sparc_gregmap, sparc_fpregmap): ... these. (sparc_supply_gregset, sparc_collect_gregset) (sparc_supply_fpregset, sparc_collect_fpregset): Likewise. (sparc_fetch_inferior_registers, sparc_store_inferior_registers) (_initialize_sparc_nat): Rename regmaps. * sparc-nat.h (sparc_gregset, sparc_fpregset): Rename to... (sparc_gregmap, sparc_fpregmap): ... these. (sparc_supply_gregset, sparc_collect_gregset) (sparc_supply_fpregset, sparc_collect_fpregset): Likewise. * sparc-sol2-nat.c (sparc_sol2_gregset, sparc_sol2_fpregset): Rename macros to... (sparc_sol2_gregmap, sparc_sol2_fpregmap): ... these. (supply_gregset, supply_fpregset, fill_gregset, fill_fpregset): Likewise. * sparc-sol2-tdep.c (sparc32_sol2_gregset, sparc32_sol2_fpregset): Rename to... (sparc32_sol2_gregmap, sparc32_sol2_fpregmap): ... these. * sparc-tdep.c (sparc32_supply_gregset, sparc32_collect_gregset) (sparc32_supply_fpregset, sparc32_collect_fpregset): Rename regmaps. (sparc32_sunos4_gregset, sparc32_sunos4_fpregset) (sparc32_bsd_fpregset): Rename to... (sparc32_sunos4_gregmap, sparc32_sunos4_fpregmap) (sparc32_bsd_fpregmap): ... these. * sparc-tdep.h (struct sparc_gregset, struct sparc_fpregset) (sparc32_sunos4_gregset, sparc32_sunos4_fpregset) (sparc32_bsd_fpregset, sparc32_sol2_gregset) (sparc32_sol2_fpregset, sparc32nbsd_gregset): Rename to... (struct sparc_gregmap, struct sparc_fpregmap) (sparc32_sunos4_gregmap, sparc32_sunos4_fpregmap) (sparc32_bsd_fpregmap, sparc32_sol2_gregmap) (sparc32_sol2_fpregmap, sparc32nbsd_gregmap): ... these. (sparc32_supply_regset, sparc32_collect_gregset) (sparc32_supply_fpregset, sparc32_collect_fpregset): Adjust prototypes. * sparc64-linux-nat.c (sparc64_linux_ptrace_gregset): Rename to... (sparc64_linux_ptrace_gregmap): ... this. (supply_gregset, supply_fpregset, fill_gregset, fill_fpregset) (_initialize_sparc64_linux_nat): Rename regmaps. * sparc64-linux-tdep.c (sparc64_linux_core_gregset): Rename to... (sparc64_linux_core_gregmap): ... this. (sparc64_linux_supply_core_gregset) (sparc64_linux_collect_core_gregset) (sparc64_linux_supply_core_fpregset) (sparc64_linux_collect_core_fpregset): Rename regmaps. * sparc64-sol2-tdep.c (sparc64_sol2_gregset) (sparc64_sol2_fpregset): Rename to... (sparc64_sol2_gregmap, sparc64_sol2_fpregmap): ... these. * sparc64-tdep.c (sparc64_supply_gregset, sparc64_collect_gregset) (sparc64_supply_fpregset, sparc64_collect_fpregset): Rename regmaps. * sparc64-tdep.h (struct sparc_gregset, sparc64_sol2_gregset) (sparc64_sol2_fpregset, sparc64fbsd_gregset, sparc64nbsd_gregset) (sparc64_bsd_fpregset): Rename to... (struct sparc_gregmap, sparc64_sol2_gregmap) (sparc64_sol2_fpregmap, sparc64fbsd_gregmap, sparc64nbsd_gregmap) (sparc64_bsd_fpregmap): ... these. (sparc64_supply_gregset, sparc64_collect_gregset) (sparc64_supply_fpregset, sparc64_collect_fpregset): Adjust prototypes. * sparc64fbsd-nat.c (_initialize_sparc64fbsd_nat): Rename regmaps. * sparc64fbsd-tdep.c (sparc64fbsd_gregset): Rename to... (sparc64fbsd_gregmap): ... this. (sparc64fbsd_supply_gregset, sparc64fbsd_collect_gregset) (sparc64fbsd_supply_fpregset, sparc64fbsd_collect_fpregset): Rename regmaps. * sparc64nbsd-nat.c (sparc64nbsd_supply_gregset) (sparc64nbsd_collect_gregset, sparc64nbsd_supply_fpregset) (sparc64nbsd_collect_fpregset): Likewise. * sparc64nbsd-tdep.c (sparc64nbsd_gregset): Rename to... (sparc64nbsd_gregmap): ... this. (sparc64nbsd_supply_gregset, sparc64nbsd_supply_fpregset): Rename regmaps. * sparc64obsd-nat.c (_initialize_sparc64obsd_nat): Likewise. * sparc64obsd-tdep.c (sparc64obsd_gregset): Rename to... (sparc64obsd_gregmap): ... this. (sparc64obsd_supply_gregset, sparc64obsd_supply_fpregset): Rename regmaps. * sparcnbsd-nat.c (_initialize_sparcnbsd_nat): Likewise. * sparcnbsd-tdep.c (sparc32nbsd_gregset): Rename to... (sparc32nbsd_gregmap): ... this. (sparc32nbsd_supply_gregset, sparc32nbsd_supply_fpregset): Rename regmaps. --- gdb/sparc-linux-nat.c | 10 +++--- gdb/sparc-linux-tdep.c | 10 +++--- gdb/sparc-nat.c | 28 ++++++++--------- gdb/sparc-nat.h | 16 +++++----- gdb/sparc-sol2-nat.c | 16 +++++----- gdb/sparc-sol2-tdep.c | 4 +-- gdb/sparc-tdep.c | 50 ++++++++++++++--------------- gdb/sparc-tdep.h | 24 +++++++------- gdb/sparc64-linux-nat.c | 14 ++++----- gdb/sparc64-linux-tdep.c | 10 +++--- gdb/sparc64-sol2-tdep.c | 4 +-- gdb/sparc64-tdep.c | 82 ++++++++++++++++++++++++------------------------ gdb/sparc64-tdep.h | 20 ++++++------ gdb/sparc64fbsd-nat.c | 2 +- gdb/sparc64fbsd-tdep.c | 10 +++--- gdb/sparc64nbsd-nat.c | 24 +++++++------- gdb/sparc64nbsd-tdep.c | 6 ++-- gdb/sparc64obsd-nat.c | 4 +-- gdb/sparc64obsd-tdep.c | 12 +++---- gdb/sparcnbsd-nat.c | 4 +-- gdb/sparcnbsd-tdep.c | 8 ++--- 21 files changed, 179 insertions(+), 179 deletions(-) diff --git a/gdb/sparc-linux-nat.c b/gdb/sparc-linux-nat.c index a01c3b3..0e2fa85 100644 --- a/gdb/sparc-linux-nat.c +++ b/gdb/sparc-linux-nat.c @@ -31,26 +31,26 @@ void supply_gregset (struct regcache *regcache, const prgregset_t *gregs) { - sparc32_supply_gregset (sparc_gregset, regcache, -1, gregs); + sparc32_supply_gregset (sparc_gregmap, regcache, -1, gregs); } void supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs) { - sparc32_supply_fpregset (sparc_fpregset, regcache, -1, fpregs); + sparc32_supply_fpregset (sparc_fpregmap, regcache, -1, fpregs); } void fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum) { - sparc32_collect_gregset (sparc_gregset, regcache, regnum, gregs); + sparc32_collect_gregset (sparc_gregmap, regcache, regnum, gregs); } void fill_fpregset (const struct regcache *regcache, prfpregset_t *fpregs, int regnum) { - sparc32_collect_fpregset (sparc_fpregset, regcache, regnum, fpregs); + sparc32_collect_fpregset (sparc_fpregmap, regcache, regnum, fpregs); } void _initialize_sparc_linux_nat (void); @@ -63,7 +63,7 @@ _initialize_sparc_linux_nat (void) /* Fill in the generic GNU/Linux methods. */ t = linux_target (); - sparc_fpregset = &sparc32_bsd_fpregset; + sparc_fpregmap = &sparc32_bsd_fpregmap; /* Add our register access methods. */ t->to_fetch_registers = sparc_fetch_inferior_registers; diff --git a/gdb/sparc-linux-tdep.c b/gdb/sparc-linux-tdep.c index 713169a..4a193e2 100644 --- a/gdb/sparc-linux-tdep.c +++ b/gdb/sparc-linux-tdep.c @@ -198,7 +198,7 @@ sparc32_linux_step_trap (struct frame_info *frame, unsigned long insn) } \f -const struct sparc_gregset sparc32_linux_core_gregset = +const struct sparc_gregmap sparc32_linux_core_gregmap = { 32 * 4, /* %psr */ 33 * 4, /* %pc */ @@ -217,7 +217,7 @@ sparc32_linux_supply_core_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len) { - sparc32_supply_gregset (&sparc32_linux_core_gregset, + sparc32_supply_gregset (&sparc32_linux_core_gregmap, regcache, regnum, gregs); } @@ -226,7 +226,7 @@ sparc32_linux_collect_core_gregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len) { - sparc32_collect_gregset (&sparc32_linux_core_gregset, + sparc32_collect_gregset (&sparc32_linux_core_gregmap, regcache, regnum, gregs); } @@ -235,7 +235,7 @@ sparc32_linux_supply_core_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len) { - sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs); + sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs); } static void @@ -243,7 +243,7 @@ sparc32_linux_collect_core_fpregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *fpregs, size_t len) { - sparc32_collect_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs); + sparc32_collect_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs); } /* Set the program counter for process PTID to PC. */ diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c index 77054d1..22e1e5f 100644 --- a/gdb/sparc-nat.c +++ b/gdb/sparc-nat.c @@ -81,15 +81,15 @@ typedef struct fp_status fpregset_t; #endif /* Register set description. */ -const struct sparc_gregset *sparc_gregset; -const struct sparc_fpregset *sparc_fpregset; -void (*sparc_supply_gregset) (const struct sparc_gregset *, +const struct sparc_gregmap *sparc_gregmap; +const struct sparc_fpregmap *sparc_fpregmap; +void (*sparc_supply_gregset) (const struct sparc_gregmap *, struct regcache *, int , const void *); -void (*sparc_collect_gregset) (const struct sparc_gregset *, +void (*sparc_collect_gregset) (const struct sparc_gregmap *, const struct regcache *, int, void *); -void (*sparc_supply_fpregset) (const struct sparc_fpregset *, +void (*sparc_supply_fpregset) (const struct sparc_fpregmap *, struct regcache *, int , const void *); -void (*sparc_collect_fpregset) (const struct sparc_fpregset *, +void (*sparc_collect_fpregset) (const struct sparc_fpregmap *, const struct regcache *, int , void *); int (*sparc_gregset_supplies_p) (struct gdbarch *, int); int (*sparc_fpregset_supplies_p) (struct gdbarch *, int); @@ -174,7 +174,7 @@ sparc_fetch_inferior_registers (struct target_ops *ops, if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) perror_with_name (_("Couldn't get registers")); - sparc_supply_gregset (sparc_gregset, regcache, -1, ®s); + sparc_supply_gregset (sparc_gregmap, regcache, -1, ®s); if (regnum != -1) return; } @@ -186,7 +186,7 @@ sparc_fetch_inferior_registers (struct target_ops *ops, if (ptrace (PTRACE_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) perror_with_name (_("Couldn't get floating point status")); - sparc_supply_fpregset (sparc_fpregset, regcache, -1, &fpregs); + sparc_supply_fpregset (sparc_fpregmap, regcache, -1, &fpregs); } } @@ -210,7 +210,7 @@ sparc_store_inferior_registers (struct target_ops *ops, if (ptrace (PTRACE_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) perror_with_name (_("Couldn't get registers")); - sparc_collect_gregset (sparc_gregset, regcache, regnum, ®s); + sparc_collect_gregset (sparc_gregmap, regcache, regnum, ®s); if (ptrace (PTRACE_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) perror_with_name (_("Couldn't write registers")); @@ -237,7 +237,7 @@ sparc_store_inferior_registers (struct target_ops *ops, perror_with_name (_("Couldn't get floating-point registers")); memcpy (&saved_fpregs, &fpregs, sizeof (fpregs)); - sparc_collect_fpregset (sparc_fpregset, regcache, regnum, &fpregs); + sparc_collect_fpregset (sparc_fpregmap, regcache, regnum, &fpregs); /* Writing the floating-point registers will fail on NetBSD with EINVAL if the inferior process doesn't have an FPU state @@ -352,10 +352,10 @@ void _initialize_sparc_nat (void) { /* Deafult to using SunOS 4 register sets. */ - if (sparc_gregset == NULL) - sparc_gregset = &sparc32_sunos4_gregset; - if (sparc_fpregset == NULL) - sparc_fpregset = &sparc32_sunos4_fpregset; + if (sparc_gregmap == NULL) + sparc_gregmap = &sparc32_sunos4_gregmap; + if (sparc_fpregmap == NULL) + sparc_fpregmap = &sparc32_sunos4_fpregmap; if (sparc_supply_gregset == NULL) sparc_supply_gregset = sparc32_supply_gregset; if (sparc_collect_gregset == NULL) diff --git a/gdb/sparc-nat.h b/gdb/sparc-nat.h index f40e4bd..d1283af 100644 --- a/gdb/sparc-nat.h +++ b/gdb/sparc-nat.h @@ -20,18 +20,18 @@ #ifndef SPARC_NAT_H #define SPARC_NAT_H 1 -struct sparc_gregset; -struct sparc_fpregset; +struct sparc_gregmap; +struct sparc_fpregmap; -extern const struct sparc_gregset *sparc_gregset; -extern const struct sparc_fpregset *sparc_fpregset; -extern void (*sparc_supply_gregset) (const struct sparc_gregset *, +extern const struct sparc_gregmap *sparc_gregmap; +extern const struct sparc_fpregmap *sparc_fpregmap; +extern void (*sparc_supply_gregset) (const struct sparc_gregmap *, struct regcache *, int , const void *); -extern void (*sparc_collect_gregset) (const struct sparc_gregset *, +extern void (*sparc_collect_gregset) (const struct sparc_gregmap *, const struct regcache *, int, void *); -extern void (*sparc_supply_fpregset) (const struct sparc_fpregset *, +extern void (*sparc_supply_fpregset) (const struct sparc_fpregmap *, struct regcache *, int , const void *); -extern void (*sparc_collect_fpregset) (const struct sparc_fpregset *, +extern void (*sparc_collect_fpregset) (const struct sparc_fpregmap *, const struct regcache *, int , void *); extern int (*sparc_gregset_supplies_p) (struct gdbarch *gdbarch, int); extern int (*sparc_fpregset_supplies_p) (struct gdbarch *gdbarch, int); diff --git a/gdb/sparc-sol2-nat.c b/gdb/sparc-sol2-nat.c index 925f786..825f4b5 100644 --- a/gdb/sparc-sol2-nat.c +++ b/gdb/sparc-sol2-nat.c @@ -58,8 +58,8 @@ #define sparc_collect_gregset sparc64_collect_gregset #define sparc_collect_fpregset sparc64_collect_fpregset -#define sparc_sol2_gregset sparc64_sol2_gregset -#define sparc_sol2_fpregset sparc64_sol2_fpregset +#define sparc_sol2_gregmap sparc64_sol2_gregmap +#define sparc_sol2_fpregmap sparc64_sol2_fpregmap #else @@ -68,34 +68,34 @@ #define sparc_collect_gregset sparc32_collect_gregset #define sparc_collect_fpregset sparc32_collect_fpregset -#define sparc_sol2_gregset sparc32_sol2_gregset -#define sparc_sol2_fpregset sparc32_sol2_fpregset +#define sparc_sol2_gregmap sparc32_sol2_gregmap +#define sparc_sol2_fpregmap sparc32_sol2_fpregmap #endif void supply_gregset (struct regcache *regcache, const prgregset_t *gregs) { - sparc_supply_gregset (&sparc_sol2_gregset, regcache, -1, gregs); + sparc_supply_gregset (&sparc_sol2_gregmap, regcache, -1, gregs); } void supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs) { - sparc_supply_fpregset (&sparc_sol2_fpregset, regcache, -1, fpregs); + sparc_supply_fpregset (&sparc_sol2_fpregmap, regcache, -1, fpregs); } void fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum) { - sparc_collect_gregset (&sparc_sol2_gregset, regcache, regnum, gregs); + sparc_collect_gregset (&sparc_sol2_gregmap, regcache, regnum, gregs); } void fill_fpregset (const struct regcache *regcache, prfpregset_t *fpregs, int regnum) { - sparc_collect_fpregset (&sparc_sol2_fpregset, regcache, regnum, fpregs); + sparc_collect_fpregset (&sparc_sol2_fpregmap, regcache, regnum, fpregs); } /* Provide a prototype to silence -Wmissing-prototypes. */ diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c index 381adf9..4452c00 100644 --- a/gdb/sparc-sol2-tdep.c +++ b/gdb/sparc-sol2-tdep.c @@ -36,7 +36,7 @@ #include "solib-svr4.h" /* From <sys/regset.h>. */ -const struct sparc_gregset sparc32_sol2_gregset = +const struct sparc_gregmap sparc32_sol2_gregmap = { 32 * 4, /* %psr */ 33 * 4, /* %pc */ @@ -48,7 +48,7 @@ const struct sparc_gregset sparc32_sol2_gregset = 16 * 4, /* %l0 */ }; -const struct sparc_fpregset sparc32_sol2_fpregset = +const struct sparc_fpregmap sparc32_sol2_fpregmap = { 0 * 4, /* %f0 */ 33 * 4, /* %fsr */ diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 311a156..e7b3090 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1898,7 +1898,7 @@ sparc_collect_rwindow (const struct regcache *regcache, /* Helper functions for dealing with register sets. */ void -sparc32_supply_gregset (const struct sparc_gregset *gregset, +sparc32_supply_gregset (const struct sparc_gregmap *gregmap, struct regcache *regcache, int regnum, const void *gregs) { @@ -1908,26 +1908,26 @@ sparc32_supply_gregset (const struct sparc_gregset *gregset, if (regnum == SPARC32_PSR_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC32_PSR_REGNUM, - regs + gregset->r_psr_offset); + regs + gregmap->r_psr_offset); if (regnum == SPARC32_PC_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC32_PC_REGNUM, - regs + gregset->r_pc_offset); + regs + gregmap->r_pc_offset); if (regnum == SPARC32_NPC_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC32_NPC_REGNUM, - regs + gregset->r_npc_offset); + regs + gregmap->r_npc_offset); if (regnum == SPARC32_Y_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC32_Y_REGNUM, - regs + gregset->r_y_offset); + regs + gregmap->r_y_offset); if (regnum == SPARC_G0_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC_G0_REGNUM, &zero); if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1) { - int offset = gregset->r_g1_offset; + int offset = gregmap->r_g1_offset; for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++) { @@ -1941,7 +1941,7 @@ sparc32_supply_gregset (const struct sparc_gregset *gregset, { /* Not all of the register set variants include Locals and Inputs. For those that don't, we read them off the stack. */ - if (gregset->r_l0_offset == -1) + if (gregmap->r_l0_offset == -1) { ULONGEST sp; @@ -1950,7 +1950,7 @@ sparc32_supply_gregset (const struct sparc_gregset *gregset, } else { - int offset = gregset->r_l0_offset; + int offset = gregmap->r_l0_offset; for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++) { @@ -1963,7 +1963,7 @@ sparc32_supply_gregset (const struct sparc_gregset *gregset, } void -sparc32_collect_gregset (const struct sparc_gregset *gregset, +sparc32_collect_gregset (const struct sparc_gregmap *gregmap, const struct regcache *regcache, int regnum, void *gregs) { @@ -1972,23 +1972,23 @@ sparc32_collect_gregset (const struct sparc_gregset *gregset, if (regnum == SPARC32_PSR_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC32_PSR_REGNUM, - regs + gregset->r_psr_offset); + regs + gregmap->r_psr_offset); if (regnum == SPARC32_PC_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC32_PC_REGNUM, - regs + gregset->r_pc_offset); + regs + gregmap->r_pc_offset); if (regnum == SPARC32_NPC_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC32_NPC_REGNUM, - regs + gregset->r_npc_offset); + regs + gregmap->r_npc_offset); if (regnum == SPARC32_Y_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC32_Y_REGNUM, - regs + gregset->r_y_offset); + regs + gregmap->r_y_offset); if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1) { - int offset = gregset->r_g1_offset; + int offset = gregmap->r_g1_offset; /* %g0 is always zero. */ for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++) @@ -2003,9 +2003,9 @@ sparc32_collect_gregset (const struct sparc_gregset *gregset, { /* Not all of the register set variants include Locals and Inputs. For those that don't, we read them off the stack. */ - if (gregset->r_l0_offset != -1) + if (gregmap->r_l0_offset != -1) { - int offset = gregset->r_l0_offset; + int offset = gregmap->r_l0_offset; for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++) { @@ -2018,7 +2018,7 @@ sparc32_collect_gregset (const struct sparc_gregset *gregset, } void -sparc32_supply_fpregset (const struct sparc_fpregset *fpregset, +sparc32_supply_fpregset (const struct sparc_fpregmap *fpregmap, struct regcache *regcache, int regnum, const void *fpregs) { @@ -2029,16 +2029,16 @@ sparc32_supply_fpregset (const struct sparc_fpregset *fpregset, { if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1) regcache_raw_supply (regcache, SPARC_F0_REGNUM + i, - regs + fpregset->r_f0_offset + (i * 4)); + regs + fpregmap->r_f0_offset + (i * 4)); } if (regnum == SPARC32_FSR_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC32_FSR_REGNUM, - regs + fpregset->r_fsr_offset); + regs + fpregmap->r_fsr_offset); } void -sparc32_collect_fpregset (const struct sparc_fpregset *fpregset, +sparc32_collect_fpregset (const struct sparc_fpregmap *fpregmap, const struct regcache *regcache, int regnum, void *fpregs) { @@ -2049,19 +2049,19 @@ sparc32_collect_fpregset (const struct sparc_fpregset *fpregset, { if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1) regcache_raw_collect (regcache, SPARC_F0_REGNUM + i, - regs + fpregset->r_f0_offset + (i * 4)); + regs + fpregmap->r_f0_offset + (i * 4)); } if (regnum == SPARC32_FSR_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC32_FSR_REGNUM, - regs + fpregset->r_fsr_offset); + regs + fpregmap->r_fsr_offset); } \f /* SunOS 4. */ /* From <machine/reg.h>. */ -const struct sparc_gregset sparc32_sunos4_gregset = +const struct sparc_gregmap sparc32_sunos4_gregmap = { 0 * 4, /* %psr */ 1 * 4, /* %pc */ @@ -2073,13 +2073,13 @@ const struct sparc_gregset sparc32_sunos4_gregset = -1 /* %l0 */ }; -const struct sparc_fpregset sparc32_sunos4_fpregset = +const struct sparc_fpregmap sparc32_sunos4_fpregmap = { 0 * 4, /* %f0 */ 33 * 4, /* %fsr */ }; -const struct sparc_fpregset sparc32_bsd_fpregset = +const struct sparc_fpregmap sparc32_bsd_fpregmap = { 0 * 4, /* %f0 */ 32 * 4, /* %fsr */ diff --git a/gdb/sparc-tdep.h b/gdb/sparc-tdep.h index a065ebe..12c8ef7 100644 --- a/gdb/sparc-tdep.h +++ b/gdb/sparc-tdep.h @@ -28,7 +28,7 @@ struct trad_frame_saved_reg; /* Register offsets for the general-purpose register set. */ -struct sparc_gregset +struct sparc_gregmap { int r_psr_offset; int r_pc_offset; @@ -41,7 +41,7 @@ struct sparc_gregset int r_y_size; }; -struct sparc_fpregset +struct sparc_fpregmap { int r_f0_offset; int r_fsr_offset; @@ -206,20 +206,20 @@ extern void sparc_collect_rwindow (const struct regcache *regcache, CORE_ADDR sp, int regnum); /* Register offsets for SunOS 4. */ -extern const struct sparc_gregset sparc32_sunos4_gregset; -extern const struct sparc_fpregset sparc32_sunos4_fpregset; -extern const struct sparc_fpregset sparc32_bsd_fpregset; +extern const struct sparc_gregmap sparc32_sunos4_gregmap; +extern const struct sparc_fpregmap sparc32_sunos4_fpregmap; +extern const struct sparc_fpregmap sparc32_bsd_fpregmap; -extern void sparc32_supply_gregset (const struct sparc_gregset *gregset, +extern void sparc32_supply_gregset (const struct sparc_gregmap *gregmap, struct regcache *regcache, int regnum, const void *gregs); -extern void sparc32_collect_gregset (const struct sparc_gregset *gregset, +extern void sparc32_collect_gregset (const struct sparc_gregmap *gregmap, const struct regcache *regcache, int regnum, void *gregs); -extern void sparc32_supply_fpregset (const struct sparc_fpregset *fpregset, +extern void sparc32_supply_fpregset (const struct sparc_fpregmap *fpregmap, struct regcache *regcache, int regnum, const void *fpregs); -extern void sparc32_collect_fpregset (const struct sparc_fpregset *fpregset, +extern void sparc32_collect_fpregset (const struct sparc_fpregmap *fpregmap, const struct regcache *regcache, int regnum, void *fpregs); @@ -228,8 +228,8 @@ extern int sparc_is_annulled_branch_insn (CORE_ADDR pc); /* Functions and variables exported from sparc-sol2-tdep.c. */ /* Register offsets for Solaris 2. */ -extern const struct sparc_gregset sparc32_sol2_gregset; -extern const struct sparc_fpregset sparc32_sol2_fpregset; +extern const struct sparc_gregmap sparc32_sol2_gregmap; +extern const struct sparc_fpregmap sparc32_sol2_fpregmap; extern int sparc_sol2_pc_in_sigtramp (CORE_ADDR pc, const char *name); @@ -241,7 +241,7 @@ extern void sparc32_sol2_init_abi (struct gdbarch_info info, /* Functions and variables exported from sparcnbsd-tdep.c. */ /* Register offsets for NetBSD. */ -extern const struct sparc_gregset sparc32nbsd_gregset; +extern const struct sparc_gregmap sparc32nbsd_gregmap; /* Return the address of a system call's alternative return address. */ diff --git a/gdb/sparc64-linux-nat.c b/gdb/sparc64-linux-nat.c index 80411dc..14db54f 100644 --- a/gdb/sparc64-linux-nat.c +++ b/gdb/sparc64-linux-nat.c @@ -30,7 +30,7 @@ #include "target.h" #include "linux-nat.h" -static const struct sparc_gregset sparc64_linux_ptrace_gregset = +static const struct sparc_gregmap sparc64_linux_ptrace_gregmap = { 16 * 8, /* "tstate" */ 17 * 8, /* %pc */ @@ -47,26 +47,26 @@ static const struct sparc_gregset sparc64_linux_ptrace_gregset = void supply_gregset (struct regcache *regcache, const prgregset_t *gregs) { - sparc64_supply_gregset (sparc_gregset, regcache, -1, gregs); + sparc64_supply_gregset (sparc_gregmap, regcache, -1, gregs); } void supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs) { - sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, -1, fpregs); + sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, -1, fpregs); } void fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum) { - sparc64_collect_gregset (sparc_gregset, regcache, regnum, gregs); + sparc64_collect_gregset (sparc_gregmap, regcache, regnum, gregs); } void fill_fpregset (const struct regcache *regcache, prfpregset_t *fpregs, int regnum) { - sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs); + sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs); } /* Provide a prototype to silence -Wmissing-prototypes. */ @@ -80,7 +80,7 @@ _initialize_sparc64_linux_nat (void) /* Fill in the generic GNU/Linux methods. */ t = linux_target (); - sparc_fpregset = &sparc64_bsd_fpregset; + sparc_fpregmap = &sparc64_bsd_fpregmap; /* Add our register access methods. */ t->to_fetch_registers = sparc_fetch_inferior_registers; @@ -89,5 +89,5 @@ _initialize_sparc64_linux_nat (void) /* Register the target. */ linux_nat_add_target (t); - sparc_gregset = &sparc64_linux_ptrace_gregset; + sparc_gregmap = &sparc64_linux_ptrace_gregmap; } diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c index a381d2a..6040526 100644 --- a/gdb/sparc64-linux-tdep.c +++ b/gdb/sparc64-linux-tdep.c @@ -139,7 +139,7 @@ sparc64_linux_step_trap (struct frame_info *frame, unsigned long insn) } \f -const struct sparc_gregset sparc64_linux_core_gregset = +const struct sparc_gregmap sparc64_linux_core_gregmap = { 32 * 8, /* %tstate */ 33 * 8, /* %tpc */ @@ -158,7 +158,7 @@ sparc64_linux_supply_core_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len) { - sparc64_supply_gregset (&sparc64_linux_core_gregset, + sparc64_supply_gregset (&sparc64_linux_core_gregmap, regcache, regnum, gregs); } @@ -167,7 +167,7 @@ sparc64_linux_collect_core_gregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len) { - sparc64_collect_gregset (&sparc64_linux_core_gregset, + sparc64_collect_gregset (&sparc64_linux_core_gregmap, regcache, regnum, gregs); } @@ -176,7 +176,7 @@ sparc64_linux_supply_core_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len) { - sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs); + sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs); } static void @@ -184,7 +184,7 @@ sparc64_linux_collect_core_fpregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *fpregs, size_t len) { - sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs); + sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs); } /* Set the program counter for process PTID to PC. */ diff --git a/gdb/sparc64-sol2-tdep.c b/gdb/sparc64-sol2-tdep.c index 2c30261..507838a 100644 --- a/gdb/sparc64-sol2-tdep.c +++ b/gdb/sparc64-sol2-tdep.c @@ -33,7 +33,7 @@ #include "solib-svr4.h" /* From <sys/regset.h>. */ -const struct sparc_gregset sparc64_sol2_gregset = +const struct sparc_gregmap sparc64_sol2_gregmap = { 32 * 8, /* "tstate" */ 33 * 8, /* %pc */ @@ -46,7 +46,7 @@ const struct sparc_gregset sparc64_sol2_gregset = 8 /* sizeof (%y) */ }; -const struct sparc_fpregset sparc64_sol2_fpregset = +const struct sparc_fpregmap sparc64_sol2_fpregmap = { 0 * 8, /* %f0 */ 33 * 8, /* %fsr */ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index 5d32560..40931d6 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -1240,7 +1240,7 @@ sparc64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) #define PSR_XCC 0x000f0000 void -sparc64_supply_gregset (const struct sparc_gregset *gregset, +sparc64_supply_gregset (const struct sparc_gregmap *gregmap, struct regcache *regcache, int regnum, const void *gregs) { @@ -1255,7 +1255,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset, { if (regnum == SPARC32_PSR_REGNUM || regnum == -1) { - int offset = gregset->r_tstate_offset; + int offset = gregmap->r_tstate_offset; ULONGEST tstate, psr; gdb_byte buf[4]; @@ -1268,15 +1268,15 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset, if (regnum == SPARC32_PC_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC32_PC_REGNUM, - regs + gregset->r_pc_offset + 4); + regs + gregmap->r_pc_offset + 4); if (regnum == SPARC32_NPC_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC32_NPC_REGNUM, - regs + gregset->r_npc_offset + 4); + regs + gregmap->r_npc_offset + 4); if (regnum == SPARC32_Y_REGNUM || regnum == -1) { - int offset = gregset->r_y_offset + 8 - gregset->r_y_size; + int offset = gregmap->r_y_offset + 8 - gregmap->r_y_size; regcache_raw_supply (regcache, SPARC32_Y_REGNUM, regs + offset); } } @@ -1284,30 +1284,30 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset, { if (regnum == SPARC64_STATE_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC64_STATE_REGNUM, - regs + gregset->r_tstate_offset); + regs + gregmap->r_tstate_offset); if (regnum == SPARC64_PC_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC64_PC_REGNUM, - regs + gregset->r_pc_offset); + regs + gregmap->r_pc_offset); if (regnum == SPARC64_NPC_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC64_NPC_REGNUM, - regs + gregset->r_npc_offset); + regs + gregmap->r_npc_offset); if (regnum == SPARC64_Y_REGNUM || regnum == -1) { gdb_byte buf[8]; memset (buf, 0, 8); - memcpy (buf + 8 - gregset->r_y_size, - regs + gregset->r_y_offset, gregset->r_y_size); + memcpy (buf + 8 - gregmap->r_y_size, + regs + gregmap->r_y_offset, gregmap->r_y_size); regcache_raw_supply (regcache, SPARC64_Y_REGNUM, buf); } if ((regnum == SPARC64_FPRS_REGNUM || regnum == -1) - && gregset->r_fprs_offset != -1) + && gregmap->r_fprs_offset != -1) regcache_raw_supply (regcache, SPARC64_FPRS_REGNUM, - regs + gregset->r_fprs_offset); + regs + gregmap->r_fprs_offset); } if (regnum == SPARC_G0_REGNUM || regnum == -1) @@ -1315,7 +1315,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset, if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1) { - int offset = gregset->r_g1_offset; + int offset = gregmap->r_g1_offset; if (sparc32) offset += 4; @@ -1332,7 +1332,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset, { /* Not all of the register set variants include Locals and Inputs. For those that don't, we read them off the stack. */ - if (gregset->r_l0_offset == -1) + if (gregmap->r_l0_offset == -1) { ULONGEST sp; @@ -1341,7 +1341,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset, } else { - int offset = gregset->r_l0_offset; + int offset = gregmap->r_l0_offset; if (sparc32) offset += 4; @@ -1357,7 +1357,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset, } void -sparc64_collect_gregset (const struct sparc_gregset *gregset, +sparc64_collect_gregset (const struct sparc_gregmap *gregmap, const struct regcache *regcache, int regnum, void *gregs) { @@ -1371,7 +1371,7 @@ sparc64_collect_gregset (const struct sparc_gregset *gregset, { if (regnum == SPARC32_PSR_REGNUM || regnum == -1) { - int offset = gregset->r_tstate_offset; + int offset = gregmap->r_tstate_offset; ULONGEST tstate, psr; gdb_byte buf[8]; @@ -1387,15 +1387,15 @@ sparc64_collect_gregset (const struct sparc_gregset *gregset, if (regnum == SPARC32_PC_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC32_PC_REGNUM, - regs + gregset->r_pc_offset + 4); + regs + gregmap->r_pc_offset + 4); if (regnum == SPARC32_NPC_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC32_NPC_REGNUM, - regs + gregset->r_npc_offset + 4); + regs + gregmap->r_npc_offset + 4); if (regnum == SPARC32_Y_REGNUM || regnum == -1) { - int offset = gregset->r_y_offset + 8 - gregset->r_y_size; + int offset = gregmap->r_y_offset + 8 - gregmap->r_y_size; regcache_raw_collect (regcache, SPARC32_Y_REGNUM, regs + offset); } } @@ -1403,35 +1403,35 @@ sparc64_collect_gregset (const struct sparc_gregset *gregset, { if (regnum == SPARC64_STATE_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC64_STATE_REGNUM, - regs + gregset->r_tstate_offset); + regs + gregmap->r_tstate_offset); if (regnum == SPARC64_PC_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC64_PC_REGNUM, - regs + gregset->r_pc_offset); + regs + gregmap->r_pc_offset); if (regnum == SPARC64_NPC_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC64_NPC_REGNUM, - regs + gregset->r_npc_offset); + regs + gregmap->r_npc_offset); if (regnum == SPARC64_Y_REGNUM || regnum == -1) { gdb_byte buf[8]; regcache_raw_collect (regcache, SPARC64_Y_REGNUM, buf); - memcpy (regs + gregset->r_y_offset, - buf + 8 - gregset->r_y_size, gregset->r_y_size); + memcpy (regs + gregmap->r_y_offset, + buf + 8 - gregmap->r_y_size, gregmap->r_y_size); } if ((regnum == SPARC64_FPRS_REGNUM || regnum == -1) - && gregset->r_fprs_offset != -1) + && gregmap->r_fprs_offset != -1) regcache_raw_collect (regcache, SPARC64_FPRS_REGNUM, - regs + gregset->r_fprs_offset); + regs + gregmap->r_fprs_offset); } if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1) { - int offset = gregset->r_g1_offset; + int offset = gregmap->r_g1_offset; if (sparc32) offset += 4; @@ -1449,9 +1449,9 @@ sparc64_collect_gregset (const struct sparc_gregset *gregset, { /* Not all of the register set variants include Locals and Inputs. For those that don't, we read them off the stack. */ - if (gregset->r_l0_offset != -1) + if (gregmap->r_l0_offset != -1) { - int offset = gregset->r_l0_offset; + int offset = gregmap->r_l0_offset; if (sparc32) offset += 4; @@ -1467,7 +1467,7 @@ sparc64_collect_gregset (const struct sparc_gregset *gregset, } void -sparc64_supply_fpregset (const struct sparc_fpregset *fpregset, +sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap, struct regcache *regcache, int regnum, const void *fpregs) { @@ -1479,14 +1479,14 @@ sparc64_supply_fpregset (const struct sparc_fpregset *fpregset, { if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1) regcache_raw_supply (regcache, SPARC_F0_REGNUM + i, - regs + fpregset->r_f0_offset + (i * 4)); + regs + fpregmap->r_f0_offset + (i * 4)); } if (sparc32) { if (regnum == SPARC32_FSR_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC32_FSR_REGNUM, - regs + fpregset->r_fsr_offset); + regs + fpregmap->r_fsr_offset); } else { @@ -1494,18 +1494,18 @@ sparc64_supply_fpregset (const struct sparc_fpregset *fpregset, { if (regnum == (SPARC64_F32_REGNUM + i) || regnum == -1) regcache_raw_supply (regcache, SPARC64_F32_REGNUM + i, - (regs + fpregset->r_f0_offset + (regs + fpregmap->r_f0_offset + (32 * 4) + (i * 8))); } if (regnum == SPARC64_FSR_REGNUM || regnum == -1) regcache_raw_supply (regcache, SPARC64_FSR_REGNUM, - regs + fpregset->r_fsr_offset); + regs + fpregmap->r_fsr_offset); } } void -sparc64_collect_fpregset (const struct sparc_fpregset *fpregset, +sparc64_collect_fpregset (const struct sparc_fpregmap *fpregmap, const struct regcache *regcache, int regnum, void *fpregs) { @@ -1517,14 +1517,14 @@ sparc64_collect_fpregset (const struct sparc_fpregset *fpregset, { if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1) regcache_raw_collect (regcache, SPARC_F0_REGNUM + i, - regs + fpregset->r_f0_offset + (i * 4)); + regs + fpregmap->r_f0_offset + (i * 4)); } if (sparc32) { if (regnum == SPARC32_FSR_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC32_FSR_REGNUM, - regs + fpregset->r_fsr_offset); + regs + fpregmap->r_fsr_offset); } else { @@ -1532,17 +1532,17 @@ sparc64_collect_fpregset (const struct sparc_fpregset *fpregset, { if (regnum == (SPARC64_F32_REGNUM + i) || regnum == -1) regcache_raw_collect (regcache, SPARC64_F32_REGNUM + i, - (regs + fpregset->r_f0_offset + (regs + fpregmap->r_f0_offset + (32 * 4) + (i * 8))); } if (regnum == SPARC64_FSR_REGNUM || regnum == -1) regcache_raw_collect (regcache, SPARC64_FSR_REGNUM, - regs + fpregset->r_fsr_offset); + regs + fpregmap->r_fsr_offset); } } -const struct sparc_fpregset sparc64_bsd_fpregset = +const struct sparc_fpregmap sparc64_bsd_fpregmap = { 0 * 8, /* %f0 */ 32 * 8, /* %fsr */ diff --git a/gdb/sparc64-tdep.h b/gdb/sparc64-tdep.h index 4b69c0d..3cb7e97 100644 --- a/gdb/sparc64-tdep.h +++ b/gdb/sparc64-tdep.h @@ -23,7 +23,7 @@ struct frame_info; struct gdbarch; struct regcache; -struct sparc_gregset; +struct sparc_gregmap; struct trad_frame_saved_reg; #include "sparc-tdep.h" @@ -97,24 +97,24 @@ enum sparc64_regnum extern void sparc64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch); -extern void sparc64_supply_gregset (const struct sparc_gregset *gregset, +extern void sparc64_supply_gregset (const struct sparc_gregmap *gregmap, struct regcache *regcache, int regnum, const void *gregs); -extern void sparc64_collect_gregset (const struct sparc_gregset *gregset, +extern void sparc64_collect_gregset (const struct sparc_gregmap *gregmap, const struct regcache *regcache, int regnum, void *gregs); -extern void sparc64_supply_fpregset (const struct sparc_fpregset *fpregset, +extern void sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap, struct regcache *regcache, int regnum, const void *fpregs); -extern void sparc64_collect_fpregset (const struct sparc_fpregset *fpregset, +extern void sparc64_collect_fpregset (const struct sparc_fpregmap *fpregmap, const struct regcache *regcache, int regnum, void *fpregs); /* Functions and variables exported from sparc64-sol2-tdep.c. */ /* Register offsets for Solaris 2. */ -extern const struct sparc_gregset sparc64_sol2_gregset; -extern const struct sparc_fpregset sparc64_sol2_fpregset; +extern const struct sparc_gregmap sparc64_sol2_gregmap; +extern const struct sparc_fpregmap sparc64_sol2_fpregmap; extern void sparc64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch); @@ -122,17 +122,17 @@ extern void sparc64_sol2_init_abi (struct gdbarch_info info, /* Variables exported from sparc64fbsd-tdep.c. */ /* Register offsets for FreeBSD/sparc64. */ -extern const struct sparc_gregset sparc64fbsd_gregset; +extern const struct sparc_gregmap sparc64fbsd_gregmap; /* Functions and variables exported from sparc64nbsd-tdep.c. */ /* Register offsets for NetBSD/sparc64. */ -extern const struct sparc_gregset sparc64nbsd_gregset; +extern const struct sparc_gregmap sparc64nbsd_gregmap; extern struct trad_frame_saved_reg * sparc64nbsd_sigcontext_saved_regs (CORE_ADDR sigcontext_addr, struct frame_info *next_frame); -extern const struct sparc_fpregset sparc64_bsd_fpregset; +extern const struct sparc_fpregmap sparc64_bsd_fpregmap; #endif /* sparc64-tdep.h */ diff --git a/gdb/sparc64fbsd-nat.c b/gdb/sparc64fbsd-nat.c index 7c772d4..59a2004 100644 --- a/gdb/sparc64fbsd-nat.c +++ b/gdb/sparc64fbsd-nat.c @@ -75,7 +75,7 @@ _initialize_sparc64fbsd_nat (void) t->to_make_corefile_notes = fbsd_make_corefile_notes; add_target (t); - sparc_gregset = &sparc64fbsd_gregset; + sparc_gregmap = &sparc64fbsd_gregmap; /* Support debugging kernel virtual memory images. */ bsd_kvm_add_target (sparc64fbsd_kvm_supply_pcb); diff --git a/gdb/sparc64fbsd-tdep.c b/gdb/sparc64fbsd-tdep.c index 96bf390..6ca87dc 100644 --- a/gdb/sparc64fbsd-tdep.c +++ b/gdb/sparc64fbsd-tdep.c @@ -34,7 +34,7 @@ #include "solib-svr4.h" /* From <machine/reg.h>. */ -const struct sparc_gregset sparc64fbsd_gregset = +const struct sparc_gregmap sparc64fbsd_gregmap = { 26 * 8, /* "tstate" */ 25 * 8, /* %pc */ @@ -53,7 +53,7 @@ sparc64fbsd_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len) { - sparc64_supply_gregset (&sparc64fbsd_gregset, regcache, regnum, gregs); + sparc64_supply_gregset (&sparc64fbsd_gregmap, regcache, regnum, gregs); } static void @@ -61,7 +61,7 @@ sparc64fbsd_collect_gregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len) { - sparc64_collect_gregset (&sparc64fbsd_gregset, regcache, regnum, gregs); + sparc64_collect_gregset (&sparc64fbsd_gregmap, regcache, regnum, gregs); } static void @@ -69,7 +69,7 @@ sparc64fbsd_supply_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len) { - sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs); + sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs); } static void @@ -77,7 +77,7 @@ sparc64fbsd_collect_fpregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *fpregs, size_t len) { - sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs); + sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs); } \f diff --git a/gdb/sparc64nbsd-nat.c b/gdb/sparc64nbsd-nat.c index f8db7fa..bfcf74a 100644 --- a/gdb/sparc64nbsd-nat.c +++ b/gdb/sparc64nbsd-nat.c @@ -30,55 +30,55 @@ traced process is 32-bit or 64-bit. */ static void -sparc64nbsd_supply_gregset (const struct sparc_gregset *gregset, +sparc64nbsd_supply_gregset (const struct sparc_gregmap *gregmap, struct regcache *regcache, int regnum, const void *gregs) { int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32); if (sparc32) - sparc32_supply_gregset (&sparc32nbsd_gregset, regcache, regnum, gregs); + sparc32_supply_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs); else - sparc64_supply_gregset (&sparc64nbsd_gregset, regcache, regnum, gregs); + sparc64_supply_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs); } static void -sparc64nbsd_collect_gregset (const struct sparc_gregset *gregset, +sparc64nbsd_collect_gregset (const struct sparc_gregmap *gregmap, const struct regcache *regcache, int regnum, void *gregs) { int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32); if (sparc32) - sparc32_collect_gregset (&sparc32nbsd_gregset, regcache, regnum, gregs); + sparc32_collect_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs); else - sparc64_collect_gregset (&sparc64nbsd_gregset, regcache, regnum, gregs); + sparc64_collect_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs); } static void -sparc64nbsd_supply_fpregset (const struct sparc_fpregset *fpregset, +sparc64nbsd_supply_fpregset (const struct sparc_fpregmap *fpregmap, struct regcache *regcache, int regnum, const void *fpregs) { int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32); if (sparc32) - sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs); + sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs); else - sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs); + sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs); } static void -sparc64nbsd_collect_fpregset (const struct sparc_fpregset *fpregset, +sparc64nbsd_collect_fpregset (const struct sparc_fpregmap *fpregmap, const struct regcache *regcache, int regnum, void *fpregs) { int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32); if (sparc32) - sparc32_collect_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs); + sparc32_collect_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs); else - sparc64_collect_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs); + sparc64_collect_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs); } /* Determine whether `gregset_t' contains register REGNUM. */ diff --git a/gdb/sparc64nbsd-tdep.c b/gdb/sparc64nbsd-tdep.c index 744a5f2..fac4c27 100644 --- a/gdb/sparc64nbsd-tdep.c +++ b/gdb/sparc64nbsd-tdep.c @@ -37,7 +37,7 @@ #include "nbsd-tdep.h" /* From <machine/reg.h>. */ -const struct sparc_gregset sparc64nbsd_gregset = +const struct sparc_gregmap sparc64nbsd_gregmap = { 0 * 8, /* "tstate" */ 1 * 8, /* %pc */ @@ -56,7 +56,7 @@ sparc64nbsd_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len) { - sparc64_supply_gregset (&sparc64nbsd_gregset, regcache, regnum, gregs); + sparc64_supply_gregset (&sparc64nbsd_gregmap, regcache, regnum, gregs); } static void @@ -64,7 +64,7 @@ sparc64nbsd_supply_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len) { - sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs); + sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs); } \f diff --git a/gdb/sparc64obsd-nat.c b/gdb/sparc64obsd-nat.c index a6cf8b3..8b5423c 100644 --- a/gdb/sparc64obsd-nat.c +++ b/gdb/sparc64obsd-nat.c @@ -120,8 +120,8 @@ _initialize_sparc64obsd_nat (void) sparc_gregset_supplies_p = sparc64obsd_gregset_supplies_p; sparc_fpregset_supplies_p = sparc64obsd_fpregset_supplies_p; - sparc_gregset = &sparc64nbsd_gregset; - sparc_fpregset = &sparc64_bsd_fpregset; + sparc_gregmap = &sparc64nbsd_gregmap; + sparc_fpregmap = &sparc64_bsd_fpregmap; /* Add some extra features to the generic SPARC target. */ obsd_add_target (sparc_target ()); diff --git a/gdb/sparc64obsd-tdep.c b/gdb/sparc64obsd-tdep.c index e2dce3b..8f94574 100644 --- a/gdb/sparc64obsd-tdep.c +++ b/gdb/sparc64obsd-tdep.c @@ -46,7 +46,7 @@ match the ptrace(2) layout. */ /* From <machine/reg.h>. */ -const struct sparc_gregset sparc64obsd_gregset = +const struct sparc_gregmap sparc64obsd_gregmap = { 0 * 8, /* "tstate" */ 1 * 8, /* %pc */ @@ -59,7 +59,7 @@ const struct sparc_gregset sparc64obsd_gregset = 4 /* sizeof (%y) */ }; -const struct sparc_gregset sparc64obsd_core_gregset = +const struct sparc_gregmap sparc64obsd_core_gregmap = { 0 * 8, /* "tstate" */ 1 * 8, /* %pc */ @@ -81,12 +81,12 @@ sparc64obsd_supply_gregset (const struct regset *regset, if (len < 832) { - sparc64_supply_gregset (&sparc64obsd_gregset, regcache, regnum, gregs); + sparc64_supply_gregset (&sparc64obsd_gregmap, regcache, regnum, gregs); return; } - sparc64_supply_gregset (&sparc64obsd_core_gregset, regcache, regnum, gregs); - sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs); + sparc64_supply_gregset (&sparc64obsd_core_gregmap, regcache, regnum, gregs); + sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs); } static void @@ -94,7 +94,7 @@ sparc64obsd_supply_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len) { - sparc64_supply_fpregset (&sparc64_bsd_fpregset, regcache, regnum, fpregs); + sparc64_supply_fpregset (&sparc64_bsd_fpregmap, regcache, regnum, fpregs); } \f diff --git a/gdb/sparcnbsd-nat.c b/gdb/sparcnbsd-nat.c index c7eb118..0393e34 100644 --- a/gdb/sparcnbsd-nat.c +++ b/gdb/sparcnbsd-nat.c @@ -62,8 +62,8 @@ void _initialize_sparcnbsd_nat (void); void _initialize_sparcnbsd_nat (void) { - sparc_gregset = &sparc32nbsd_gregset; - sparc_fpregset = &sparc32_bsd_fpregset; + sparc_gregmap = &sparc32nbsd_gregmap; + sparc_fpregmap = &sparc32_bsd_fpregmap; /* We've got nothing to add to the generic SPARC target. */ add_target (sparc_target ()); diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c index 14fbed9..ac94f10 100644 --- a/gdb/sparcnbsd-tdep.c +++ b/gdb/sparcnbsd-tdep.c @@ -41,7 +41,7 @@ #define X_RS2(i) ((i) & 0x1f) #define X_I(i) (((i) >> 13) & 1) -const struct sparc_gregset sparc32nbsd_gregset = +const struct sparc_gregmap sparc32nbsd_gregmap = { 0 * 4, /* %psr */ 1 * 4, /* %pc */ @@ -58,13 +58,13 @@ sparc32nbsd_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len) { - sparc32_supply_gregset (&sparc32nbsd_gregset, regcache, regnum, gregs); + sparc32_supply_gregset (&sparc32nbsd_gregmap, regcache, regnum, gregs); /* Traditional NetBSD core files don't use multiple register sets. Instead, the general-purpose and floating-point registers are lumped together in a single section. */ if (len >= 212) - sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum, + sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, (const char *) gregs + 80); } @@ -73,7 +73,7 @@ sparc32nbsd_supply_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len) { - sparc32_supply_fpregset (&sparc32_bsd_fpregset, regcache, regnum, fpregs); + sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum, fpregs); } \f -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 03/11] AARCH64: Replace regset_alloc() invocations by static regset structures. 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez 2014-05-15 15:49 ` [PATCH 02/11] Remove 'arch' field from regset structure Andreas Arnez 2014-05-15 15:49 ` [PATCH 09/11] SPARC: Rename register maps from "*regset" to "*regmap" Andreas Arnez @ 2014-05-15 15:49 ` Andreas Arnez 2014-05-15 15:49 ` [PATCH 04/11] ARM: " Andreas Arnez ` (8 subsequent siblings) 11 siblings, 0 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:49 UTC (permalink / raw) To: gdb-patches After removal of the regset_alloc invocations, the tdep fields 'gregset' and 'fpregset' become obsolete and are thus removed. gdb/ * aarch64-linux-tdep.c (aarch64_linux_gregset) (aarch64_linux_fpregset): New static regset structures. (aarch64_linux_regset_from_core_section): Drop dynamic allocation of regset structures. * aarch64-tdep.h (struct gdbarch_tdep): Remove 'gregset' and 'fpregset' fields. --- gdb/aarch64-linux-tdep.c | 29 +++++++++++++++-------------- gdb/aarch64-tdep.h | 4 ---- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index 92d1248..6f52c8c 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -240,6 +240,18 @@ supply_fpregset_from_core (const struct regset *regset, aarch64_linux_supply_fpregset (regcache, (const gdb_byte *) regbuf); } +/* Register set definitions. */ + +static const struct regset aarch64_linux_gregset = + { + NULL, supply_gregset_from_core, NULL + }; + +static const struct regset aarch64_linux_fpregset = + { + NULL, supply_fpregset_from_core, NULL + }; + /* Implement the "regset_from_core_section" gdbarch method. */ static const struct regset * @@ -247,25 +259,14 @@ aarch64_linux_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - if (strcmp (sect_name, ".reg") == 0 && sect_size == AARCH64_LINUX_SIZEOF_GREGSET) - { - if (tdep->gregset == NULL) - tdep->gregset = regset_alloc (gdbarch, supply_gregset_from_core, - NULL); - return tdep->gregset; - } + return &aarch64_linux_gregset; if (strcmp (sect_name, ".reg2") == 0 && sect_size == AARCH64_LINUX_SIZEOF_FPREGSET) - { - if (tdep->fpregset == NULL) - tdep->fpregset = regset_alloc (gdbarch, supply_fpregset_from_core, - NULL); - return tdep->fpregset; - } + return &aarch64_linux_fpregset; + return NULL; } diff --git a/gdb/aarch64-tdep.h b/gdb/aarch64-tdep.h index 30a5ee3..78fb779 100644 --- a/gdb/aarch64-tdep.h +++ b/gdb/aarch64-tdep.h @@ -82,10 +82,6 @@ struct gdbarch_tdep /* And the size of each entry in the buf. */ size_t jb_elt_size; - /* Cached core file helpers. */ - struct regset *gregset; - struct regset *fpregset; - /* Types for AdvSISD registers. */ struct type *vnq_type; struct type *vnd_type; -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 04/11] ARM: Replace regset_alloc() invocations by static regset structures. 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez ` (2 preceding siblings ...) 2014-05-15 15:49 ` [PATCH 03/11] AARCH64: Replace regset_alloc() invocations by static regset structures Andreas Arnez @ 2014-05-15 15:49 ` Andreas Arnez 2014-05-15 15:49 ` [PATCH 08/11] SCORE: Replace regset_alloc() invocation by a static regset structure Andreas Arnez ` (7 subsequent siblings) 11 siblings, 0 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:49 UTC (permalink / raw) To: gdb-patches After removal of the regset_alloc invocations, the appropriate tdep fields become obsolete and are thus removed. gdb/ * arm-linux-tdep.c (arm_linux_gregset, arm_linux_fpregset) (arm_linux_vfpregset): New static regset structures. (arm_linux_regset_from_core_section): Remove dynamic allocation of regset structures. * arm-tdep.h (struct gdbarch_tdep): Remove 'gregset', 'fpregset', and 'vfpregset' fields. --- gdb/arm-linux-tdep.c | 38 ++++++++++++++++++-------------------- gdb/arm-tdep.h | 3 --- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 98b912b..028a95b 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -686,6 +686,21 @@ arm_linux_collect_vfp (const struct regset *regset, regs + (regno - ARM_D0_REGNUM) * 8); } +static const struct regset arm_linux_gregset = + { + NULL, arm_linux_supply_gregset, arm_linux_collect_gregset + }; + +static const struct regset arm_linux_fpregset = + { + NULL, arm_linux_supply_nwfpe, arm_linux_collect_nwfpe + }; + +static const struct regset arm_linux_vfpregset = + { + NULL, arm_linux_supply_vfp, arm_linux_collect_vfp + }; + /* Return the appropriate register set for the core section identified by SECT_NAME and SECT_SIZE. */ @@ -693,34 +708,17 @@ static const struct regset * arm_linux_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - if (strcmp (sect_name, ".reg") == 0 && sect_size == ARM_LINUX_SIZEOF_GREGSET) - { - if (tdep->gregset == NULL) - tdep->gregset = regset_alloc (gdbarch, arm_linux_supply_gregset, - arm_linux_collect_gregset); - return tdep->gregset; - } + return &arm_linux_gregset; if (strcmp (sect_name, ".reg2") == 0 && sect_size == ARM_LINUX_SIZEOF_NWFPE) - { - if (tdep->fpregset == NULL) - tdep->fpregset = regset_alloc (gdbarch, arm_linux_supply_nwfpe, - arm_linux_collect_nwfpe); - return tdep->fpregset; - } + return &arm_linux_fpregset; if (strcmp (sect_name, ".reg-arm-vfp") == 0 && sect_size == ARM_LINUX_SIZEOF_VFP) - { - if (tdep->vfpregset == NULL) - tdep->vfpregset = regset_alloc (gdbarch, arm_linux_supply_vfp, - arm_linux_collect_vfp); - return tdep->vfpregset; - } + return &arm_linux_vfpregset; return NULL; } diff --git a/gdb/arm-tdep.h b/gdb/arm-tdep.h index f8ba122..29669d0 100644 --- a/gdb/arm-tdep.h +++ b/gdb/arm-tdep.h @@ -193,9 +193,6 @@ struct gdbarch_tdep /* Convention for returning structures. */ enum struct_return struct_return; - /* Cached core file helpers. */ - struct regset *gregset, *fpregset, *vfpregset; - /* ISA-specific data types. */ struct type *arm_ext_type; struct type *neon_double_type; -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 08/11] SCORE: Replace regset_alloc() invocation by a static regset structure. 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez ` (3 preceding siblings ...) 2014-05-15 15:49 ` [PATCH 04/11] ARM: " Andreas Arnez @ 2014-05-15 15:49 ` Andreas Arnez 2014-05-15 15:49 ` [PATCH 06/11] MIPS: Replace regset_alloc() invocations by static regset structures Andreas Arnez ` (6 subsequent siblings) 11 siblings, 0 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:49 UTC (permalink / raw) To: gdb-patches Since this changes makes the only member of the tdep structure obsolete, the tdep structure is removed. gdb/ * score-tdep.c (score7_linux_gregset): New static regset structure. (score7_linux_regset_from_core_section): Remove dynamic regset allocation. (score_gdbarch_init): Drop allocation of tdep structure. * score-tdep.h (struct gdbarch_tdep): Remove declaration. --- gdb/score-tdep.c | 21 ++++++++------------- gdb/score-tdep.h | 7 ------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c index 078315a..c224189 100644 --- a/gdb/score-tdep.c +++ b/gdb/score-tdep.c @@ -1447,6 +1447,12 @@ score7_linux_supply_gregset(const struct regset *regset, } } +static const struct regset score7_linux_gregset = + { + NULL, + score7_linux_supply_gregset, NULL + }; + /* Return the appropriate register set from the core section identified by SECT_NAME and SECT_SIZE. */ @@ -1454,20 +1460,11 @@ static const struct regset * score7_linux_regset_from_core_section(struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) { - struct gdbarch_tdep *tdep; - gdb_assert (gdbarch != NULL); gdb_assert (sect_name != NULL); - tdep = gdbarch_tdep (gdbarch); - if (strcmp(sect_name, ".reg") == 0 && sect_size == sizeof(elf_gregset_t)) - { - if (tdep->gregset == NULL) - tdep->gregset = regset_alloc (gdbarch, - score7_linux_supply_gregset, NULL); - return tdep->gregset; - } + return &score7_linux_gregset; return NULL; } @@ -1476,7 +1473,6 @@ static struct gdbarch * score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { struct gdbarch *gdbarch; - struct gdbarch_tdep *tdep; target_mach = info.bfd_arch_info->mach; arches = gdbarch_list_lookup_by_info (arches, &info); @@ -1484,8 +1480,7 @@ score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { return (arches->gdbarch); } - tdep = xcalloc(1, sizeof(struct gdbarch_tdep)); - gdbarch = gdbarch_alloc (&info, tdep); + gdbarch = gdbarch_alloc (&info, NULL); set_gdbarch_short_bit (gdbarch, 16); set_gdbarch_int_bit (gdbarch, 32); diff --git a/gdb/score-tdep.h b/gdb/score-tdep.h index b34f5a9..02a334e 100644 --- a/gdb/score-tdep.h +++ b/gdb/score-tdep.h @@ -49,13 +49,6 @@ enum gdb_regnum /* Forward declarations. */ struct regset; -/* Target-dependent structure in gdbarch */ -struct gdbarch_tdep -{ - /* Cached core file helpers. */ - struct regset *gregset; -}; - /* Linux Core file support (dirty hack) S+core Linux register set definition, copy from S+core Linux. */ -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 06/11] MIPS: Replace regset_alloc() invocations by static regset structures. 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez ` (4 preceding siblings ...) 2014-05-15 15:49 ` [PATCH 08/11] SCORE: Replace regset_alloc() invocation by a static regset structure Andreas Arnez @ 2014-05-15 15:49 ` Andreas Arnez 2014-05-15 15:49 ` [PATCH 10/11] SPARC: " Andreas Arnez ` (5 subsequent siblings) 11 siblings, 0 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:49 UTC (permalink / raw) To: gdb-patches After removal of the regset_alloc invocations, the appropriate tdep fields become obsolete and are thus removed. gdb/ * mips-linux-tdep.c (mips_linux_gregset, mips64_linux_gregset) (mips_linux_fpregset, mips64_linux_fpregset): New static regset structures. (mips_linux_regset_from_core_section): Remove dynamic regset allocations. * mips-tdep.h (struct gdbarch_tdep): Remove fields 'gregset', 'gregset64', 'fpregset', and 'fpregset64'. * mips-tdep.c (mips_gdbarch_init): Remove initialization of deleted tdep fields. --- gdb/mips-linux-tdep.c | 53 +++++++++++++++++++++++---------------------------- gdb/mips-tdep.c | 4 ---- gdb/mips-tdep.h | 8 -------- 3 files changed, 24 insertions(+), 41 deletions(-) diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index 61bea6c..a975db6 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -618,11 +618,30 @@ mips64_fill_fpregset_wrapper (const struct regset *regset, mips64_fill_fpregset (regcache, (mips64_elf_fpregset_t *)gregs, regnum); } +static const struct regset mips_linux_gregset = + { + NULL, mips_supply_gregset_wrapper, mips_fill_gregset_wrapper + }; + +static const struct regset mips64_linux_gregset = + { + NULL, mips64_supply_gregset_wrapper, mips64_fill_gregset_wrapper + }; + +static const struct regset mips_linux_fpregset = + { + NULL, mips_supply_fpregset_wrapper, mips_fill_fpregset_wrapper + }; + +static const struct regset mips64_linux_fpregset = + { + NULL, mips64_supply_fpregset_wrapper, mips64_fill_fpregset_wrapper + }; + static const struct regset * mips_linux_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); mips_elf_gregset_t gregset; mips_elf_fpregset_t fpregset; mips64_elf_gregset_t gregset64; @@ -631,21 +650,9 @@ mips_linux_regset_from_core_section (struct gdbarch *gdbarch, if (strcmp (sect_name, ".reg") == 0) { if (sect_size == sizeof (gregset)) - { - if (tdep->gregset == NULL) - tdep->gregset = regset_alloc (gdbarch, - mips_supply_gregset_wrapper, - mips_fill_gregset_wrapper); - return tdep->gregset; - } + return &mips_linux_gregset; else if (sect_size == sizeof (gregset64)) - { - if (tdep->gregset64 == NULL) - tdep->gregset64 = regset_alloc (gdbarch, - mips64_supply_gregset_wrapper, - mips64_fill_gregset_wrapper); - return tdep->gregset64; - } + return &mips64_linux_gregset; else { warning (_("wrong size gregset struct in core file")); @@ -654,21 +661,9 @@ mips_linux_regset_from_core_section (struct gdbarch *gdbarch, else if (strcmp (sect_name, ".reg2") == 0) { if (sect_size == sizeof (fpregset)) - { - if (tdep->fpregset == NULL) - tdep->fpregset = regset_alloc (gdbarch, - mips_supply_fpregset_wrapper, - mips_fill_fpregset_wrapper); - return tdep->fpregset; - } + return &mips_linux_fpregset; else if (sect_size == sizeof (fpregset64)) - { - if (tdep->fpregset64 == NULL) - tdep->fpregset64 = regset_alloc (gdbarch, - mips64_supply_fpregset_wrapper, - mips64_fill_fpregset_wrapper); - return tdep->fpregset64; - } + return &mips64_linux_fpregset; else { warning (_("wrong size fpregset struct in core file")); diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 606b150..c3e8e77 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -8327,10 +8327,6 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->mips_fpu_type = fpu_type; tdep->register_size_valid_p = 0; tdep->register_size = 0; - tdep->gregset = NULL; - tdep->gregset64 = NULL; - tdep->fpregset = NULL; - tdep->fpregset64 = NULL; if (info.target_desc) { diff --git a/gdb/mips-tdep.h b/gdb/mips-tdep.h index 31e9601..ba29952 100644 --- a/gdb/mips-tdep.h +++ b/gdb/mips-tdep.h @@ -109,14 +109,6 @@ struct gdbarch_tdep int register_size_valid_p; int register_size; - /* General-purpose registers. */ - struct regset *gregset; - struct regset *gregset64; - - /* Floating-point registers. */ - struct regset *fpregset; - struct regset *fpregset64; - /* Return the expected next PC if FRAME is stopped at a syscall instruction. */ CORE_ADDR (*syscall_next_pc) (struct frame_info *frame); -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 10/11] SPARC: Replace regset_alloc() invocations by static regset structures. 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez ` (5 preceding siblings ...) 2014-05-15 15:49 ` [PATCH 06/11] MIPS: Replace regset_alloc() invocations by static regset structures Andreas Arnez @ 2014-05-15 15:49 ` Andreas Arnez 2014-05-15 15:49 ` [PATCH 11/11] Drop regset_alloc() Andreas Arnez ` (4 subsequent siblings) 11 siblings, 0 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:49 UTC (permalink / raw) To: gdb-patches gdb/ * sparc-linux-tdep.c (sparc32_linux_gregset) (sparc32_linux_fpregset): New static regset structures. (sparc32_linux_init_abi): Drop dynamic regset allocations. * sparc-tdep.h (struct gdbarch_tdep): Constify 'gregset' and 'fpregset' fields. * sparc64-linux-tdep.c: (sparc64_linux_gregset) (sparc64_linux_fpregset): New static regset structures. (sparc64_linux_init_abi): Drop dynamic regset allocations. * sparc64fbsd-tdep.c (sparc64fbsd_gregset, sparc64fbsd_fpregset): New static regset structures. (sparc64fbsd_init_abi): Drop dynamic regset allocations. * sparc64nbsd-tdep.c (sparc64nbsd_gregset, sparc64nbsd_fpregset): New static regset structures. (sparc64nbsd_init_abi): Drop dynamic regset allocations. * sparc64obsd-tdep.c (sparc64obsd_gregset, sparc64obsd_fpregset): New static regset structures. (sparc64obsd_init_abi): Drop dynamic regset allocations. * sparcnbsd-tdep.c (sparc32nbsd_gregset, sparc32nbsd_fpregset): New static regset structures. (sparc32nbsd_init_abi): Drop dynamic regset allocations. --- gdb/sparc-linux-tdep.c | 20 ++++++++++++++++---- gdb/sparc-tdep.h | 4 ++-- gdb/sparc64-linux-tdep.c | 20 ++++++++++++++++---- gdb/sparc64fbsd-tdep.c | 16 ++++++++++++---- gdb/sparc64nbsd-tdep.c | 14 ++++++++++++-- gdb/sparc64obsd-tdep.c | 15 ++++++++++++--- gdb/sparcnbsd-tdep.c | 14 ++++++++++++-- 7 files changed, 82 insertions(+), 21 deletions(-) diff --git a/gdb/sparc-linux-tdep.c b/gdb/sparc-linux-tdep.c index 4a193e2..fd1fc3d 100644 --- a/gdb/sparc-linux-tdep.c +++ b/gdb/sparc-linux-tdep.c @@ -403,6 +403,20 @@ sparc32_linux_gdb_signal_to_target (struct gdbarch *gdbarch, \f +static const struct regset sparc32_linux_gregset = + { + NULL, + sparc32_linux_supply_core_gregset, + sparc32_linux_collect_core_gregset + }; + +static const struct regset sparc32_linux_fpregset = + { + NULL, + sparc32_linux_supply_core_fpregset, + sparc32_linux_collect_core_fpregset + }; + static void sparc32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { @@ -410,12 +424,10 @@ sparc32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) linux_init_abi (info, gdbarch); - tdep->gregset = regset_alloc (gdbarch, sparc32_linux_supply_core_gregset, - sparc32_linux_collect_core_gregset); + tdep->gregset = &sparc32_linux_gregset; tdep->sizeof_gregset = 152; - tdep->fpregset = regset_alloc (gdbarch, sparc32_linux_supply_core_fpregset, - sparc32_linux_collect_core_fpregset); + tdep->fpregset = &sparc32_linux_fpregset; tdep->sizeof_fpregset = 396; tramp_frame_prepend_unwinder (gdbarch, &sparc32_linux_sigframe); diff --git a/gdb/sparc-tdep.h b/gdb/sparc-tdep.h index 12c8ef7..13f0bb2 100644 --- a/gdb/sparc-tdep.h +++ b/gdb/sparc-tdep.h @@ -58,9 +58,9 @@ struct gdbarch_tdep int npc_regnum; /* Register sets. */ - struct regset *gregset; + const struct regset *gregset; size_t sizeof_gregset; - struct regset *fpregset; + const struct regset *fpregset; size_t sizeof_fpregset; /* Offset of saved PC in jmp_buf. */ diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c index 6040526..e843eb3 100644 --- a/gdb/sparc64-linux-tdep.c +++ b/gdb/sparc64-linux-tdep.c @@ -280,6 +280,20 @@ sparc64_linux_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) \f +static const struct regset sparc64_linux_gregset = + { + NULL, + sparc64_linux_supply_core_gregset, + sparc64_linux_collect_core_gregset + }; + +static const struct regset sparc64_linux_fpregset = + { + NULL, + sparc64_linux_supply_core_fpregset, + sparc64_linux_collect_core_fpregset + }; + static void sparc64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { @@ -287,12 +301,10 @@ sparc64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) linux_init_abi (info, gdbarch); - tdep->gregset = regset_alloc (gdbarch, sparc64_linux_supply_core_gregset, - sparc64_linux_collect_core_gregset); + tdep->gregset = &sparc64_linux_gregset; tdep->sizeof_gregset = 288; - tdep->fpregset = regset_alloc (gdbarch, sparc64_linux_supply_core_fpregset, - sparc64_linux_collect_core_fpregset); + tdep->fpregset = &sparc64_linux_fpregset; tdep->sizeof_fpregset = 280; tramp_frame_prepend_unwinder (gdbarch, &sparc64_linux_rt_sigframe); diff --git a/gdb/sparc64fbsd-tdep.c b/gdb/sparc64fbsd-tdep.c index 6ca87dc..fde7815 100644 --- a/gdb/sparc64fbsd-tdep.c +++ b/gdb/sparc64fbsd-tdep.c @@ -209,17 +209,25 @@ static const struct frame_unwind sparc64fbsd_sigtramp_frame_unwind = }; \f +static const struct regset sparc64fbsd_gregset = + { + NULL, sparc64fbsd_supply_gregset, sparc64fbsd_collect_gregset + }; + +static const struct regset sparc64fbsd_fpregset = + { + NULL, sparc64fbsd_supply_fpregset, sparc64fbsd_collect_fpregset + }; + static void sparc64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - tdep->gregset = regset_alloc (gdbarch, sparc64fbsd_supply_gregset, - sparc64fbsd_collect_gregset); + tdep->gregset = &sparc64fbsd_gregset; tdep->sizeof_gregset = 256; - tdep->fpregset = regset_alloc (gdbarch, sparc64fbsd_supply_fpregset, - sparc64fbsd_collect_fpregset); + tdep->fpregset = &sparc64fbsd_fpregset; tdep->sizeof_fpregset = 272; frame_unwind_append_unwinder (gdbarch, &sparc64fbsd_sigtramp_frame_unwind); diff --git a/gdb/sparc64nbsd-tdep.c b/gdb/sparc64nbsd-tdep.c index fac4c27..b67c762 100644 --- a/gdb/sparc64nbsd-tdep.c +++ b/gdb/sparc64nbsd-tdep.c @@ -237,15 +237,25 @@ static const struct frame_unwind sparc64nbsd_sigcontext_frame_unwind = }; \f +static const struct regset sparc64nbsd_gregset = + { + NULL, sparc64nbsd_supply_gregset, NULL + }; + +static const struct regset sparc64nbsd_fpregset = + { + NULL, sparc64nbsd_supply_fpregset, NULL + }; + static void sparc64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - tdep->gregset = regset_alloc (gdbarch, sparc64nbsd_supply_gregset, NULL); + tdep->gregset = &sparc64nbsd_gregset; tdep->sizeof_gregset = 160; - tdep->fpregset = regset_alloc (gdbarch, sparc64nbsd_supply_fpregset, NULL); + tdep->fpregset = &sparc64nbsd_fpregset; tdep->sizeof_fpregset = 272; /* Make sure we can single-step "new" syscalls. */ diff --git a/gdb/sparc64obsd-tdep.c b/gdb/sparc64obsd-tdep.c index 8f94574..8cc04f7 100644 --- a/gdb/sparc64obsd-tdep.c +++ b/gdb/sparc64obsd-tdep.c @@ -403,15 +403,24 @@ sparc64obsd_collect_uthread(const struct regcache *regcache, } \f +static const struct regset sparc64obsd_gregset = + { + NULL, sparc64obsd_supply_gregset, NULL + }; + +static const struct regset sparc64obsd_fpregset = + { + NULL, sparc64obsd_supply_fpregset, NULL + }; + static void sparc64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - tdep->gregset = regset_alloc (gdbarch, sparc64obsd_supply_gregset, NULL); + tdep->gregset = &sparc64obsd_gregset; tdep->sizeof_gregset = 288; - - tdep->fpregset = regset_alloc (gdbarch, sparc64obsd_supply_fpregset, NULL); + tdep->fpregset = &sparc64obsd_fpregset; tdep->sizeof_fpregset = 272; /* Make sure we can single-step "new" syscalls. */ diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c index ac94f10..b267842 100644 --- a/gdb/sparcnbsd-tdep.c +++ b/gdb/sparcnbsd-tdep.c @@ -283,6 +283,16 @@ sparcnbsd_step_trap (struct frame_info *frame, unsigned long insn) } \f +static const struct regset sparc32nbsd_gregset = + { + NULL, sparc32nbsd_supply_gregset, NULL + }; + +static const struct regset sparc32nbsd_fpregset = + { + NULL, sparc32nbsd_supply_fpregset, NULL + }; + static void sparc32nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { @@ -292,10 +302,10 @@ sparc32nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_gdbarch_long_double_bit (gdbarch, 64); set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double); - tdep->gregset = regset_alloc (gdbarch, sparc32nbsd_supply_gregset, NULL); + tdep->gregset = &sparc32nbsd_gregset; tdep->sizeof_gregset = 20 * 4; - tdep->fpregset = regset_alloc (gdbarch, sparc32nbsd_supply_fpregset, NULL); + tdep->fpregset = &sparc32nbsd_fpregset; tdep->sizeof_fpregset = 33 * 4; /* Make sure we can single-step "new" syscalls. */ -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 11/11] Drop regset_alloc(). 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez ` (6 preceding siblings ...) 2014-05-15 15:49 ` [PATCH 10/11] SPARC: " Andreas Arnez @ 2014-05-15 15:49 ` Andreas Arnez 2014-05-15 15:49 ` [PATCH 05/11] X86: Replace regset_alloc() invocations by static regset structures Andreas Arnez ` (3 subsequent siblings) 11 siblings, 0 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:49 UTC (permalink / raw) To: gdb-patches Now that all invocations of regset_alloc() have been removed, the function is dropped. Since regset_alloc() was the only function provided by regset.c, this source file is removed as well. gdb/ * Makefile.in (SFILES): Delete "regset.c". (COMMON_OBS): Delete "regset.o". * regset.c: Remove. * regset.h (regset_alloc): Delete prototype. --- gdb/Makefile.in | 4 ++-- gdb/regset.c | 43 ------------------------------------------- gdb/regset.h | 11 ----------- 3 files changed, 2 insertions(+), 56 deletions(-) delete mode 100644 gdb/regset.c diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 3efedc8..f2c16ec 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -836,7 +836,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \ jit.c \ xml-syscall.c \ annotate.c common/signals.c copying.c dfp.c gdb.c inf-child.c \ - regset.c sol-thread.c windows-termcap.c \ + sol-thread.c windows-termcap.c \ common/gdb_vecs.c common/common-utils.c common/xml-utils.c \ common/ptid.c common/buffer.c gdb-dlfcn.c common/agent.c \ common/format.c common/filestuff.c btrace.c record-btrace.c ctf.c \ @@ -1011,7 +1011,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \ gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o \ cp-namespace.o \ d-support.o \ - reggroups.o regset.o \ + reggroups.o \ trad-frame.o \ tramp-frame.o \ solib.o solib-target.o \ diff --git a/gdb/regset.c b/gdb/regset.c deleted file mode 100644 index 1d19d34..0000000 --- a/gdb/regset.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Manage register sets. - - Copyright (C) 2004-2014 Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -#include "defs.h" -#include "regset.h" - -#include "gdb_assert.h" - -/* Allocate a fresh 'struct regset' whose supply_regset function is - SUPPLY_REGSET, and whose collect_regset function is COLLECT_REGSET. - If the regset has no collect_regset function, pass NULL for - COLLECT_REGSET. - - The object returned is allocated on ARCH's obstack. */ - -struct regset * -regset_alloc (struct gdbarch *arch, - supply_regset_ftype *supply_regset, - collect_regset_ftype *collect_regset) -{ - struct regset *regset = GDBARCH_OBSTACK_ZALLOC (arch, struct regset); - - regset->supply_regset = supply_regset; - regset->collect_regset = collect_regset; - - return regset; -} diff --git a/gdb/regset.h b/gdb/regset.h index f1a6e24..03dbdaa 100644 --- a/gdb/regset.h +++ b/gdb/regset.h @@ -52,15 +52,4 @@ struct regset collect_regset_ftype *collect_regset; }; -/* Allocate a fresh 'struct regset' whose supply_regset function is - SUPPLY_REGSET, and whose collect_regset function is COLLECT_REGSET. - If the regset has no collect_regset function, pass NULL for - COLLECT_REGSET. - - The object returned is allocated on ARCH's obstack. */ - -extern struct regset *regset_alloc (struct gdbarch *arch, - supply_regset_ftype *supply_regset, - collect_regset_ftype *collect_regset); - #endif /* regset.h */ -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 05/11] X86: Replace regset_alloc() invocations by static regset structures. 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez ` (7 preceding siblings ...) 2014-05-15 15:49 ` [PATCH 11/11] Drop regset_alloc() Andreas Arnez @ 2014-05-15 15:49 ` Andreas Arnez 2014-05-15 15:50 ` [PATCH 01/11] Constify " Andreas Arnez ` (2 subsequent siblings) 11 siblings, 0 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:49 UTC (permalink / raw) To: gdb-patches After removal of the regset_alloc invocations, the appropriate tdep fields become obsolete and are thus removed. gdb/ * amd64-tdep.c (amd64_fpregset, amd64_xstateregset): New static regset structures. (amd64_regset_from_core_section): Remove dynamic regset allocations. * amd64obsd-tdep.c (amd64obsd_combined_regset): New static regset structure. (amd64obsd_regset_from_core_section): Remove dynamic regset allocation. * i386-cygwin-tdep.c (i386_windows_regset_from_core_section): Likewise. * i386-nto-tdep.c (i386nto_supply_gregset): Adjust call to x86-common regset supply function. * i386-tdep.c (i386_collect_gregset): Make static. (i386_gregset): New global regset structure. (i386_fpregset, i386_xstateregset): New static regset structures. (i386_regset_from_core_section): Remove dynamic regset allocations. (i386_gdbarch_init): Remove initialization of tdep fields 'gregset', 'fpregset', and 'xstateregset'. * i386-tdep.h (struct gdbarch_tdep): Remove fields 'gregset', 'fpregset', and 'xstateregset'. (i386_collect_gregset): Remove prototype. (i386_gregset): New declaration. * i386obsd-tdep.c (i386obsd_aout_gregset): New static regset structure. (i386obsd_aout_regset_from_core_section): Remove dynamic regset allocation. --- gdb/amd64-tdep.c | 27 ++++++++++++--------------- gdb/amd64obsd-tdep.c | 11 ++++++----- gdb/i386-cygwin-tdep.c | 9 +-------- gdb/i386-nto-tdep.c | 8 ++------ gdb/i386-tdep.c | 46 +++++++++++++++++++++------------------------- gdb/i386-tdep.h | 14 ++------------ gdb/i386obsd-tdep.c | 12 ++++++------ 7 files changed, 50 insertions(+), 77 deletions(-) diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 1b9797a..10bd31b 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -2886,6 +2886,16 @@ amd64_collect_xstateregset (const struct regset *regset, amd64_collect_xsave (regcache, regnum, xstateregs, 1); } +static const struct regset amd64_fpregset = + { + NULL, amd64_supply_fpregset, amd64_collect_fpregset + }; + +static const struct regset amd64_xstateregset = + { + NULL, amd64_supply_xstateregset, amd64_collect_xstateregset + }; + /* Return the appropriate register set for the core section identified by SECT_NAME and SECT_SIZE. */ @@ -2896,23 +2906,10 @@ amd64_regset_from_core_section (struct gdbarch *gdbarch, struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); if (strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset) - { - if (tdep->fpregset == NULL) - tdep->fpregset = regset_alloc (gdbarch, amd64_supply_fpregset, - amd64_collect_fpregset); - - return tdep->fpregset; - } + return &amd64_fpregset; if (strcmp (sect_name, ".reg-xstate") == 0) - { - if (tdep->xstateregset == NULL) - tdep->xstateregset = regset_alloc (gdbarch, - amd64_supply_xstateregset, - amd64_collect_xstateregset); - - return tdep->xstateregset; - } + return &amd64_xstateregset; return i386_regset_from_core_section (gdbarch, sect_name, sect_size); } diff --git a/gdb/amd64obsd-tdep.c b/gdb/amd64obsd-tdep.c index 2cc0a0f..5a5e209 100644 --- a/gdb/amd64obsd-tdep.c +++ b/gdb/amd64obsd-tdep.c @@ -55,6 +55,11 @@ amd64obsd_supply_regset (const struct regset *regset, ((const gdb_byte *)regs) + tdep->sizeof_gregset); } +static const struct regset amd64obsd_combined_regset = + { + NULL, amd64obsd_supply_regset, NULL + }; + static const struct regset * amd64obsd_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) @@ -66,11 +71,7 @@ amd64obsd_regset_from_core_section (struct gdbarch *gdbarch, if (strcmp (sect_name, ".reg") == 0 && sect_size >= tdep->sizeof_gregset + I387_SIZEOF_FXSAVE) - { - if (tdep->gregset == NULL) - tdep->gregset = regset_alloc (gdbarch, amd64obsd_supply_regset, NULL); - return tdep->gregset; - } + return &amd64obsd_combined_regset; return NULL; } diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c index 7b7785a..a23f80e 100644 --- a/gdb/i386-cygwin-tdep.c +++ b/gdb/i386-cygwin-tdep.c @@ -96,16 +96,9 @@ static const struct regset * i386_windows_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - if (strcmp (sect_name, ".reg") == 0 && sect_size == I386_WINDOWS_SIZEOF_GREGSET) - { - if (tdep->gregset == NULL) - tdep->gregset = regset_alloc (gdbarch, i386_supply_gregset, - i386_collect_gregset); - return tdep->gregset; - } + return &i386_gregset; return NULL; } diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c index 8d8ba10..d005914 100644 --- a/gdb/i386-nto-tdep.c +++ b/gdb/i386-nto-tdep.c @@ -82,13 +82,9 @@ i386nto_supply_gregset (struct regcache *regcache, char *gpregs) struct gdbarch *gdbarch = get_regcache_arch (regcache); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - if(tdep->gregset == NULL) - tdep->gregset = regset_alloc (gdbarch, i386_supply_gregset, - i386_collect_gregset); - gdb_assert (tdep->gregset_reg_offset == i386nto_gregset_reg_offset); - tdep->gregset->supply_regset (tdep->gregset, regcache, -1, - gpregs, NUM_GPREGS * 4); + i386_gregset.supply_regset (&i386_gregset, regcache, -1, + gpregs, NUM_GPREGS * 4); } static void diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 7d2363f..88fc31f 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -3744,7 +3744,7 @@ i386_supply_gregset (const struct regset *regset, struct regcache *regcache, general-purpose register set REGSET. If REGNUM is -1, do this for all registers in REGSET. */ -void +static void i386_collect_gregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len) @@ -3828,6 +3828,23 @@ i386_collect_xstateregset (const struct regset *regset, i387_collect_xsave (regcache, regnum, xstateregs, 1); } +/* Register set definitions. */ + +const struct regset i386_gregset = + { + NULL, i386_supply_gregset, i386_collect_gregset + }; + +static const struct regset i386_fpregset = + { + NULL, i386_supply_fpregset, i386_collect_fpregset + }; + +static const struct regset i386_xstateregset = + { + NULL, i386_supply_xstateregset, i386_collect_xstateregset + }; + /* Return the appropriate register set for the core section identified by SECT_NAME and SECT_SIZE. */ @@ -3838,32 +3855,15 @@ i386_regset_from_core_section (struct gdbarch *gdbarch, struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); if (strcmp (sect_name, ".reg") == 0 && sect_size == tdep->sizeof_gregset) - { - if (tdep->gregset == NULL) - tdep->gregset = regset_alloc (gdbarch, i386_supply_gregset, - i386_collect_gregset); - return tdep->gregset; - } + return &i386_gregset; if ((strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset) || (strcmp (sect_name, ".reg-xfp") == 0 && sect_size == I387_SIZEOF_FXSAVE)) - { - if (tdep->fpregset == NULL) - tdep->fpregset = regset_alloc (gdbarch, i386_supply_fpregset, - i386_collect_fpregset); - return tdep->fpregset; - } + return &i386_fpregset; if (strcmp (sect_name, ".reg-xstate") == 0) - { - if (tdep->xstateregset == NULL) - tdep->xstateregset = regset_alloc (gdbarch, - i386_supply_xstateregset, - i386_collect_xstateregset); - - return tdep->xstateregset; - } + return &i386_xstateregset; return NULL; } @@ -8287,17 +8287,13 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) gdbarch = gdbarch_alloc (&info, tdep); /* General-purpose registers. */ - tdep->gregset = NULL; tdep->gregset_reg_offset = NULL; tdep->gregset_num_regs = I386_NUM_GREGS; tdep->sizeof_gregset = 0; /* Floating-point registers. */ - tdep->fpregset = NULL; tdep->sizeof_fpregset = I387_SIZEOF_FSAVE; - tdep->xstateregset = NULL; - /* The default settings include the FPU registers, the MMX registers and the SSE registers. This can be overridden for a specific ABI by adjusting the members `st0_regnum', `mm0_regnum' and diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h index 2ada2bd..e0950a3 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -56,18 +56,13 @@ enum struct_return struct gdbarch_tdep { /* General-purpose registers. */ - struct regset *gregset; int *gregset_reg_offset; int gregset_num_regs; size_t sizeof_gregset; /* Floating-point registers. */ - struct regset *fpregset; size_t sizeof_fpregset; - /* XSAVE extended state. */ - struct regset *xstateregset; - /* Register number for %st(0). The register numbers for the other registers follow from this one. Set this to -1 to indicate the absence of an FPU. */ @@ -389,13 +384,8 @@ extern void i386_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len); -/* Collect register REGNUM from the register cache REGCACHE and store - it in the buffer specified by GREGS and LEN as described by the - general-purpose register set REGSET. If REGNUM is -1, do this for - all registers in REGSET. */ -extern void i386_collect_gregset (const struct regset *regset, - const struct regcache *regcache, - int regnum, void *gregs, size_t len); +/* General-purpose register set. */ +extern const struct regset i386_gregset; /* Return the appropriate register set for the core section identified by SECT_NAME and SECT_SIZE. */ diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c index 7d9ba93..8f76e43 100644 --- a/gdb/i386obsd-tdep.c +++ b/gdb/i386obsd-tdep.c @@ -152,6 +152,11 @@ i386obsd_aout_supply_regset (const struct regset *regset, i387_supply_fsave (regcache, regnum, gregs + tdep->sizeof_gregset); } +static const struct regset i386obsd_aout_gregset = + { + NULL, i386obsd_aout_supply_regset, NULL + }; + static const struct regset * i386obsd_aout_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, @@ -164,12 +169,7 @@ i386obsd_aout_regset_from_core_section (struct gdbarch *gdbarch, if (strcmp (sect_name, ".reg") == 0 && sect_size >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE) - { - if (tdep->gregset == NULL) - tdep->gregset = - regset_alloc (gdbarch, i386obsd_aout_supply_regset, NULL); - return tdep->gregset; - } + return &i386obsd_aout_gregset; return NULL; } -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 01/11] Constify regset structures. 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez ` (8 preceding siblings ...) 2014-05-15 15:49 ` [PATCH 05/11] X86: Replace regset_alloc() invocations by static regset structures Andreas Arnez @ 2014-05-15 15:50 ` Andreas Arnez 2014-05-15 15:59 ` [PATCH 07/11] MN10300: Replace regset_alloc() invocations by static " Andreas Arnez 2014-05-19 7:32 ` [PING] [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez 11 siblings, 0 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:50 UTC (permalink / raw) To: gdb-patches gdb/ * alpha-linux-tdep.c (alpha_linux_gregset, alpha_linux_fpregset): Constify structures. * alphanbsd-tdep.c (alphanbsd_gregset, alphanbsd_fpregset) (alphanbsd_aout_gregset): Likewise. * armbsd-tdep.c (armbsd_gregset, armbsd_fpregset): Likewise. * frv-linux-tdep.c (frv_linux_gregset, frv_linux_fpregset): Likewise. * hppa-hpux-tdep.c (hppa_hpux_regset): Likewise. * hppa-linux-tdep.c (hppa_linux_regset, hppa_linux_fpregset): Likewise. * hppanbsd-tdep.c (hppanbsd_gregset): Likewise. * hppaobsd-tdep.c (hppaobsd_gregset, hppaobsd_fpregset): Likewise. * m32r-linux-tdep.c (m32r_linux_gregset): Likewise. * m68kbsd-tdep.c (m68kbsd_gregset, m68kbsd_fpregset): Likewise. * m88k-tdep.c (m88k_gregset): Likewise. * mips64obsd-tdep.c (mips64obsd_gregset): Likewise. * mipsnbsd-tdep.c (mipsnbsd_gregset, mipsnbsd_fpregset): Likewise. * nios2-linux-tdep.c (nios2_core_regset): Likewise. * ppcfbsd-tdep.c (ppc32_fbsd_fpregset): Likewise. * ppcnbsd-tdep.c (ppcnbsd_gregset, ppcnbsd_fpregset): Likewise. * ppcnbsd-tdep.h (ppcnbsd_gregset, ppcnbsd_fpregset): Likewise. * ppcobsd-tdep.c (ppcobsd_gregset, ppcobsd_fpregset): Likewise. * ppcobsd-tdep.h (ppcobsd_gregset, ppcobsd_fpregset): Likewise. * rs6000-aix-tdep.c (rs6000_aix32_regset, rs6000_aix64_regset): Likewise. * sh-tdep.c (sh_corefile_gregset, sh_corefile_fpregset): Likewise. * sh-tdep.h (sh_corefile_gregset): Likewise. * tilegx-linux-tdep.c (tilegx_linux_regset): Likewise. * vax-tdep.c (vax_gregset): Likewise. --- gdb/alpha-linux-tdep.c | 4 ++-- gdb/alphanbsd-tdep.c | 6 +++--- gdb/armbsd-tdep.c | 4 ++-- gdb/frv-linux-tdep.c | 4 ++-- gdb/hppa-hpux-tdep.c | 2 +- gdb/hppa-linux-tdep.c | 4 ++-- gdb/hppanbsd-tdep.c | 2 +- gdb/hppaobsd-tdep.c | 4 ++-- gdb/m32r-linux-tdep.c | 2 +- gdb/m68kbsd-tdep.c | 4 ++-- gdb/m88k-tdep.c | 2 +- gdb/mips64obsd-tdep.c | 2 +- gdb/mipsnbsd-tdep.c | 4 ++-- gdb/nios2-linux-tdep.c | 2 +- gdb/ppcfbsd-tdep.c | 2 +- gdb/ppcnbsd-tdep.c | 4 ++-- gdb/ppcnbsd-tdep.h | 4 ++-- gdb/ppcobsd-tdep.c | 4 ++-- gdb/ppcobsd-tdep.h | 4 ++-- gdb/rs6000-aix-tdep.c | 4 ++-- gdb/sh-tdep.c | 4 ++-- gdb/sh-tdep.h | 2 +- gdb/tilegx-linux-tdep.c | 2 +- gdb/vax-tdep.c | 2 +- 24 files changed, 39 insertions(+), 39 deletions(-) diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c index 0f39968..52f19d0 100644 --- a/gdb/alpha-linux-tdep.c +++ b/gdb/alpha-linux-tdep.c @@ -206,13 +206,13 @@ alpha_linux_supply_fpregset (const struct regset *regset, regcache_raw_supply (regcache, ALPHA_FPCR_REGNUM, regs + 31 * 8); } -static struct regset alpha_linux_gregset = +static const struct regset alpha_linux_gregset = { NULL, alpha_linux_supply_gregset }; -static struct regset alpha_linux_fpregset = +static const struct regset alpha_linux_fpregset = { NULL, alpha_linux_supply_fpregset diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c index 2225790..58d9f32 100644 --- a/gdb/alphanbsd-tdep.c +++ b/gdb/alphanbsd-tdep.c @@ -141,19 +141,19 @@ alphanbsd_aout_supply_gregset (const struct regset *regset, /* NetBSD/alpha register sets. */ -static struct regset alphanbsd_gregset = +static const struct regset alphanbsd_gregset = { NULL, alphanbsd_supply_gregset }; -static struct regset alphanbsd_fpregset = +static const struct regset alphanbsd_fpregset = { NULL, alphanbsd_supply_fpregset }; -static struct regset alphanbsd_aout_gregset = +static const struct regset alphanbsd_aout_gregset = { NULL, alphanbsd_aout_supply_gregset diff --git a/gdb/armbsd-tdep.c b/gdb/armbsd-tdep.c index b57af3d..036db6c 100644 --- a/gdb/armbsd-tdep.c +++ b/gdb/armbsd-tdep.c @@ -98,13 +98,13 @@ armbsd_supply_gregset (const struct regset *regset, /* ARM register sets. */ -static struct regset armbsd_gregset = +static const struct regset armbsd_gregset = { NULL, armbsd_supply_gregset }; -static struct regset armbsd_fpregset = +static const struct regset armbsd_fpregset = { NULL, armbsd_supply_fpregset diff --git a/gdb/frv-linux-tdep.c b/gdb/frv-linux-tdep.c index 2ddc3f2..fb163a8 100644 --- a/gdb/frv-linux-tdep.c +++ b/gdb/frv-linux-tdep.c @@ -465,13 +465,13 @@ frv_linux_supply_fpregset (const struct regset *regset, /* FRV Linux kernel register sets. */ -static struct regset frv_linux_gregset = +static const struct regset frv_linux_gregset = { NULL, frv_linux_supply_gregset }; -static struct regset frv_linux_fpregset = +static const struct regset frv_linux_fpregset = { NULL, frv_linux_supply_fpregset diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c index 8d4686f..588f577 100644 --- a/gdb/hppa-hpux-tdep.c +++ b/gdb/hppa-hpux-tdep.c @@ -1367,7 +1367,7 @@ hppa_hpux_supply_save_state (const struct regset *regset, /* HP-UX register set. */ -static struct regset hppa_hpux_regset = +static const struct regset hppa_hpux_regset = { NULL, hppa_hpux_supply_save_state diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c index 4e89048..7a765a2 100644 --- a/gdb/hppa-linux-tdep.c +++ b/gdb/hppa-linux-tdep.c @@ -491,13 +491,13 @@ hppa_linux_supply_fpregset (const struct regset *regset, } /* HPPA Linux kernel register set. */ -static struct regset hppa_linux_regset = +static const struct regset hppa_linux_regset = { NULL, hppa_linux_supply_regset }; -static struct regset hppa_linux_fpregset = +static const struct regset hppa_linux_fpregset = { NULL, hppa_linux_supply_fpregset diff --git a/gdb/hppanbsd-tdep.c b/gdb/hppanbsd-tdep.c index 466aa69..fdc9719 100644 --- a/gdb/hppanbsd-tdep.c +++ b/gdb/hppanbsd-tdep.c @@ -181,7 +181,7 @@ hppanbsd_supply_gregset (const struct regset *regset, /* NetBSD/hppa register set. */ -static struct regset hppanbsd_gregset = +static const struct regset hppanbsd_gregset = { NULL, hppanbsd_supply_gregset diff --git a/gdb/hppaobsd-tdep.c b/gdb/hppaobsd-tdep.c index 7f517dc..8dc03a2 100644 --- a/gdb/hppaobsd-tdep.c +++ b/gdb/hppaobsd-tdep.c @@ -131,13 +131,13 @@ hppaobsd_supply_fpregset (const struct regset *regset, /* OpenBSD/hppa register sets. */ -static struct regset hppaobsd_gregset = +static const struct regset hppaobsd_gregset = { NULL, hppaobsd_supply_gregset }; -static struct regset hppaobsd_fpregset = +static const struct regset hppaobsd_fpregset = { NULL, hppaobsd_supply_fpregset diff --git a/gdb/m32r-linux-tdep.c b/gdb/m32r-linux-tdep.c index 683b67e..bf1ffff 100644 --- a/gdb/m32r-linux-tdep.c +++ b/gdb/m32r-linux-tdep.c @@ -388,7 +388,7 @@ m32r_linux_supply_gregset (const struct regset *regset, } } -static struct regset m32r_linux_gregset = { +static const struct regset m32r_linux_gregset = { NULL, m32r_linux_supply_gregset }; diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c index e59bc66..d27beb8 100644 --- a/gdb/m68kbsd-tdep.c +++ b/gdb/m68kbsd-tdep.c @@ -105,13 +105,13 @@ m68kbsd_supply_gregset (const struct regset *regset, /* Motorola 68000 register sets. */ -static struct regset m68kbsd_gregset = +static const struct regset m68kbsd_gregset = { NULL, m68kbsd_supply_gregset }; -static struct regset m68kbsd_fpregset = +static const struct regset m68kbsd_fpregset = { NULL, m68kbsd_supply_fpregset diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c index bab7fee..56384a7 100644 --- a/gdb/m88k-tdep.c +++ b/gdb/m88k-tdep.c @@ -799,7 +799,7 @@ m88k_supply_gregset (const struct regset *regset, /* Motorola 88000 register set. */ -static struct regset m88k_gregset = +static const struct regset m88k_gregset = { NULL, m88k_supply_gregset diff --git a/gdb/mips64obsd-tdep.c b/gdb/mips64obsd-tdep.c index 62853ce..6d8b9ee 100644 --- a/gdb/mips64obsd-tdep.c +++ b/gdb/mips64obsd-tdep.c @@ -61,7 +61,7 @@ mips64obsd_supply_gregset (const struct regset *regset, /* OpenBSD/mips64 register set. */ -static struct regset mips64obsd_gregset = +static const struct regset mips64obsd_gregset = { NULL, mips64obsd_supply_gregset diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c index 9742150..31b8dca 100644 --- a/gdb/mipsnbsd-tdep.c +++ b/gdb/mipsnbsd-tdep.c @@ -103,13 +103,13 @@ mipsnbsd_supply_gregset (const struct regset *regset, /* NetBSD/mips register sets. */ -static struct regset mipsnbsd_gregset = +static const struct regset mipsnbsd_gregset = { NULL, mipsnbsd_supply_gregset }; -static struct regset mipsnbsd_fpregset = +static const struct regset mipsnbsd_fpregset = { NULL, mipsnbsd_supply_fpregset diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c index 792a4da..d9a51a8 100644 --- a/gdb/nios2-linux-tdep.c +++ b/gdb/nios2-linux-tdep.c @@ -73,7 +73,7 @@ nios2_supply_gregset (const struct regset *regset, } } -static struct regset nios2_core_regset = +static const struct regset nios2_core_regset = { NULL, nios2_supply_gregset, diff --git a/gdb/ppcfbsd-tdep.c b/gdb/ppcfbsd-tdep.c index a03c6a9..77292f3 100644 --- a/gdb/ppcfbsd-tdep.c +++ b/gdb/ppcfbsd-tdep.c @@ -115,7 +115,7 @@ static const struct regset ppc64_fbsd_gregset = { /* 32-/64-bit floating-point register set. */ -static struct regset ppc32_fbsd_fpregset = { +static const struct regset ppc32_fbsd_fpregset = { &ppc32_fbsd_reg_offsets, ppc_supply_fpregset, ppc_collect_fpregset diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c index 58e6599..6fe8477 100644 --- a/gdb/ppcnbsd-tdep.c +++ b/gdb/ppcnbsd-tdep.c @@ -42,13 +42,13 @@ struct ppc_reg_offsets ppcnbsd_reg_offsets; /* NetBSD/powerpc register sets. */ -struct regset ppcnbsd_gregset = +const struct regset ppcnbsd_gregset = { &ppcnbsd_reg_offsets, ppc_supply_gregset }; -struct regset ppcnbsd_fpregset = +const struct regset ppcnbsd_fpregset = { &ppcnbsd_reg_offsets, ppc_supply_fpregset diff --git a/gdb/ppcnbsd-tdep.h b/gdb/ppcnbsd-tdep.h index 52f6478..747b452 100644 --- a/gdb/ppcnbsd-tdep.h +++ b/gdb/ppcnbsd-tdep.h @@ -28,7 +28,7 @@ struct regset; extern struct ppc_reg_offsets ppcnbsd_reg_offsets; /* Register sets for NetBSD/powerpc. */ -extern struct regset ppcnbsd_gregset; -extern struct regset ppcnbsd_fpregset; +extern const struct regset ppcnbsd_gregset; +extern const struct regset ppcnbsd_fpregset; #endif /* ppcnbsd-tdep.h */ diff --git a/gdb/ppcobsd-tdep.c b/gdb/ppcobsd-tdep.c index ac60bcc..2cdf687 100644 --- a/gdb/ppcobsd-tdep.c +++ b/gdb/ppcobsd-tdep.c @@ -71,13 +71,13 @@ ppcobsd_collect_gregset (const struct regset *regset, /* OpenBSD/powerpc register set. */ -struct regset ppcobsd_gregset = +const struct regset ppcobsd_gregset = { &ppcobsd_reg_offsets, ppcobsd_supply_gregset }; -struct regset ppcobsd_fpregset = +const struct regset ppcobsd_fpregset = { &ppcobsd_fpreg_offsets, ppc_supply_fpregset diff --git a/gdb/ppcobsd-tdep.h b/gdb/ppcobsd-tdep.h index ea6bd3d..8c9ac3a 100644 --- a/gdb/ppcobsd-tdep.h +++ b/gdb/ppcobsd-tdep.h @@ -30,8 +30,8 @@ extern struct ppc_reg_offsets ppcobsd_reg_offsets; extern struct ppc_reg_offsets ppcobsd_fpreg_offsets; /* Register sets for OpenBSD/powerpc. */ -extern struct regset ppcobsd_gregset; -extern struct regset ppcobsd_fpregset; +extern const struct regset ppcobsd_gregset; +extern const struct regset ppcobsd_fpregset; \f /* Supply register REGNUM in the general-purpose register set REGSET diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c index 3ab8883..83e881e 100644 --- a/gdb/rs6000-aix-tdep.c +++ b/gdb/rs6000-aix-tdep.c @@ -135,14 +135,14 @@ rs6000_aix_collect_regset (const struct regset *regset, /* AIX register set. */ -static struct regset rs6000_aix32_regset = +static const struct regset rs6000_aix32_regset = { &rs6000_aix32_reg_offsets, rs6000_aix_supply_regset, rs6000_aix_collect_regset, }; -static struct regset rs6000_aix64_regset = +static const struct regset rs6000_aix64_regset = { &rs6000_aix64_reg_offsets, rs6000_aix_supply_regset, diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 85f8067..0c1fbed 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -2195,14 +2195,14 @@ sh_corefile_collect_regset (const struct regset *regset, /* The following two regsets have the same contents, so it is tempting to unify them, but they are distiguished by their address, so don't. */ -struct regset sh_corefile_gregset = +const struct regset sh_corefile_gregset = { NULL, sh_corefile_supply_regset, sh_corefile_collect_regset }; -static struct regset sh_corefile_fpregset = +static const struct regset sh_corefile_fpregset = { NULL, sh_corefile_supply_regset, diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h index 3e3c746..5d64c74 100644 --- a/gdb/sh-tdep.h +++ b/gdb/sh-tdep.h @@ -101,7 +101,7 @@ struct gdbarch_tdep struct sh_corefile_regmap *core_fpregmap; }; -extern struct regset sh_corefile_gregset; +extern const struct regset sh_corefile_gregset; void sh_corefile_supply_regset (const struct regset *regset, struct regcache *regcache, diff --git a/gdb/tilegx-linux-tdep.c b/gdb/tilegx-linux-tdep.c index 98b071a..98b03db 100644 --- a/gdb/tilegx-linux-tdep.c +++ b/gdb/tilegx-linux-tdep.c @@ -97,7 +97,7 @@ tilegx_linux_supply_regset (const struct regset *regset, } /* TILE-Gx Linux kernel register set. */ -static struct regset tilegx_linux_regset = +static const struct regset tilegx_linux_regset = { NULL, tilegx_linux_supply_regset diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index efa702c..4780c90 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -85,7 +85,7 @@ vax_supply_gregset (const struct regset *regset, struct regcache *regcache, /* VAX register set. */ -static struct regset vax_gregset = +static const struct regset vax_gregset = { NULL, vax_supply_gregset -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 07/11] MN10300: Replace regset_alloc() invocations by static regset structures. 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez ` (9 preceding siblings ...) 2014-05-15 15:50 ` [PATCH 01/11] Constify " Andreas Arnez @ 2014-05-15 15:59 ` Andreas Arnez 2014-05-19 7:32 ` [PING] [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez 11 siblings, 0 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-15 15:59 UTC (permalink / raw) To: gdb-patches On this architecture the change may fix a small memory leak. gdb/ * mn10300-linux-tdep.c (am33_gregset, am33_fpregset): New static regset structures. (am33_regset_from_core_section): Remove dynamic regset allocations. --- gdb/mn10300-linux-tdep.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c index 6acae56..4377463 100644 --- a/gdb/mn10300-linux-tdep.c +++ b/gdb/mn10300-linux-tdep.c @@ -451,6 +451,16 @@ am33_collect_fpregset_method (const struct regset *regset, return; } +static const struct regset am33_gregset = + { + NULL, am33_supply_gregset_method, am33_collect_gregset_method + }; + +static const struct regset am33_fpregset = + { + NULL, am33_supply_fpregset_method, am33_collect_fpregset_method + }; + /* Create a struct regset from a corefile register section. */ static const struct regset * @@ -458,17 +468,10 @@ am33_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) { - /* We will call regset_alloc, and pass the names of the supply and - collect methods. */ - if (sect_size == sizeof (mn10300_elf_fpregset_t)) - return regset_alloc (gdbarch, - am33_supply_fpregset_method, - am33_collect_fpregset_method); + return &am33_fpregset; else - return regset_alloc (gdbarch, - am33_supply_gregset_method, - am33_collect_gregset_method); + return &am33_gregset; } \f static void -- 1.8.4.2 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PING] [PATCH 00/11] Regset rework preparations part 1 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez ` (10 preceding siblings ...) 2014-05-15 15:59 ` [PATCH 07/11] MN10300: Replace regset_alloc() invocations by static " Andreas Arnez @ 2014-05-19 7:32 ` Andreas Arnez 2014-05-20 20:41 ` Maciej W. Rozycki 2014-05-21 10:39 ` Pedro Alves 11 siblings, 2 replies; 16+ messages in thread From: Andreas Arnez @ 2014-05-19 7:32 UTC (permalink / raw) To: gdb-patches On Thu, May 15 2014, Andreas Arnez wrote: > This is the first half of the "regset rework preparations" series I've > posted as RFC: > https://sourceware.org/ml/gdb-patches/2014-04/msg00560.html On Wed, May 14 2014, Mark Kettenis wrote: >> From: Andreas Arnez <arnez@linux.vnet.ibm.com> >> Date: Wed, 14 May 2014 14:13:26 +0200 >> >> Although there was feedback for some of the patches in this series >> (https://sourceware.org/ml/gdb-patches/2014-04/msg00560.html), many are >> still uncommented. I'd really appreciate more feedback, particularly >> for the architecture-specific changes. > > Sorry, I've not been able to find time to process your reply on my > review of patch 12 yet and won't be able to for the next 1.5 weeks or > so. But perhaps you could move ahead with the diffs that don't depend > on that one which seem useful in their own right. > >> Patches 3, 4, 6, 7, 8 (AARCH64, ARM, MIPS, MN10300, and SCORE): No >> comments yet. >> >> > * Patch 9 ("SPARC: Rename register maps from "*regset" to "*regmap"): >> > Adjusts naming, to avoid name clashes in patch 10. >> >> Approved by Mark Kettenis: >> https://sourceware.org/ml/gdb-patches/2014-05/msg00038.html > > I don't really expect any response for MN10300 and SCORE. I'd give it > a few days to give people with an interest in ARM and MIPS the > opportunity to repsond, but feel free to move ahead with 3, 4, 6, 7 > and 8 after that. As suggested, I've waited a few additional days now for comments on patches 3, 4, 6, 7, and 8. Apart from those I believe everything else in this series was approved already. OK to push? ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PING] [PATCH 00/11] Regset rework preparations part 1 2014-05-19 7:32 ` [PING] [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez @ 2014-05-20 20:41 ` Maciej W. Rozycki 2014-05-21 10:39 ` Pedro Alves 1 sibling, 0 replies; 16+ messages in thread From: Maciej W. Rozycki @ 2014-05-20 20:41 UTC (permalink / raw) To: Andreas Arnez; +Cc: gdb-patches On Mon, 19 May 2014, Andreas Arnez wrote: > >> Patches 3, 4, 6, 7, 8 (AARCH64, ARM, MIPS, MN10300, and SCORE): No > >> comments yet. [...] > > As suggested, I've waited a few additional days now for comments on > patches 3, 4, 6, 7, and 8. Apart from those I believe everything else > in this series was approved already. > > OK to push? I've finally got to regression-testing your MIPS change and it passed. I previously wrote already that the MIPS part looks good based on visual inspection so given that and the test results it is fine to go in. Apologies to have made you wait. Maciej ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PING] [PATCH 00/11] Regset rework preparations part 1 2014-05-19 7:32 ` [PING] [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez 2014-05-20 20:41 ` Maciej W. Rozycki @ 2014-05-21 10:39 ` Pedro Alves 2014-05-22 7:28 ` Andreas Krebbel 1 sibling, 1 reply; 16+ messages in thread From: Pedro Alves @ 2014-05-21 10:39 UTC (permalink / raw) To: Andreas Arnez, gdb-patches On 05/19/2014 08:32 AM, Andreas Arnez wrote: > On Thu, May 15 2014, Andreas Arnez wrote: > >> This is the first half of the "regset rework preparations" series I've >> posted as RFC: >> https://sourceware.org/ml/gdb-patches/2014-04/msg00560.html > > On Wed, May 14 2014, Mark Kettenis wrote: > >>> From: Andreas Arnez <arnez@linux.vnet.ibm.com> >>> Date: Wed, 14 May 2014 14:13:26 +0200 >>> >>> Although there was feedback for some of the patches in this series >>> (https://sourceware.org/ml/gdb-patches/2014-04/msg00560.html), many are >>> still uncommented. I'd really appreciate more feedback, particularly >>> for the architecture-specific changes. >> >> Sorry, I've not been able to find time to process your reply on my >> review of patch 12 yet and won't be able to for the next 1.5 weeks or >> so. But perhaps you could move ahead with the diffs that don't depend >> on that one which seem useful in their own right. >> >>> Patches 3, 4, 6, 7, 8 (AARCH64, ARM, MIPS, MN10300, and SCORE): No >>> comments yet. >>> >>>> * Patch 9 ("SPARC: Rename register maps from "*regset" to "*regmap"): >>>> Adjusts naming, to avoid name clashes in patch 10. >>> >>> Approved by Mark Kettenis: >>> https://sourceware.org/ml/gdb-patches/2014-05/msg00038.html >> >> I don't really expect any response for MN10300 and SCORE. I'd give it >> a few days to give people with an interest in ARM and MIPS the >> opportunity to repsond, but feel free to move ahead with 3, 4, 6, 7 >> and 8 after that. > > As suggested, I've waited a few additional days now for comments on > patches 3, 4, 6, 7, and 8. Apart from those I believe everything else > in this series was approved already. > > OK to push? > I've read the series, and it all looked fine to me. Please push. -- Pedro Alves ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PING] [PATCH 00/11] Regset rework preparations part 1 2014-05-21 10:39 ` Pedro Alves @ 2014-05-22 7:28 ` Andreas Krebbel 0 siblings, 0 replies; 16+ messages in thread From: Andreas Krebbel @ 2014-05-22 7:28 UTC (permalink / raw) To: Pedro Alves, arnez; +Cc: gdb-patches On 05/21/2014 12:38 PM, Pedro Alves wrote: > On 05/19/2014 08:32 AM, Andreas Arnez wrote: >> On Thu, May 15 2014, Andreas Arnez wrote: >> >>> This is the first half of the "regset rework preparations" series I've >>> posted as RFC: >>> https://sourceware.org/ml/gdb-patches/2014-04/msg00560.html >> >> On Wed, May 14 2014, Mark Kettenis wrote: >> >>>> From: Andreas Arnez <arnez@linux.vnet.ibm.com> >>>> Date: Wed, 14 May 2014 14:13:26 +0200 >>>> >>>> Although there was feedback for some of the patches in this series >>>> (https://sourceware.org/ml/gdb-patches/2014-04/msg00560.html), many are >>>> still uncommented. I'd really appreciate more feedback, particularly >>>> for the architecture-specific changes. >>> >>> Sorry, I've not been able to find time to process your reply on my >>> review of patch 12 yet and won't be able to for the next 1.5 weeks or >>> so. But perhaps you could move ahead with the diffs that don't depend >>> on that one which seem useful in their own right. >>> >>>> Patches 3, 4, 6, 7, 8 (AARCH64, ARM, MIPS, MN10300, and SCORE): No >>>> comments yet. >>>> >>>>> * Patch 9 ("SPARC: Rename register maps from "*regset" to "*regmap"): >>>>> Adjusts naming, to avoid name clashes in patch 10. >>>> >>>> Approved by Mark Kettenis: >>>> https://sourceware.org/ml/gdb-patches/2014-05/msg00038.html >>> >>> I don't really expect any response for MN10300 and SCORE. I'd give it >>> a few days to give people with an interest in ARM and MIPS the >>> opportunity to repsond, but feel free to move ahead with 3, 4, 6, 7 >>> and 8 after that. >> >> As suggested, I've waited a few additional days now for comments on >> patches 3, 4, 6, 7, and 8. Apart from those I believe everything else >> in this series was approved already. >> >> OK to push? >> > > I've read the series, and it all looked fine to me. > > Please push. > Done. Thanks! -Andreas- ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2014-05-22 7:28 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-05-15 15:49 [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez 2014-05-15 15:49 ` [PATCH 02/11] Remove 'arch' field from regset structure Andreas Arnez 2014-05-15 15:49 ` [PATCH 09/11] SPARC: Rename register maps from "*regset" to "*regmap" Andreas Arnez 2014-05-15 15:49 ` [PATCH 03/11] AARCH64: Replace regset_alloc() invocations by static regset structures Andreas Arnez 2014-05-15 15:49 ` [PATCH 04/11] ARM: " Andreas Arnez 2014-05-15 15:49 ` [PATCH 08/11] SCORE: Replace regset_alloc() invocation by a static regset structure Andreas Arnez 2014-05-15 15:49 ` [PATCH 06/11] MIPS: Replace regset_alloc() invocations by static regset structures Andreas Arnez 2014-05-15 15:49 ` [PATCH 10/11] SPARC: " Andreas Arnez 2014-05-15 15:49 ` [PATCH 11/11] Drop regset_alloc() Andreas Arnez 2014-05-15 15:49 ` [PATCH 05/11] X86: Replace regset_alloc() invocations by static regset structures Andreas Arnez 2014-05-15 15:50 ` [PATCH 01/11] Constify " Andreas Arnez 2014-05-15 15:59 ` [PATCH 07/11] MN10300: Replace regset_alloc() invocations by static " Andreas Arnez 2014-05-19 7:32 ` [PING] [PATCH 00/11] Regset rework preparations part 1 Andreas Arnez 2014-05-20 20:41 ` Maciej W. Rozycki 2014-05-21 10:39 ` Pedro Alves 2014-05-22 7:28 ` Andreas Krebbel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).