* [PATCH 5/7] Avoid -Wnarrowing warnings in ppc64-tdep.c
2018-08-08 23:20 [PATCH 0/7] Remove -Wno-narrowing Tom Tromey
` (3 preceding siblings ...)
2018-08-08 23:20 ` [PATCH 1/7] Change completion_tracker to use char type Tom Tromey
@ 2018-08-08 23:20 ` Tom Tromey
2018-08-08 23:20 ` [PATCH 4/7] Fix two -Wnarrowing warnings in xtensa-tdep.h Tom Tromey
2018-08-08 23:20 ` [PATCH 6/7] Avoid -Wnarrowing warnings in gdbserver Tom Tromey
6 siblings, 0 replies; 18+ messages in thread
From: Tom Tromey @ 2018-08-08 23:20 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
This avoids -Wnarrowing warnings in ppc64-tdep.c, by adding a few
casts to unsigned.
gdb/ChangeLog
2018-08-08 Tom Tromey <tom@tromey.com>
* ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
unsigned.
(ppc64_standard_linkage1, ppc64_standard_linkage2)
(ppc64_standard_linkage3, ppc64_standard_linkage4)
(ppc64_standard_linkage5, ppc64_standard_linkage6)
(ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
unsigned.
---
gdb/ChangeLog | 10 +++++++
gdb/ppc64-tdep.c | 86 ++++++++++++++++++++++++++++----------------------------
2 files changed, 53 insertions(+), 43 deletions(-)
diff --git a/gdb/ppc64-tdep.c b/gdb/ppc64-tdep.c
index 5d8ccb48d4..4b8dd3fe3f 100644
--- a/gdb/ppc64-tdep.c
+++ b/gdb/ppc64-tdep.c
@@ -30,24 +30,24 @@
you can use -1 to make masks. */
#define insn_d(opcd, rts, ra, d) \
- ((((opcd) & 0x3f) << 26) \
- | (((rts) & 0x1f) << 21) \
- | (((ra) & 0x1f) << 16) \
- | ((d) & 0xffff))
+ ((((unsigned (opcd)) & 0x3f) << 26) \
+ | (((unsigned (rts)) & 0x1f) << 21) \
+ | (((unsigned (ra)) & 0x1f) << 16) \
+ | ((unsigned (d)) & 0xffff))
#define insn_ds(opcd, rts, ra, d, xo) \
- ((((opcd) & 0x3f) << 26) \
- | (((rts) & 0x1f) << 21) \
- | (((ra) & 0x1f) << 16) \
- | ((d) & 0xfffc) \
- | ((xo) & 0x3))
+ ((((unsigned (opcd)) & 0x3f) << 26) \
+ | (((unsigned (rts)) & 0x1f) << 21) \
+ | (((unsigned (ra)) & 0x1f) << 16) \
+ | ((unsigned (d)) & 0xfffc) \
+ | ((unsigned (xo)) & 0x3))
#define insn_xfx(opcd, rts, spr, xo) \
- ((((opcd) & 0x3f) << 26) \
- | (((rts) & 0x1f) << 21) \
- | (((spr) & 0x1f) << 16) \
- | (((spr) & 0x3e0) << 6) \
- | (((xo) & 0x3ff) << 1))
+ ((((unsigned (opcd)) & 0x3f) << 26) \
+ | (((unsigned (rts)) & 0x1f) << 21) \
+ | (((unsigned (spr)) & 0x1f) << 16) \
+ | (((unsigned (spr)) & 0x3e0) << 6) \
+ | (((unsigned (xo)) & 0x3ff) << 1))
/* PLT_OFF is the TOC-relative offset of a 64-bit PowerPC PLT entry.
Return the function's entry point. */
@@ -86,7 +86,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage1[] =
{ insn_d (-1, -1, -1, 0), insn_d (15, 12, 2, 0), 0 },
/* std r2, 40(r1) */
- { -1, insn_ds (62, 2, 1, 40, 0), 0 },
+ { (unsigned) -1, insn_ds (62, 2, 1, 40, 0), 0 },
/* ld r11, <any>(r12) */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 },
@@ -107,7 +107,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage1[] =
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 1 },
/* bctr */
- { -1, 0x4e800420, 0 },
+ { (unsigned) -1, 0x4e800420, 0 },
{ 0, 0, 0 }
};
@@ -122,13 +122,13 @@ static const struct ppc_insn_pattern ppc64_standard_linkage1[] =
static const struct ppc_insn_pattern ppc64_standard_linkage2[] =
{
/* std r2, 40(r1) <optional> */
- { -1, insn_ds (62, 2, 1, 40, 0), 1 },
+ { (unsigned) -1, insn_ds (62, 2, 1, 40, 0), 1 },
/* addis r12, r2, <any> */
{ insn_d (-1, -1, -1, 0), insn_d (15, 12, 2, 0), 0 },
/* std r2, 40(r1) <optional> */
- { -1, insn_ds (62, 2, 1, 40, 0), 1 },
+ { (unsigned) -1, insn_ds (62, 2, 1, 40, 0), 1 },
/* ld r11, <any>(r12) */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 },
@@ -140,10 +140,10 @@ static const struct ppc_insn_pattern ppc64_standard_linkage2[] =
{ insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467), 0 },
/* xor r11, r11, r11 <optional> */
- { -1, 0x7d6b5a78, 1 },
+ { (unsigned) -1, 0x7d6b5a78, 1 },
/* add r12, r12, r11 <optional> */
- { -1, 0x7d8c5a14, 1 },
+ { (unsigned) -1, 0x7d8c5a14, 1 },
/* ld r2, <any>(r12) */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 12, 0, 0), 0 },
@@ -152,10 +152,10 @@ static const struct ppc_insn_pattern ppc64_standard_linkage2[] =
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 1 },
/* bctr <optional> */
- { -1, 0x4e800420, 1 },
+ { (unsigned) -1, 0x4e800420, 1 },
/* cmpldi r2, 0 <optional> */
- { -1, 0x28220000, 1 },
+ { (unsigned) -1, 0x28220000, 1 },
{ 0, 0, 0 }
};
@@ -165,7 +165,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage2[] =
static const struct ppc_insn_pattern ppc64_standard_linkage3[] =
{
/* std r2, 40(r1) <optional> */
- { -1, insn_ds (62, 2, 1, 40, 0), 1 },
+ { (unsigned) -1, insn_ds (62, 2, 1, 40, 0), 1 },
/* ld r11, <any>(r2) */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 2, 0, 0), 0 },
@@ -177,10 +177,10 @@ static const struct ppc_insn_pattern ppc64_standard_linkage3[] =
{ insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467), 0 },
/* xor r11, r11, r11 <optional> */
- { -1, 0x7d6b5a78, 1 },
+ { (unsigned) -1, 0x7d6b5a78, 1 },
/* add r2, r2, r11 <optional> */
- { -1, 0x7c425a14, 1 },
+ { (unsigned) -1, 0x7c425a14, 1 },
/* ld r11, <any>(r2) <optional> */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 2, 0, 0), 1 },
@@ -189,10 +189,10 @@ static const struct ppc_insn_pattern ppc64_standard_linkage3[] =
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 2, 0, 0), 0 },
/* bctr <optional> */
- { -1, 0x4e800420, 1 },
+ { (unsigned) -1, 0x4e800420, 1 },
/* cmpldi r2, 0 <optional> */
- { -1, 0x28220000, 1 },
+ { (unsigned) -1, 0x28220000, 1 },
{ 0, 0, 0 }
};
@@ -204,7 +204,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage3[] =
static const struct ppc_insn_pattern ppc64_standard_linkage4[] =
{
/* std r2, 40(r1) <optional> */
- { -1, insn_ds (62, 2, 1, 40, 0), 1 },
+ { (unsigned) -1, insn_ds (62, 2, 1, 40, 0), 1 },
/* addis r11, r2, <any> */
{ insn_d (-1, -1, -1, 0), insn_d (15, 11, 2, 0), 0 },
@@ -219,10 +219,10 @@ static const struct ppc_insn_pattern ppc64_standard_linkage4[] =
{ insn_xfx (-1, -1, -1, -1), insn_xfx (31, 12, 9, 467), 0 },
/* xor r2, r12, r12 <optional> */
- { -1, 0x7d826278, 1 },
+ { (unsigned) -1, 0x7d826278, 1 },
/* add r11, r11, r2 <optional> */
- { -1, 0x7d6b1214, 1 },
+ { (unsigned) -1, 0x7d6b1214, 1 },
/* ld r2, <any>(r11) */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 11, 0, 0), 0 },
@@ -231,10 +231,10 @@ static const struct ppc_insn_pattern ppc64_standard_linkage4[] =
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 11, 0, 0), 1 },
/* bctr <optional> */
- { -1, 0x4e800420, 1 },
+ { (unsigned) -1, 0x4e800420, 1 },
/* cmpldi r2, 0 <optional> */
- { -1, 0x28220000, 1 },
+ { (unsigned) -1, 0x28220000, 1 },
{ 0, 0, 0 }
};
@@ -246,7 +246,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage4[] =
static const struct ppc_insn_pattern ppc64_standard_linkage5[] =
{
/* std r2, 40(r1) <optional> */
- { -1, insn_ds (62, 2, 1, 40, 0), 1 },
+ { (unsigned) -1, insn_ds (62, 2, 1, 40, 0), 1 },
/* ld r12, <any>(r2) */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 12, 2, 0, 0), 0 },
@@ -258,10 +258,10 @@ static const struct ppc_insn_pattern ppc64_standard_linkage5[] =
{ insn_xfx (-1, -1, -1, -1), insn_xfx (31, 12, 9, 467), 0 },
/* xor r11, r12, r12 <optional> */
- { -1, 0x7d8b6278, 1 },
+ { (unsigned) -1, 0x7d8b6278, 1 },
/* add r2, r2, r11 <optional> */
- { -1, 0x7c425a14, 1 },
+ { (unsigned) -1, 0x7c425a14, 1 },
/* ld r11, <any>(r2) <optional> */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 2, 0, 0), 1 },
@@ -270,10 +270,10 @@ static const struct ppc_insn_pattern ppc64_standard_linkage5[] =
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 2, 0, 0), 0 },
/* bctr <optional> */
- { -1, 0x4e800420, 1 },
+ { (unsigned) -1, 0x4e800420, 1 },
/* cmpldi r2, 0 <optional> */
- { -1, 0x28220000, 1 },
+ { (unsigned) -1, 0x28220000, 1 },
{ 0, 0, 0 }
};
@@ -283,7 +283,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage5[] =
static const struct ppc_insn_pattern ppc64_standard_linkage6[] =
{
/* std r2, 24(r1) <optional> */
- { -1, insn_ds (62, 2, 1, 24, 0), 1 },
+ { (unsigned) -1, insn_ds (62, 2, 1, 24, 0), 1 },
/* addis r11, r2, <any> */
{ insn_d (-1, -1, -1, 0), insn_d (15, 11, 2, 0), 0 },
@@ -295,7 +295,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage6[] =
{ insn_xfx (-1, -1, -1, -1), insn_xfx (31, 12, 9, 467), 0 },
/* bctr */
- { -1, 0x4e800420, 0 },
+ { (unsigned) -1, 0x4e800420, 0 },
{ 0, 0, 0 }
};
@@ -305,7 +305,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage6[] =
static const struct ppc_insn_pattern ppc64_standard_linkage7[] =
{
/* std r2, 24(r1) <optional> */
- { -1, insn_ds (62, 2, 1, 24, 0), 1 },
+ { (unsigned) -1, insn_ds (62, 2, 1, 24, 0), 1 },
/* ld r12, <any>(r2) */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 12, 2, 0, 0), 0 },
@@ -314,7 +314,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage7[] =
{ insn_xfx (-1, -1, -1, -1), insn_xfx (31, 12, 9, 467), 0 },
/* bctr */
- { -1, 0x4e800420, 0 },
+ { (unsigned) -1, 0x4e800420, 0 },
{ 0, 0, 0 }
};
@@ -325,7 +325,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage7[] =
static const struct ppc_insn_pattern ppc64_standard_linkage8[] =
{
/* std r2, 24(r1) <optional> */
- { -1, insn_ds (62, 2, 1, 24, 0), 1 },
+ { (unsigned) -1, insn_ds (62, 2, 1, 24, 0), 1 },
/* addis r12, r2, <any> */
{ insn_d (-1, -1, -1, 0), insn_d (15, 12, 2, 0), 0 },
@@ -337,7 +337,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage8[] =
{ insn_xfx (-1, -1, -1, -1), insn_xfx (31, 12, 9, 467), 0 },
/* bctr */
- { -1, 0x4e800420, 0 },
+ { (unsigned) -1, 0x4e800420, 0 },
{ 0, 0, 0 }
};
--
2.13.6
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 6/7] Avoid -Wnarrowing warnings in gdbserver
2018-08-08 23:20 [PATCH 0/7] Remove -Wno-narrowing Tom Tromey
` (5 preceding siblings ...)
2018-08-08 23:20 ` [PATCH 4/7] Fix two -Wnarrowing warnings in xtensa-tdep.h Tom Tromey
@ 2018-08-08 23:20 ` Tom Tromey
6 siblings, 0 replies; 18+ messages in thread
From: Tom Tromey @ 2018-08-08 23:20 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
This avoids -Wnarrowing warnings in gdbserver, by introducing some
casts to unsigned char.
gdb/gdbserver/ChangeLog
2018-08-08 Tom Tromey <tom@tromey.com>
* linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
(s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
(s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
(s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
(s390x_emit_stack_adjust): Add casts to unsigned char.
---
gdb/gdbserver/ChangeLog | 8 ++++++
gdb/gdbserver/linux-s390-low.c | 56 ++++++++++++++++++++++++++++--------------
2 files changed, 45 insertions(+), 19 deletions(-)
diff --git a/gdb/gdbserver/linux-s390-low.c b/gdb/gdbserver/linux-s390-low.c
index fff839bdd7..042a0f82d9 100644
--- a/gdb/gdbserver/linux-s390-low.c
+++ b/gdb/gdbserver/linux-s390-low.c
@@ -1605,8 +1605,8 @@ static void
s390_emit_ext (int arg)
{
unsigned char buf[] = {
- 0x8d, 0x20, 0x00, 64 - arg, /* sldl %r2, <64-arg> */
- 0x8e, 0x20, 0x00, 64 - arg, /* srda %r2, <64-arg> */
+ 0x8d, 0x20, 0x00, (unsigned char) (64 - arg), /* sldl %r2, <64-arg> */
+ 0x8e, 0x20, 0x00, (unsigned char) (64 - arg), /* srda %r2, <64-arg> */
};
add_insns (buf, sizeof buf);
}
@@ -1837,7 +1837,8 @@ s390_emit_litpool (int size)
0x07, 0x07,
};
unsigned char buf[] = {
- 0xa7, 0x15, 0x00, (size + 4) / 2, /* bras %r1, .Lend+size */
+ 0xa7, 0x15, 0x00,
+ (unsigned char) ((size + 4) / 2), /* bras %r1, .Lend+size */
/* .Lend: */
};
if (size == 4)
@@ -1861,8 +1862,11 @@ s390_emit_const (LONGEST num)
{
unsigned long long n = num;
unsigned char buf_s[] = {
- 0xa7, 0x38, num >> 8, num, /* lhi %r3, <num> */
- 0x17, 0x22, /* xr %r2, %r2 */
+ /* lhi %r3, <num> */
+ 0xa7, 0x38,
+ (unsigned char) (num >> 8), (unsigned char) num,
+ /* xr %r2, %r2 */
+ 0x17, 0x22,
};
static const unsigned char buf_l[] = {
0x98, 0x23, 0x10, 0x00, /* lm %r2, %r3, 0(%r1) */
@@ -1902,8 +1906,10 @@ static void
s390_emit_reg (int reg)
{
unsigned char bufpre[] = {
- 0x18, 0x29, /* lr %r2, %r9 */
- 0xa7, 0x38, reg >> 8, reg, /* lhi %r3, <reg> */
+ /* lr %r2, %r9 */
+ 0x18, 0x29,
+ /* lhi %r3, <reg> */
+ 0xa7, 0x38, (unsigned char) (reg >> 8), (unsigned char) reg,
};
add_insns (bufpre, sizeof bufpre);
s390_emit_call (get_raw_reg_func_addr ());
@@ -1939,8 +1945,8 @@ static void
s390_emit_zero_ext (int arg)
{
unsigned char buf[] = {
- 0x8d, 0x20, 0x00, 64 - arg, /* sldl %r2, <64-arg> */
- 0x8c, 0x20, 0x00, 64 - arg, /* srdl %r2, <64-arg> */
+ 0x8d, 0x20, 0x00, (unsigned char) (64 - arg), /* sldl %r2, <64-arg> */
+ 0x8c, 0x20, 0x00, (unsigned char) (64 - arg), /* srdl %r2, <64-arg> */
};
add_insns (buf, sizeof buf);
}
@@ -1965,7 +1971,9 @@ static void
s390_emit_stack_adjust (int n)
{
unsigned char buf[] = {
- 0xa7, 0xfa, n * 8 >> 8, n * 8, /* ahi %r15, 8*n */
+ /* ahi %r15, 8*n */
+ 0xa7, 0xfa,
+ (unsigned char ) (n * 8 >> 8), (unsigned char) (n * 8),
};
add_insns (buf, sizeof buf);
}
@@ -1976,7 +1984,8 @@ static void
s390_emit_set_r2 (int arg1)
{
unsigned char buf_s[] = {
- 0xa7, 0x28, arg1 >> 8, arg1, /* lhi %r2, <arg1> */
+ /* lhi %r2, <arg1> */
+ 0xa7, 0x28, (unsigned char) (arg1 >> 8), (unsigned char) arg1,
};
static const unsigned char buf_l[] = {
0x58, 0x20, 0x10, 0x00, /* l %r2, 0(%r1) */
@@ -2330,8 +2339,10 @@ static void
s390x_emit_ext (int arg)
{
unsigned char buf[] = {
- 0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0d, /* sllg %r2, %r2, <64-arg> */
- 0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0a, /* srag %r2, %r2, <64-arg> */
+ /* sllg %r2, %r2, <64-arg> */
+ 0xeb, 0x22, 0x00, (unsigned char) (64 - arg), 0x00, 0x0d,
+ /* srag %r2, %r2, <64-arg> */
+ 0xeb, 0x22, 0x00, (unsigned char) (64 - arg), 0x00, 0x0a,
};
add_insns (buf, sizeof buf);
}
@@ -2499,7 +2510,8 @@ s390x_emit_const (LONGEST num)
{
unsigned long long n = num;
unsigned char buf_s[] = {
- 0xa7, 0x29, num >> 8, num, /* lghi %r2, <num> */
+ /* lghi %r2, <num> */
+ 0xa7, 0x29, (unsigned char) (num >> 8), (unsigned char) num,
};
static const unsigned char buf_l[] = {
0xe3, 0x20, 0x10, 0x00, 0x00, 0x04, /* lg %r2, 0(%r1) */
@@ -2539,8 +2551,10 @@ static void
s390x_emit_reg (int reg)
{
unsigned char buf[] = {
- 0xb9, 0x04, 0x00, 0x29, /* lgr %r2, %r9 */
- 0xa7, 0x39, reg >> 8, reg, /* lghi %r3, <reg> */
+ /* lgr %r2, %r9 */
+ 0xb9, 0x04, 0x00, 0x29,
+ /* lghi %r3, <reg> */
+ 0xa7, 0x39, (unsigned char) (reg >> 8), (unsigned char) reg,
};
add_insns (buf, sizeof buf);
s390x_emit_call (get_raw_reg_func_addr ());
@@ -2576,8 +2590,10 @@ static void
s390x_emit_zero_ext (int arg)
{
unsigned char buf[] = {
- 0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0d, /* sllg %r2, %r2, <64-arg> */
- 0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0c, /* srlg %r2, %r2, <64-arg> */
+ /* sllg %r2, %r2, <64-arg> */
+ 0xeb, 0x22, 0x00, (unsigned char) (64 - arg), 0x00, 0x0d,
+ /* srlg %r2, %r2, <64-arg> */
+ 0xeb, 0x22, 0x00, (unsigned char) (64 - arg), 0x00, 0x0c,
};
add_insns (buf, sizeof buf);
}
@@ -2601,7 +2617,9 @@ static void
s390x_emit_stack_adjust (int n)
{
unsigned char buf[] = {
- 0xa7, 0xfb, n * 8 >> 8, n * 8, /* aghi %r15, 8*n */
+ /* aghi %r15, 8*n */
+ 0xa7, 0xfb,
+ (unsigned char) (n * 8 >> 8), (unsigned char) (n * 8),
};
add_insns (buf, sizeof buf);
}
--
2.13.6
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 0/7] Remove -Wno-narrowing
@ 2018-08-08 23:20 Tom Tromey
2018-08-08 23:20 ` [PATCH 7/7] Remove -Wno-narrowing from warnings.m4 Tom Tromey
` (6 more replies)
0 siblings, 7 replies; 18+ messages in thread
From: Tom Tromey @ 2018-08-08 23:20 UTC (permalink / raw)
To: gdb-patches
Early during the C++ switch, -Wno-narrowing was added to the build.
PR build/23087 requests that this flag be dropped.
This series implements this.
Tested by the buildbot. Let me know what you think.
Tom
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 7/7] Remove -Wno-narrowing from warnings.m4
2018-08-08 23:20 [PATCH 0/7] Remove -Wno-narrowing Tom Tromey
@ 2018-08-08 23:20 ` Tom Tromey
2018-08-09 18:10 ` Pedro Alves
2018-08-08 23:20 ` [PATCH 3/7] Avoid -Wnarrowing warnings in struct tramp_frame instances Tom Tromey
` (5 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Tom Tromey @ 2018-08-08 23:20 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
This removes -Wno-narrowing from warnings.m4.
This is PR build/23087.
gdb/ChangeLog
2018-08-08 Tom Tromey <tom@tromey.com>
PR build/23087:
* configure: Rebuild.
* warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
gdb/gdbserver/ChangeLog
2018-08-08 Tom Tromey <tom@tromey.com>
PR build/23087:
* configure: Rebuild.
---
gdb/ChangeLog | 6 ++++++
gdb/configure | 2 +-
gdb/gdbserver/ChangeLog | 5 +++++
gdb/gdbserver/configure | 2 +-
gdb/warning.m4 | 2 +-
5 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/gdb/configure b/gdb/configure
index 9cd0036848..d207c2baf1 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -15412,7 +15412,7 @@ build_warnings="-Wall -Wpointer-arith \
-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
-Wno-switch -Wno-char-subscripts \
-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
--Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
+-Wno-sign-compare -Wno-error=maybe-uninitialized \
-Wno-mismatched-tags \
-Wno-error=deprecated-register \
-Wsuggest-override \
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 043bc216e4..7454cd8ad3 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -7240,7 +7240,7 @@ build_warnings="-Wall -Wpointer-arith \
-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
-Wno-switch -Wno-char-subscripts \
-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
--Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
+-Wno-sign-compare -Wno-error=maybe-uninitialized \
-Wno-mismatched-tags \
-Wno-error=deprecated-register \
-Wsuggest-override \
diff --git a/gdb/warning.m4 b/gdb/warning.m4
index 00e7cd6050..dd338493f9 100644
--- a/gdb/warning.m4
+++ b/gdb/warning.m4
@@ -40,7 +40,7 @@ build_warnings="-Wall -Wpointer-arith \
-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
-Wno-switch -Wno-char-subscripts \
-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
--Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
+-Wno-sign-compare -Wno-error=maybe-uninitialized \
-Wno-mismatched-tags \
-Wno-error=deprecated-register \
-Wsuggest-override \
--
2.13.6
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/7] Use CORE_ADDR_MAX in various "breaks" arrays
2018-08-08 23:20 [PATCH 0/7] Remove -Wno-narrowing Tom Tromey
2018-08-08 23:20 ` [PATCH 7/7] Remove -Wno-narrowing from warnings.m4 Tom Tromey
2018-08-08 23:20 ` [PATCH 3/7] Avoid -Wnarrowing warnings in struct tramp_frame instances Tom Tromey
@ 2018-08-08 23:20 ` Tom Tromey
2018-08-09 18:08 ` Pedro Alves
2018-08-08 23:20 ` [PATCH 1/7] Change completion_tracker to use char type Tom Tromey
` (3 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Tom Tromey @ 2018-08-08 23:20 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
Code like this:
CORE_ADDR breaks[2] = {-1, -1};
... gives a warning with -Wnarrowing. This patch changes all
instances of this to use CORE_ADDR_MAX instead.
gdb/ChangeLog
2018-08-08 Tom Tromey <tom@tromey.com>
* rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
CORE_ADDR_MAX.
* mips-tdep.c (mips_deal_with_atomic_sequence)
(micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
* arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
(arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
* alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
CORE_ADDR_MAX.
* aarch64-tdep.c (aarch64_software_single_step): Use
CORE_ADDR_MAX.
---
gdb/ChangeLog | 13 +++++++++++++
gdb/aarch64-tdep.c | 2 +-
gdb/alpha-tdep.c | 2 +-
gdb/arch/arm-get-next-pcs.c | 4 ++--
gdb/mips-tdep.c | 4 ++--
gdb/rs6000-tdep.c | 2 +-
6 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index 5c6eb98545..62f680e15c 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -2472,7 +2472,7 @@ aarch64_software_single_step (struct regcache *regcache)
const int insn_size = 4;
const int atomic_sequence_length = 16; /* Instruction sequence length. */
CORE_ADDR pc = regcache_read_pc (regcache);
- CORE_ADDR breaks[2] = { -1, -1 };
+ CORE_ADDR breaks[2] = { CORE_ADDR_MAX, CORE_ADDR_MAX };
CORE_ADDR loc = pc;
CORE_ADDR closing_insn = 0;
uint32_t insn = read_memory_unsigned_integer (loc, insn_size,
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 53943e1d77..e649bd2102 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -767,7 +767,7 @@ static const int stq_c_opcode = 0x2f;
static std::vector<CORE_ADDR>
alpha_deal_with_atomic_sequence (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- CORE_ADDR breaks[2] = {-1, -1};
+ CORE_ADDR breaks[2] = {CORE_ADDR_MAX, CORE_ADDR_MAX};
CORE_ADDR loc = pc;
CORE_ADDR closing_insn; /* Instruction that closes the atomic sequence. */
unsigned int insn = alpha_read_insn (gdbarch, loc);
diff --git a/gdb/arch/arm-get-next-pcs.c b/gdb/arch/arm-get-next-pcs.c
index 1e63267038..3178bf311c 100644
--- a/gdb/arch/arm-get-next-pcs.c
+++ b/gdb/arch/arm-get-next-pcs.c
@@ -49,7 +49,7 @@ static std::vector<CORE_ADDR>
thumb_deal_with_atomic_sequence_raw (struct arm_get_next_pcs *self)
{
int byte_order_for_code = self->byte_order_for_code;
- CORE_ADDR breaks[2] = {-1, -1};
+ CORE_ADDR breaks[2] = {CORE_ADDR_MAX, CORE_ADDR_MAX};
CORE_ADDR pc = regcache_read_pc (self->regcache);
CORE_ADDR loc = pc;
unsigned short insn1, insn2;
@@ -187,7 +187,7 @@ static std::vector<CORE_ADDR>
arm_deal_with_atomic_sequence_raw (struct arm_get_next_pcs *self)
{
int byte_order_for_code = self->byte_order_for_code;
- CORE_ADDR breaks[2] = {-1, -1};
+ CORE_ADDR breaks[2] = {CORE_ADDR_MAX, CORE_ADDR_MAX};
CORE_ADDR pc = regcache_read_pc (self->regcache);
CORE_ADDR loc = pc;
unsigned int insn;
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 37a12a9f55..5e0a60625b 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -3910,7 +3910,7 @@ mips_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
static std::vector<CORE_ADDR>
mips_deal_with_atomic_sequence (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- CORE_ADDR breaks[2] = {-1, -1};
+ CORE_ADDR breaks[2] = {CORE_ADDR_MAX, CORE_ADDR_MAX};
CORE_ADDR loc = pc;
CORE_ADDR branch_bp; /* Breakpoint at branch instruction's destination. */
ULONGEST insn;
@@ -4013,7 +4013,7 @@ micromips_deal_with_atomic_sequence (struct gdbarch *gdbarch,
{
const int atomic_sequence_length = 16; /* Instruction sequence length. */
int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed). */
- CORE_ADDR breaks[2] = {-1, -1};
+ CORE_ADDR breaks[2] = {CORE_ADDR_MAX, CORE_ADDR_MAX};
CORE_ADDR branch_bp = 0; /* Breakpoint at branch instruction's
destination. */
CORE_ADDR loc = pc;
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index e78de49b2e..5a3e65f211 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -989,7 +989,7 @@ ppc_deal_with_atomic_sequence (struct regcache *regcache)
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR pc = regcache_read_pc (regcache);
- CORE_ADDR breaks[2] = {-1, -1};
+ CORE_ADDR breaks[2] = {CORE_ADDR_MAX, CORE_ADDR_MAX};
CORE_ADDR loc = pc;
CORE_ADDR closing_insn; /* Instruction that closes the atomic sequence. */
int insn = read_memory_integer (loc, PPC_INSN_SIZE, byte_order);
--
2.13.6
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/7] Change completion_tracker to use char type
2018-08-08 23:20 [PATCH 0/7] Remove -Wno-narrowing Tom Tromey
` (2 preceding siblings ...)
2018-08-08 23:20 ` [PATCH 2/7] Use CORE_ADDR_MAX in various "breaks" arrays Tom Tromey
@ 2018-08-08 23:20 ` Tom Tromey
2018-08-09 17:38 ` Pedro Alves
2018-08-08 23:20 ` [PATCH 5/7] Avoid -Wnarrowing warnings in ppc64-tdep.c Tom Tromey
` (2 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Tom Tromey @ 2018-08-08 23:20 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
This changes completion_tracker to use the char type for the quote
char. This avoids some narrowing warnings at the places where
quote_char() is called.
gdb/ChangeLog
2018-08-08 Tom Tromey <tom@tromey.com>
* completer.h (completion_tracker::set_quote_char): Change
parameter type to "char".
(completion_tracker::quote_char): Return "char". Now const.
(completion_tracker::m_quote_char): Now "char".
---
gdb/ChangeLog | 7 +++++++
gdb/completer.h | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/gdb/completer.h b/gdb/completer.h
index 2bdfa26f6c..9f10bf0ea8 100644
--- a/gdb/completer.h
+++ b/gdb/completer.h
@@ -329,13 +329,13 @@ public:
/* Set the quote char to be appended after a unique completion is
added to the input line. Set to '\0' to clear. See
m_quote_char's description. */
- void set_quote_char (int quote_char)
+ void set_quote_char (char quote_char)
{ m_quote_char = quote_char; }
/* The quote char to be appended after a unique completion is added
to the input line. Returns '\0' if no quote char has been set.
See m_quote_char's description. */
- int quote_char () { return m_quote_char; }
+ char quote_char () const { return m_quote_char; }
/* Tell the tracker that the current completer wants to provide a
custom word point instead of a list of a break chars, in the
@@ -450,7 +450,7 @@ private:
before tab: "b 'function("
after tab: "b 'function()' "
*/
- int m_quote_char = '\0';
+ char m_quote_char = '\0';
/* If true, the completer has its own idea of "word" point, and
doesn't want to rely on readline computing it based on brkchars.
--
2.13.6
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 3/7] Avoid -Wnarrowing warnings in struct tramp_frame instances
2018-08-08 23:20 [PATCH 0/7] Remove -Wno-narrowing Tom Tromey
2018-08-08 23:20 ` [PATCH 7/7] Remove -Wno-narrowing from warnings.m4 Tom Tromey
@ 2018-08-08 23:20 ` Tom Tromey
2018-08-09 18:08 ` Pedro Alves
2018-08-08 23:20 ` [PATCH 2/7] Use CORE_ADDR_MAX in various "breaks" arrays Tom Tromey
` (4 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Tom Tromey @ 2018-08-08 23:20 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
This avoids -Wnarrowing warnings in struct tramp_frame instances,
replacing uses of -1 with a new ULONGEST_MAX. It also redefined
TRAMP_SENTINEL_INSN to avoid the same warning.
gdb/ChangeLog
2018-08-08 Tom Tromey <tom@tromey.com>
* tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
* tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
ULONGEST_MAX.
* tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
ULONGEST_MAX.
* sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
ULONGEST_MAX.
* sparc-linux-tdep.c (sparc32_linux_sigframe)
(sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
* ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
ULONGEST_MAX.
* ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
(ppc64_linux_sigaction_tramp_frame)
(ppc32_linux_sighandler_tramp_frame)
(ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
* nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
(nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
* mn10300-linux-tdep.c (am33_linux_sigframe)
(am33_linux_rt_sigframe): Use ULONGEST_MAX.
* mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
* mips-linux-tdep.c (mips_linux_o32_sigframe)
(mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
(mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
(micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
(micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
* mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
(mips64_fbsd_sigframe): Use ULONGEST_MAX.
* microblaze-linux-tdep.c
(microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
* i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
(i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
(i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
* hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
* common/common-types.h (ULONGEST_MAX): New define.
* bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
* arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
* arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
(arm_linux_rt_sigreturn_tramp_frame)
(arm_eabi_linux_sigreturn_tramp_frame)
(arm_eabi_linux_rt_sigreturn_tramp_frame)
(thumb2_eabi_linux_sigreturn_tramp_frame)
(thumb2_eabi_linux_rt_sigreturn_tramp_frame)
(arm_linux_restart_syscall_tramp_frame)
(arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
* arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
* aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
ULONGEST_MAX.
* aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
---
gdb/ChangeLog | 51 +++++++++
gdb/aarch64-fbsd-tdep.c | 10 +-
gdb/aarch64-linux-tdep.c | 6 +-
gdb/arm-fbsd-tdep.c | 10 +-
gdb/arm-linux-tdep.c | 32 +++---
gdb/arm-obsd-tdep.c | 10 +-
gdb/bfin-linux-tdep.c | 2 +-
gdb/common/common-types.h | 3 +
gdb/hppa-nbsd-tdep.c | 36 +++----
gdb/i386-nbsd-tdep.c | 257 +++++++++++++++++++++++++++++++-------------
gdb/microblaze-linux-tdep.c | 4 +-
gdb/mips-fbsd-tdep.c | 30 +++---
gdb/mips-linux-tdep.c | 64 +++++------
gdb/mips64-obsd-tdep.c | 10 +-
gdb/mn10300-linux-tdep.c | 24 ++---
gdb/nios2-linux-tdep.c | 8 +-
gdb/ppc-linux-tdep.c | 20 ++--
gdb/ppc-nbsd-tdep.c | 32 +++---
gdb/sparc-linux-tdep.c | 12 +--
gdb/sparc64-linux-tdep.c | 6 +-
gdb/tic6x-linux-tdep.c | 2 +-
gdb/tilegx-linux-tdep.c | 6 +-
gdb/tramp-frame.h | 2 +-
23 files changed, 398 insertions(+), 239 deletions(-)
diff --git a/gdb/aarch64-fbsd-tdep.c b/gdb/aarch64-fbsd-tdep.c
index 21beb5b77c..fd86cbdf84 100644
--- a/gdb/aarch64-fbsd-tdep.c
+++ b/gdb/aarch64-fbsd-tdep.c
@@ -118,11 +118,11 @@ static const struct tramp_frame aarch64_fbsd_sigframe =
SIGTRAMP_FRAME,
4,
{
- {0x910003e0, -1}, /* mov x0, sp */
- {0x91014000, -1}, /* add x0, x0, #SF_UC */
- {0xd2803428, -1}, /* mov x8, #SYS_sigreturn */
- {0xd4000001, -1}, /* svc 0x0 */
- {TRAMP_SENTINEL_INSN, -1}
+ {0x910003e0, ULONGEST_MAX}, /* mov x0, sp */
+ {0x91014000, ULONGEST_MAX}, /* add x0, x0, #SF_UC */
+ {0xd2803428, ULONGEST_MAX}, /* mov x8, #SYS_sigreturn */
+ {0xd4000001, ULONGEST_MAX}, /* svc 0x0 */
+ {TRAMP_SENTINEL_INSN, ULONGEST_MAX}
},
aarch64_fbsd_sigframe_init
};
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index 93b6d416a3..d9adef65dc 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -176,12 +176,12 @@ static const struct tramp_frame aarch64_linux_rt_sigframe =
{
/* movz x8, 0x8b (S=1,o=10,h=0,i=0x8b,r=8)
Soo1 0010 1hhi iiii iiii iiii iiir rrrr */
- {0xd2801168, -1},
+ {0xd2801168, ULONGEST_MAX},
/* svc 0x0 (o=0, l=1)
1101 0100 oooi iiii iiii iiii iii0 00ll */
- {0xd4000001, -1},
- {TRAMP_SENTINEL_INSN, -1}
+ {0xd4000001, ULONGEST_MAX},
+ {TRAMP_SENTINEL_INSN, ULONGEST_MAX}
},
aarch64_linux_sigframe_init
};
diff --git a/gdb/arm-fbsd-tdep.c b/gdb/arm-fbsd-tdep.c
index 4ad3abdffa..b3b2cc8152 100644
--- a/gdb/arm-fbsd-tdep.c
+++ b/gdb/arm-fbsd-tdep.c
@@ -123,11 +123,11 @@ static const struct tramp_frame arm_fbsd_sigframe =
SIGTRAMP_FRAME,
4,
{
- {0xe1a0000d, -1}, /* mov r0, sp */
- {0xe2800040, -1}, /* add r0, r0, #SIGF_UC */
- {0xe59f700c, -1}, /* ldr r7, [pc, #12] */
- {0xef0001a1, -1}, /* swi SYS_sigreturn */
- {TRAMP_SENTINEL_INSN, -1}
+ {0xe1a0000d, ULONGEST_MAX}, /* mov r0, sp */
+ {0xe2800040, ULONGEST_MAX}, /* add r0, r0, #SIGF_UC */
+ {0xe59f700c, ULONGEST_MAX}, /* ldr r7, [pc, #12] */
+ {0xef0001a1, ULONGEST_MAX}, /* swi SYS_sigreturn */
+ {TRAMP_SENTINEL_INSN, ULONGEST_MAX}
},
arm_fbsd_sigframe_init
};
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 264e8ca42b..c28bfb073b 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -385,7 +385,7 @@ static struct tramp_frame arm_linux_sigreturn_tramp_frame = {
SIGTRAMP_FRAME,
4,
{
- { ARM_LINUX_SIGRETURN_INSTR, -1 },
+ { ARM_LINUX_SIGRETURN_INSTR, ULONGEST_MAX },
{ TRAMP_SENTINEL_INSN }
},
arm_linux_sigreturn_init
@@ -395,7 +395,7 @@ static struct tramp_frame arm_linux_rt_sigreturn_tramp_frame = {
SIGTRAMP_FRAME,
4,
{
- { ARM_LINUX_RT_SIGRETURN_INSTR, -1 },
+ { ARM_LINUX_RT_SIGRETURN_INSTR, ULONGEST_MAX },
{ TRAMP_SENTINEL_INSN }
},
arm_linux_rt_sigreturn_init
@@ -405,8 +405,8 @@ static struct tramp_frame arm_eabi_linux_sigreturn_tramp_frame = {
SIGTRAMP_FRAME,
4,
{
- { ARM_SET_R7_SIGRETURN, -1 },
- { ARM_EABI_SYSCALL, -1 },
+ { ARM_SET_R7_SIGRETURN, ULONGEST_MAX },
+ { ARM_EABI_SYSCALL, ULONGEST_MAX },
{ TRAMP_SENTINEL_INSN }
},
arm_linux_sigreturn_init
@@ -416,8 +416,8 @@ static struct tramp_frame arm_eabi_linux_rt_sigreturn_tramp_frame = {
SIGTRAMP_FRAME,
4,
{
- { ARM_SET_R7_RT_SIGRETURN, -1 },
- { ARM_EABI_SYSCALL, -1 },
+ { ARM_SET_R7_RT_SIGRETURN, ULONGEST_MAX },
+ { ARM_EABI_SYSCALL, ULONGEST_MAX },
{ TRAMP_SENTINEL_INSN }
},
arm_linux_rt_sigreturn_init
@@ -427,9 +427,9 @@ static struct tramp_frame thumb2_eabi_linux_sigreturn_tramp_frame = {
SIGTRAMP_FRAME,
2,
{
- { THUMB2_SET_R7_SIGRETURN1, -1 },
- { THUMB2_SET_R7_SIGRETURN2, -1 },
- { THUMB2_EABI_SYSCALL, -1 },
+ { THUMB2_SET_R7_SIGRETURN1, ULONGEST_MAX },
+ { THUMB2_SET_R7_SIGRETURN2, ULONGEST_MAX },
+ { THUMB2_EABI_SYSCALL, ULONGEST_MAX },
{ TRAMP_SENTINEL_INSN }
},
arm_linux_sigreturn_init
@@ -439,9 +439,9 @@ static struct tramp_frame thumb2_eabi_linux_rt_sigreturn_tramp_frame = {
SIGTRAMP_FRAME,
2,
{
- { THUMB2_SET_R7_RT_SIGRETURN1, -1 },
- { THUMB2_SET_R7_RT_SIGRETURN2, -1 },
- { THUMB2_EABI_SYSCALL, -1 },
+ { THUMB2_SET_R7_RT_SIGRETURN1, ULONGEST_MAX },
+ { THUMB2_SET_R7_RT_SIGRETURN2, ULONGEST_MAX },
+ { THUMB2_EABI_SYSCALL, ULONGEST_MAX },
{ TRAMP_SENTINEL_INSN }
},
arm_linux_rt_sigreturn_init
@@ -451,8 +451,8 @@ static struct tramp_frame arm_linux_restart_syscall_tramp_frame = {
NORMAL_FRAME,
4,
{
- { ARM_OABI_SYSCALL_RESTART_SYSCALL, -1 },
- { ARM_LDR_PC_SP_12, -1 },
+ { ARM_OABI_SYSCALL_RESTART_SYSCALL, ULONGEST_MAX },
+ { ARM_LDR_PC_SP_12, ULONGEST_MAX },
{ TRAMP_SENTINEL_INSN }
},
arm_linux_restart_syscall_init
@@ -462,8 +462,8 @@ static struct tramp_frame arm_kernel_linux_restart_syscall_tramp_frame = {
NORMAL_FRAME,
4,
{
- { ARM_OABI_SYSCALL_RESTART_SYSCALL, -1 },
- { ARM_LDR_PC_SP_4, -1 },
+ { ARM_OABI_SYSCALL_RESTART_SYSCALL, ULONGEST_MAX },
+ { ARM_LDR_PC_SP_4, ULONGEST_MAX },
{ TRAMP_SENTINEL_INSN }
},
arm_linux_restart_syscall_init
diff --git a/gdb/arm-obsd-tdep.c b/gdb/arm-obsd-tdep.c
index 3db04fcb1a..0a9b47d35b 100644
--- a/gdb/arm-obsd-tdep.c
+++ b/gdb/arm-obsd-tdep.c
@@ -58,11 +58,11 @@ static const struct tramp_frame armobsd_sigframe =
SIGTRAMP_FRAME,
4,
{
- { 0xe28d0010, -1 }, /* add r0, sp, #16 */
- { 0xef000067, -1 }, /* swi SYS_sigreturn */
- { 0xef000001, -1 }, /* swi SYS_exit */
- { 0xeafffffc, -1 }, /* b . - 8 */
- { TRAMP_SENTINEL_INSN, -1 }
+ { 0xe28d0010, ULONGEST_MAX }, /* add r0, sp, #16 */
+ { 0xef000067, ULONGEST_MAX }, /* swi SYS_sigreturn */
+ { 0xef000001, ULONGEST_MAX }, /* swi SYS_exit */
+ { 0xeafffffc, ULONGEST_MAX }, /* b . - 8 */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
armobsd_sigframe_init
};
diff --git a/gdb/bfin-linux-tdep.c b/gdb/bfin-linux-tdep.c
index e3bbb0f9f1..8b60f9b9dc 100644
--- a/gdb/bfin-linux-tdep.c
+++ b/gdb/bfin-linux-tdep.c
@@ -121,7 +121,7 @@ static const struct tramp_frame bfin_linux_sigframe =
{
{ 0x00ADE128, 0xffffffff }, /* P0 = __NR_rt_sigreturn; */
{ 0x00A0, 0xffff }, /* EXCPT 0; */
- { TRAMP_SENTINEL_INSN, -1 },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX },
},
bfin_linux_sigframe_init,
};
diff --git a/gdb/common/common-types.h b/gdb/common/common-types.h
index 9a32813dcb..80995377d2 100644
--- a/gdb/common/common-types.h
+++ b/gdb/common/common-types.h
@@ -58,6 +58,9 @@ typedef unsigned long long ULONGEST;
/* * The largest CORE_ADDR value. */
#define CORE_ADDR_MAX (~ (CORE_ADDR) 0)
+/* * The largest ULONGEST value. */
+#define ULONGEST_MAX (~ (ULONGEST) 0)
+
enum tribool { TRIBOOL_UNKNOWN = -1, TRIBOOL_FALSE = 0, TRIBOOL_TRUE = 1 };
#endif /* COMMON_TYPES_H */
diff --git a/gdb/hppa-nbsd-tdep.c b/gdb/hppa-nbsd-tdep.c
index f9932b5b80..a58f25c164 100644
--- a/gdb/hppa-nbsd-tdep.c
+++ b/gdb/hppa-nbsd-tdep.c
@@ -71,25 +71,25 @@ static const struct tramp_frame hppanbsd_sigtramp_si4 =
SIGTRAMP_FRAME,
4,
{
- { 0xc7d7c012, -1 }, /* bb,>=,n %arg3, 30, 1f */
- { 0xd6e01c1e, -1 }, /* depwi 0,31,2,%arg3 */
- { 0x0ee81093, -1 }, /* ldw 4(%arg3), %r19 */
- { 0x0ee01097, -1 }, /* ldw 0(%arg3), %arg3 */
+ { 0xc7d7c012, ULONGEST_MAX }, /* bb,>=,n %arg3, 30, 1f */
+ { 0xd6e01c1e, ULONGEST_MAX }, /* depwi 0,31,2,%arg3 */
+ { 0x0ee81093, ULONGEST_MAX }, /* ldw 4(%arg3), %r19 */
+ { 0x0ee01097, ULONGEST_MAX }, /* ldw 0(%arg3), %arg3 */
/* 1: */
- { 0xe8404000, -1 }, /* blr %r0, %rp */
- { 0xeae0c002, -1 }, /* bv,n %r0(%arg3) */
- { 0x08000240, -1 }, /* nop */
-
- { 0x0803025a, -1 }, /* copy %r3, %arg0 */
- { 0x20200801, -1 }, /* ldil -40000000, %r1 */
- { 0xe420e008, -1 }, /* be,l 4(%sr7, %r1), %sr0, %r31 */
- { 0x34160268, -1 }, /* ldi 134, %t1 ; SYS_setcontext */
-
- { 0x081c025a, -1 }, /* copy ret0, %arg0 */
- { 0x20200801, -1 }, /* ldil -40000000, %r1 */
- { 0xe420e008, -1 }, /* be,l 4(%sr7, %r1), %sr0, %r31 */
- { 0x34160002, -1 }, /* ldi 1, %t1 ; SYS_exit */
- { TRAMP_SENTINEL_INSN, -1 }
+ { 0xe8404000, ULONGEST_MAX }, /* blr %r0, %rp */
+ { 0xeae0c002, ULONGEST_MAX }, /* bv,n %r0(%arg3) */
+ { 0x08000240, ULONGEST_MAX }, /* nop */
+
+ { 0x0803025a, ULONGEST_MAX }, /* copy %r3, %arg0 */
+ { 0x20200801, ULONGEST_MAX }, /* ldil -40000000, %r1 */
+ { 0xe420e008, ULONGEST_MAX }, /* be,l 4(%sr7, %r1), %sr0, %r31 */
+ { 0x34160268, ULONGEST_MAX }, /* ldi 134, %t1 ; SYS_setcontext */
+
+ { 0x081c025a, ULONGEST_MAX }, /* copy ret0, %arg0 */
+ { 0x20200801, ULONGEST_MAX }, /* ldil -40000000, %r1 */
+ { 0xe420e008, ULONGEST_MAX }, /* be,l 4(%sr7, %r1), %sr0, %r31 */
+ { 0x34160002, ULONGEST_MAX }, /* ldi 1, %t1 ; SYS_exit */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
hppanbsd_sigtramp_cache_init
};
diff --git a/gdb/i386-nbsd-tdep.c b/gdb/i386-nbsd-tdep.c
index 718a743b2f..044760d796 100644
--- a/gdb/i386-nbsd-tdep.c
+++ b/gdb/i386-nbsd-tdep.c
@@ -106,19 +106,41 @@ static const struct tramp_frame i386nbsd_sigtramp_sc16 =
SIGTRAMP_FRAME,
1,
{
- { 0x8d, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x10, -1 },
- /* leal 0x10(%esp), %eax */
- { 0x50, -1 }, /* pushl %eax */
- { 0x50, -1 }, /* pushl %eax */
- { 0xb8, -1 }, { 0x27, -1 }, {0x01, -1 }, {0x00, -1 }, {0x00, -1 },
- /* movl $0x127, %eax # __sigreturn14 */
- { 0xcd, -1 }, { 0x80, -1},
- /* int $0x80 */
- { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
- /* movl $0x1, %eax # exit */
- { 0xcd, -1 }, { 0x80, -1},
- /* int $0x80 */
- { TRAMP_SENTINEL_INSN, -1 }
+ /* leal 0x10(%esp), %eax */
+ { 0x8d, ULONGEST_MAX },
+ { 0x44, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x10, ULONGEST_MAX },
+
+ /* pushl %eax */
+ { 0x50, ULONGEST_MAX },
+
+ /* pushl %eax */
+ { 0x50, ULONGEST_MAX },
+
+ /* movl $0x127, %eax # __sigreturn14 */
+ { 0xb8, ULONGEST_MAX },
+ { 0x27, ULONGEST_MAX },
+ {0x01, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+
+ /* int $0x80 */
+ { 0xcd, ULONGEST_MAX },
+ { 0x80, ULONGEST_MAX},
+
+ /* movl $0x1, %eax # exit */
+ { 0xb8, ULONGEST_MAX },
+ { 0x01, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+
+ /* int $0x80 */
+ { 0xcd, ULONGEST_MAX },
+ { 0x80, ULONGEST_MAX},
+
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
i386nbsd_sigtramp_cache_init
};
@@ -128,21 +150,40 @@ static const struct tramp_frame i386nbsd_sigtramp_sc2 =
SIGTRAMP_FRAME,
1,
{
- { 0x8d, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x0c, -1 },
- /* leal 0x0c(%esp), %eax */
- { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
- /* movl %eax, 0x4(%esp) */
- { 0xb8, -1 }, { 0x27, -1 }, {0x01, -1 }, {0x00, -1 }, {0x00, -1 },
- /* movl $0x127, %eax # __sigreturn14 */
- { 0xcd, -1 }, { 0x80, -1},
- /* int $0x80 */
- { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
- /* movl %eax, 0x4(%esp) */
- { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
- /* movl $0x1, %eax */
- { 0xcd, -1 }, { 0x80, -1},
- /* int $0x80 */
- { TRAMP_SENTINEL_INSN, -1 }
+ /* leal 0x0c(%esp), %eax */
+ { 0x8d, ULONGEST_MAX },
+ { 0x44, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x0c, ULONGEST_MAX },
+ /* movl %eax, 0x4(%esp) */
+ { 0x89, ULONGEST_MAX },
+ { 0x44, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x04, ULONGEST_MAX },
+ /* movl $0x127, %eax # __sigreturn14 */
+ { 0xb8, ULONGEST_MAX },
+ { 0x27, ULONGEST_MAX },
+ {0x01, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ /* int $0x80 */
+ { 0xcd, ULONGEST_MAX },
+ { 0x80, ULONGEST_MAX},
+ /* movl %eax, 0x4(%esp) */
+ { 0x89, ULONGEST_MAX },
+ { 0x44, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x04, ULONGEST_MAX },
+ /* movl $0x1, %eax */
+ { 0xb8, ULONGEST_MAX },
+ { 0x01, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ /* int $0x80 */
+ { 0xcd, ULONGEST_MAX },
+ { 0x80, ULONGEST_MAX},
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
i386nbsd_sigtramp_cache_init
};
@@ -152,21 +193,40 @@ static const struct tramp_frame i386nbsd_sigtramp_si2 =
SIGTRAMP_FRAME,
1,
{
- { 0x8b, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x08, -1 },
- /* movl 8(%esp),%eax */
- { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
- /* movl %eax, 0x4(%esp) */
- { 0xb8, -1 }, { 0x34, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 },
- /* movl $0x134, %eax # setcontext */
- { 0xcd, -1 }, { 0x80, -1 },
- /* int $0x80 */
- { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
- /* movl %eax, 0x4(%esp) */
- { 0xb8, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 }, { 0x00, -1 },
- /* movl $0x1, %eax */
- { 0xcd, -1 }, { 0x80, -1 },
- /* int $0x80 */
- { TRAMP_SENTINEL_INSN, -1 }
+ /* movl 8(%esp),%eax */
+ { 0x8b, ULONGEST_MAX },
+ { 0x44, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x08, ULONGEST_MAX },
+ /* movl %eax, 0x4(%esp) */
+ { 0x89, ULONGEST_MAX },
+ { 0x44, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x04, ULONGEST_MAX },
+ /* movl $0x134, %eax # setcontext */
+ { 0xb8, ULONGEST_MAX },
+ { 0x34, ULONGEST_MAX },
+ { 0x01, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ /* int $0x80 */
+ { 0xcd, ULONGEST_MAX },
+ { 0x80, ULONGEST_MAX },
+ /* movl %eax, 0x4(%esp) */
+ { 0x89, ULONGEST_MAX },
+ { 0x44, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x04, ULONGEST_MAX },
+ /* movl $0x1, %eax */
+ { 0xb8, ULONGEST_MAX },
+ { 0x01, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ /* int $0x80 */
+ { 0xcd, ULONGEST_MAX },
+ { 0x80, ULONGEST_MAX },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
i386nbsd_sigtramp_cache_init
};
@@ -176,22 +236,43 @@ static const struct tramp_frame i386nbsd_sigtramp_si31 =
SIGTRAMP_FRAME,
1,
{
- { 0x8d, -1 }, { 0x84, -1 }, { 0x24, -1 },
- { 0x8c, -1 }, { 0x00, -1 }, { 0x00, -1 }, { 0x00, -1 },
- /* leal 0x8c(%esp), %eax */
- { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
- /* movl %eax, 0x4(%esp) */
- { 0xb8, -1 }, { 0x34, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 },
- /* movl $0x134, %eax # setcontext */
- { 0xcd, -1 }, { 0x80, -1},
- /* int $0x80 */
- { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
- /* movl %eax, 0x4(%esp) */
- { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
- /* movl $0x1, %eax */
- { 0xcd, -1 }, { 0x80, -1},
- /* int $0x80 */
- { TRAMP_SENTINEL_INSN, -1 }
+ /* leal 0x8c(%esp), %eax */
+ { 0x8d, ULONGEST_MAX },
+ { 0x84, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x8c, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ /* movl %eax, 0x4(%esp) */
+ { 0x89, ULONGEST_MAX },
+ { 0x44, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x04, ULONGEST_MAX },
+ /* movl $0x134, %eax # setcontext */
+ { 0xb8, ULONGEST_MAX },
+ { 0x34, ULONGEST_MAX },
+ { 0x01, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ /* int $0x80 */
+ { 0xcd, ULONGEST_MAX },
+ { 0x80, ULONGEST_MAX},
+ /* movl %eax, 0x4(%esp) */
+ { 0x89, ULONGEST_MAX },
+ { 0x44, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x04, ULONGEST_MAX },
+ /* movl $0x1, %eax */
+ { 0xb8, ULONGEST_MAX },
+ { 0x01, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ /* int $0x80 */
+ { 0xcd, ULONGEST_MAX },
+ { 0x80, ULONGEST_MAX},
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
i386nbsd_sigtramp_cache_init
};
@@ -201,23 +282,47 @@ static const struct tramp_frame i386nbsd_sigtramp_si4 =
SIGTRAMP_FRAME,
1,
{
- { 0x8d, -1 }, { 0x84, -1 }, { 0x24, -1 },
- { 0x8c, -1 }, { 0x00, -1 }, { 0x00, -1 }, { 0x00, -1 },
- /* leal 0x8c(%esp), %eax */
- { 0x89, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
- /* movl %eax, 0x4(%esp) */
- { 0xb8, -1 }, { 0x34, -1 }, { 0x01, -1 }, { 0x00, -1 }, { 0x00, -1 },
- /* movl $0x134, %eax # setcontext */
- { 0xcd, -1 }, { 0x80, -1},
- /* int $0x80 */
- { 0xc7, -1 }, { 0x44, -1 }, { 0x24, -1 }, { 0x04, -1 },
- { 0xff, -1 }, { 0xff, -1 }, { 0xff, -1 }, { 0xff, -1 },
- /* movl $0xffffffff,0x4(%esp) */
- { 0xb8, -1 }, { 0x01, -1 }, {0x00, -1 }, {0x00, -1 }, {0x00, -1 },
- /* movl $0x1, %eax */
- { 0xcd, -1 }, { 0x80, -1},
- /* int $0x80 */
- { TRAMP_SENTINEL_INSN, -1 }
+ /* leal 0x8c(%esp), %eax */
+ { 0x8d, ULONGEST_MAX },
+ { 0x84, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x8c, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ /* movl %eax, 0x4(%esp) */
+ { 0x89, ULONGEST_MAX },
+ { 0x44, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x04, ULONGEST_MAX },
+ /* movl $0x134, %eax # setcontext */
+ { 0xb8, ULONGEST_MAX },
+ { 0x34, ULONGEST_MAX },
+ { 0x01, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
+ /* int $0x80 */
+ { 0xcd, ULONGEST_MAX },
+ { 0x80, ULONGEST_MAX},
+ /* movl $0xffffffff,0x4(%esp) */
+ { 0xc7, ULONGEST_MAX },
+ { 0x44, ULONGEST_MAX },
+ { 0x24, ULONGEST_MAX },
+ { 0x04, ULONGEST_MAX },
+ { 0xff, ULONGEST_MAX },
+ { 0xff, ULONGEST_MAX },
+ { 0xff, ULONGEST_MAX },
+ { 0xff, ULONGEST_MAX },
+ /* movl $0x1, %eax */
+ { 0xb8, ULONGEST_MAX },
+ { 0x01, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ {0x00, ULONGEST_MAX },
+ /* int $0x80 */
+ { 0xcd, ULONGEST_MAX },
+ { 0x80, ULONGEST_MAX},
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
i386nbsd_sigtramp_cache_init
};
diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c
index 8bc153aec4..7e867ba0c8 100644
--- a/gdb/microblaze-linux-tdep.c
+++ b/gdb/microblaze-linux-tdep.c
@@ -105,8 +105,8 @@ static struct tramp_frame microblaze_linux_sighandler_tramp_frame =
SIGTRAMP_FRAME,
4,
{
- { 0x31800077, -1 }, /* addik R12,R0,119. */
- { 0xb9cc0008, -1 }, /* brki R14,8. */
+ { 0x31800077, ULONGEST_MAX }, /* addik R12,R0,119. */
+ { 0xb9cc0008, ULONGEST_MAX }, /* brki R14,8. */
{ TRAMP_SENTINEL_INSN },
},
microblaze_linux_sighandler_cache_init
diff --git a/gdb/mips-fbsd-tdep.c b/gdb/mips-fbsd-tdep.c
index c3075b23fc..a8fb39f9c1 100644
--- a/gdb/mips-fbsd-tdep.c
+++ b/gdb/mips-fbsd-tdep.c
@@ -342,11 +342,11 @@ static const struct tramp_frame mips_fbsd_sigframe =
SIGTRAMP_FRAME,
MIPS_INSN32_SIZE,
{
- { MIPS_INST_ADDIU_A0_SP_O32, -1 }, /* addiu a0, sp, SIGF_UC */
- { MIPS_INST_LI_V0_SIGRETURN, -1 }, /* li v0, SYS_sigreturn */
- { MIPS_INST_SYSCALL, -1 }, /* syscall */
- { MIPS_INST_BREAK, -1 }, /* break */
- { TRAMP_SENTINEL_INSN, -1 }
+ { MIPS_INST_ADDIU_A0_SP_O32, ULONGEST_MAX }, /* addiu a0, sp, SIGF_UC */
+ { MIPS_INST_LI_V0_SIGRETURN, ULONGEST_MAX }, /* li v0, SYS_sigreturn */
+ { MIPS_INST_SYSCALL, ULONGEST_MAX }, /* syscall */
+ { MIPS_INST_BREAK, ULONGEST_MAX }, /* break */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips_fbsd_sigframe_init
};
@@ -434,11 +434,11 @@ static const struct tramp_frame mipsn32_fbsd_sigframe =
SIGTRAMP_FRAME,
MIPS_INSN32_SIZE,
{
- { MIPS_INST_ADDIU_A0_SP_N32, -1 }, /* addiu a0, sp, SIGF_UC */
- { MIPS_INST_LI_V0_SIGRETURN, -1 }, /* li v0, SYS_sigreturn */
- { MIPS_INST_SYSCALL, -1 }, /* syscall */
- { MIPS_INST_BREAK, -1 }, /* break */
- { TRAMP_SENTINEL_INSN, -1 }
+ { MIPS_INST_ADDIU_A0_SP_N32, ULONGEST_MAX }, /* addiu a0, sp, SIGF_UC */
+ { MIPS_INST_LI_V0_SIGRETURN, ULONGEST_MAX }, /* li v0, SYS_sigreturn */
+ { MIPS_INST_SYSCALL, ULONGEST_MAX }, /* syscall */
+ { MIPS_INST_BREAK, ULONGEST_MAX }, /* break */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips64_fbsd_sigframe_init
};
@@ -451,11 +451,11 @@ static const struct tramp_frame mips64_fbsd_sigframe =
SIGTRAMP_FRAME,
MIPS_INSN32_SIZE,
{
- { MIPS_INST_DADDIU_A0_SP_N64, -1 }, /* daddiu a0, sp, SIGF_UC */
- { MIPS_INST_LI_V0_SIGRETURN, -1 }, /* li v0, SYS_sigreturn */
- { MIPS_INST_SYSCALL, -1 }, /* syscall */
- { MIPS_INST_BREAK, -1 }, /* break */
- { TRAMP_SENTINEL_INSN, -1 }
+ { MIPS_INST_DADDIU_A0_SP_N64, ULONGEST_MAX }, /* daddiu a0, sp, SIGF_UC */
+ { MIPS_INST_LI_V0_SIGRETURN, ULONGEST_MAX }, /* li v0, SYS_sigreturn */
+ { MIPS_INST_SYSCALL, ULONGEST_MAX }, /* syscall */
+ { MIPS_INST_BREAK, ULONGEST_MAX }, /* break */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips64_fbsd_sigframe_init
};
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 71183d7325..f176fb5739 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -753,9 +753,9 @@ static const struct tramp_frame mips_linux_o32_sigframe = {
SIGTRAMP_FRAME,
4,
{
- { MIPS_INST_LI_V0_SIGRETURN, -1 },
- { MIPS_INST_SYSCALL, -1 },
- { TRAMP_SENTINEL_INSN, -1 }
+ { MIPS_INST_LI_V0_SIGRETURN, ULONGEST_MAX },
+ { MIPS_INST_SYSCALL, ULONGEST_MAX },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips_linux_o32_sigframe_init,
mips_linux_sigframe_validate
@@ -765,9 +765,9 @@ static const struct tramp_frame mips_linux_o32_rt_sigframe = {
SIGTRAMP_FRAME,
4,
{
- { MIPS_INST_LI_V0_RT_SIGRETURN, -1 },
- { MIPS_INST_SYSCALL, -1 },
- { TRAMP_SENTINEL_INSN, -1 } },
+ { MIPS_INST_LI_V0_RT_SIGRETURN, ULONGEST_MAX },
+ { MIPS_INST_SYSCALL, ULONGEST_MAX },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX } },
mips_linux_o32_sigframe_init,
mips_linux_sigframe_validate
};
@@ -776,9 +776,9 @@ static const struct tramp_frame mips_linux_n32_rt_sigframe = {
SIGTRAMP_FRAME,
4,
{
- { MIPS_INST_LI_V0_N32_RT_SIGRETURN, -1 },
- { MIPS_INST_SYSCALL, -1 },
- { TRAMP_SENTINEL_INSN, -1 }
+ { MIPS_INST_LI_V0_N32_RT_SIGRETURN, ULONGEST_MAX },
+ { MIPS_INST_SYSCALL, ULONGEST_MAX },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips_linux_n32n64_sigframe_init,
mips_linux_sigframe_validate
@@ -788,9 +788,9 @@ static const struct tramp_frame mips_linux_n64_rt_sigframe = {
SIGTRAMP_FRAME,
4,
{
- { MIPS_INST_LI_V0_N64_RT_SIGRETURN, -1 },
- { MIPS_INST_SYSCALL, -1 },
- { TRAMP_SENTINEL_INSN, -1 }
+ { MIPS_INST_LI_V0_N64_RT_SIGRETURN, ULONGEST_MAX },
+ { MIPS_INST_SYSCALL, ULONGEST_MAX },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips_linux_n32n64_sigframe_init,
mips_linux_sigframe_validate
@@ -800,11 +800,11 @@ static const struct tramp_frame micromips_linux_o32_sigframe = {
SIGTRAMP_FRAME,
2,
{
- { MICROMIPS_INST_LI_V0, -1 },
- { MIPS_NR_sigreturn, -1 },
- { MICROMIPS_INST_POOL32A, -1 },
- { MICROMIPS_INST_SYSCALL, -1 },
- { TRAMP_SENTINEL_INSN, -1 }
+ { MICROMIPS_INST_LI_V0, ULONGEST_MAX },
+ { MIPS_NR_sigreturn, ULONGEST_MAX },
+ { MICROMIPS_INST_POOL32A, ULONGEST_MAX },
+ { MICROMIPS_INST_SYSCALL, ULONGEST_MAX },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips_linux_o32_sigframe_init,
micromips_linux_sigframe_validate
@@ -814,11 +814,11 @@ static const struct tramp_frame micromips_linux_o32_rt_sigframe = {
SIGTRAMP_FRAME,
2,
{
- { MICROMIPS_INST_LI_V0, -1 },
- { MIPS_NR_rt_sigreturn, -1 },
- { MICROMIPS_INST_POOL32A, -1 },
- { MICROMIPS_INST_SYSCALL, -1 },
- { TRAMP_SENTINEL_INSN, -1 }
+ { MICROMIPS_INST_LI_V0, ULONGEST_MAX },
+ { MIPS_NR_rt_sigreturn, ULONGEST_MAX },
+ { MICROMIPS_INST_POOL32A, ULONGEST_MAX },
+ { MICROMIPS_INST_SYSCALL, ULONGEST_MAX },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips_linux_o32_sigframe_init,
micromips_linux_sigframe_validate
@@ -828,11 +828,11 @@ static const struct tramp_frame micromips_linux_n32_rt_sigframe = {
SIGTRAMP_FRAME,
2,
{
- { MICROMIPS_INST_LI_V0, -1 },
- { MIPS_NR_N32_rt_sigreturn, -1 },
- { MICROMIPS_INST_POOL32A, -1 },
- { MICROMIPS_INST_SYSCALL, -1 },
- { TRAMP_SENTINEL_INSN, -1 }
+ { MICROMIPS_INST_LI_V0, ULONGEST_MAX },
+ { MIPS_NR_N32_rt_sigreturn, ULONGEST_MAX },
+ { MICROMIPS_INST_POOL32A, ULONGEST_MAX },
+ { MICROMIPS_INST_SYSCALL, ULONGEST_MAX },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips_linux_n32n64_sigframe_init,
micromips_linux_sigframe_validate
@@ -842,11 +842,11 @@ static const struct tramp_frame micromips_linux_n64_rt_sigframe = {
SIGTRAMP_FRAME,
2,
{
- { MICROMIPS_INST_LI_V0, -1 },
- { MIPS_NR_N64_rt_sigreturn, -1 },
- { MICROMIPS_INST_POOL32A, -1 },
- { MICROMIPS_INST_SYSCALL, -1 },
- { TRAMP_SENTINEL_INSN, -1 }
+ { MICROMIPS_INST_LI_V0, ULONGEST_MAX },
+ { MIPS_NR_N64_rt_sigreturn, ULONGEST_MAX },
+ { MICROMIPS_INST_POOL32A, ULONGEST_MAX },
+ { MICROMIPS_INST_SYSCALL, ULONGEST_MAX },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips_linux_n32n64_sigframe_init,
micromips_linux_sigframe_validate
diff --git a/gdb/mips64-obsd-tdep.c b/gdb/mips64-obsd-tdep.c
index ab910edfc4..a62b9faf13 100644
--- a/gdb/mips64-obsd-tdep.c
+++ b/gdb/mips64-obsd-tdep.c
@@ -127,11 +127,11 @@ static const struct tramp_frame mips64obsd_sigframe =
SIGTRAMP_FRAME,
MIPS_INSN32_SIZE,
{
- { 0x67a40020, -1 }, /* daddiu a0,sp,32 */
- { 0x24020067, -1 }, /* li v0,103 */
- { 0x0000000c, -1 }, /* syscall */
- { 0x0000000d, -1 }, /* break */
- { TRAMP_SENTINEL_INSN, -1 }
+ { 0x67a40020, ULONGEST_MAX }, /* daddiu a0,sp,32 */
+ { 0x24020067, ULONGEST_MAX }, /* li v0,103 */
+ { 0x0000000c, ULONGEST_MAX }, /* syscall */
+ { 0x0000000d, ULONGEST_MAX }, /* break */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
mips64obsd_sigframe_init
};
diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c
index 070fb205fc..f6ec123db8 100644
--- a/gdb/mn10300-linux-tdep.c
+++ b/gdb/mn10300-linux-tdep.c
@@ -472,13 +472,13 @@ static const struct tramp_frame am33_linux_sigframe = {
1,
{
/* mov 119,d0 */
- { 0x2c, -1 },
- { 0x77, -1 },
- { 0x00, -1 },
+ { 0x2c, ULONGEST_MAX },
+ { 0x77, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
/* syscall 0 */
- { 0xf0, -1 },
- { 0xe0, -1 },
- { TRAMP_SENTINEL_INSN, -1 }
+ { 0xf0, ULONGEST_MAX },
+ { 0xe0, ULONGEST_MAX },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
am33_linux_sigframe_cache_init
};
@@ -488,13 +488,13 @@ static const struct tramp_frame am33_linux_rt_sigframe = {
1,
{
/* mov 173,d0 */
- { 0x2c, -1 },
- { 0xad, -1 },
- { 0x00, -1 },
+ { 0x2c, ULONGEST_MAX },
+ { 0xad, ULONGEST_MAX },
+ { 0x00, ULONGEST_MAX },
/* syscall 0 */
- { 0xf0, -1 },
- { 0xe0, -1 },
- { TRAMP_SENTINEL_INSN, -1 }
+ { 0xf0, ULONGEST_MAX },
+ { 0xe0, ULONGEST_MAX },
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
am33_linux_sigframe_cache_init
};
diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c
index e7f4ecf16e..1f88823acc 100644
--- a/gdb/nios2-linux-tdep.c
+++ b/gdb/nios2-linux-tdep.c
@@ -162,8 +162,8 @@ static struct tramp_frame nios2_r1_linux_rt_sigreturn_tramp_frame =
SIGTRAMP_FRAME,
4,
{
- { MATCH_R1_MOVI | SET_IW_I_B (2) | SET_IW_I_IMM16 (139), -1 },
- { MATCH_R1_TRAP | SET_IW_R_IMM5 (0), -1},
+ { MATCH_R1_MOVI | SET_IW_I_B (2) | SET_IW_I_IMM16 (139), ULONGEST_MAX },
+ { MATCH_R1_TRAP | SET_IW_R_IMM5 (0), ULONGEST_MAX},
{ TRAMP_SENTINEL_INSN }
},
nios2_linux_rt_sigreturn_init
@@ -174,8 +174,8 @@ static struct tramp_frame nios2_r2_linux_rt_sigreturn_tramp_frame =
SIGTRAMP_FRAME,
4,
{
- { MATCH_R2_MOVI | SET_IW_F2I16_B (2) | SET_IW_F2I16_IMM16 (139), -1 },
- { MATCH_R2_TRAP | SET_IW_X2L5_IMM5 (0), -1},
+ { MATCH_R2_MOVI | SET_IW_F2I16_B (2) | SET_IW_F2I16_IMM16 (139), ULONGEST_MAX },
+ { MATCH_R2_TRAP | SET_IW_X2L5_IMM5 (0), ULONGEST_MAX},
{ TRAMP_SENTINEL_INSN }
},
nios2_linux_rt_sigreturn_init
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 33a0b5a83b..6345dab0b6 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -746,8 +746,8 @@ static struct tramp_frame ppc32_linux_sigaction_tramp_frame = {
SIGTRAMP_FRAME,
4,
{
- { 0x380000ac, -1 }, /* li r0, 172 */
- { 0x44000002, -1 }, /* sc */
+ { 0x380000ac, ULONGEST_MAX }, /* li r0, 172 */
+ { 0x44000002, ULONGEST_MAX }, /* sc */
{ TRAMP_SENTINEL_INSN },
},
ppc32_linux_sigaction_cache_init
@@ -756,9 +756,9 @@ static struct tramp_frame ppc64_linux_sigaction_tramp_frame = {
SIGTRAMP_FRAME,
4,
{
- { 0x38210080, -1 }, /* addi r1,r1,128 */
- { 0x380000ac, -1 }, /* li r0, 172 */
- { 0x44000002, -1 }, /* sc */
+ { 0x38210080, ULONGEST_MAX }, /* addi r1,r1,128 */
+ { 0x380000ac, ULONGEST_MAX }, /* li r0, 172 */
+ { 0x44000002, ULONGEST_MAX }, /* sc */
{ TRAMP_SENTINEL_INSN },
},
ppc64_linux_sigaction_cache_init
@@ -767,8 +767,8 @@ static struct tramp_frame ppc32_linux_sighandler_tramp_frame = {
SIGTRAMP_FRAME,
4,
{
- { 0x38000077, -1 }, /* li r0,119 */
- { 0x44000002, -1 }, /* sc */
+ { 0x38000077, ULONGEST_MAX }, /* li r0,119 */
+ { 0x44000002, ULONGEST_MAX }, /* sc */
{ TRAMP_SENTINEL_INSN },
},
ppc32_linux_sighandler_cache_init
@@ -777,9 +777,9 @@ static struct tramp_frame ppc64_linux_sighandler_tramp_frame = {
SIGTRAMP_FRAME,
4,
{
- { 0x38210080, -1 }, /* addi r1,r1,128 */
- { 0x38000077, -1 }, /* li r0,119 */
- { 0x44000002, -1 }, /* sc */
+ { 0x38210080, ULONGEST_MAX }, /* addi r1,r1,128 */
+ { 0x38000077, ULONGEST_MAX }, /* li r0,119 */
+ { 0x44000002, ULONGEST_MAX }, /* sc */
{ TRAMP_SENTINEL_INSN },
},
ppc64_linux_sighandler_cache_init
diff --git a/gdb/ppc-nbsd-tdep.c b/gdb/ppc-nbsd-tdep.c
index c86aeb8a29..79c5abd1cf 100644
--- a/gdb/ppc-nbsd-tdep.c
+++ b/gdb/ppc-nbsd-tdep.c
@@ -137,14 +137,14 @@ static const struct tramp_frame ppcnbsd_sigtramp =
SIGTRAMP_FRAME,
4,
{
- { 0x3821fff0, -1 }, /* add r1,r1,-16 */
- { 0x4e800021, -1 }, /* blrl */
- { 0x38610018, -1 }, /* addi r3,r1,24 */
- { 0x38000127, -1 }, /* li r0,295 */
- { 0x44000002, -1 }, /* sc */
- { 0x38000001, -1 }, /* li r0,1 */
- { 0x44000002, -1 }, /* sc */
- { TRAMP_SENTINEL_INSN, -1 }
+ { 0x3821fff0, ULONGEST_MAX }, /* add r1,r1,-16 */
+ { 0x4e800021, ULONGEST_MAX }, /* blrl */
+ { 0x38610018, ULONGEST_MAX }, /* addi r3,r1,24 */
+ { 0x38000127, ULONGEST_MAX }, /* li r0,295 */
+ { 0x44000002, ULONGEST_MAX }, /* sc */
+ { 0x38000001, ULONGEST_MAX }, /* li r0,1 */
+ { 0x44000002, ULONGEST_MAX }, /* sc */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
ppcnbsd_sigtramp_cache_init
};
@@ -156,14 +156,14 @@ const struct tramp_frame ppcnbsd2_sigtramp =
SIGTRAMP_FRAME,
4,
{
- { 0x3821fff0, -1 }, /* add r1,r1,-16 */
- { 0x4e800021, -1 }, /* blrl */
- { 0x38610010, -1 }, /* addi r3,r1,16 */
- { 0x38000127, -1 }, /* li r0,295 */
- { 0x44000002, -1 }, /* sc */
- { 0x38000001, -1 }, /* li r0,1 */
- { 0x44000002, -1 }, /* sc */
- { TRAMP_SENTINEL_INSN, -1 }
+ { 0x3821fff0, ULONGEST_MAX }, /* add r1,r1,-16 */
+ { 0x4e800021, ULONGEST_MAX }, /* blrl */
+ { 0x38610010, ULONGEST_MAX }, /* addi r3,r1,16 */
+ { 0x38000127, ULONGEST_MAX }, /* li r0,295 */
+ { 0x44000002, ULONGEST_MAX }, /* sc */
+ { 0x38000001, ULONGEST_MAX }, /* li r0,1 */
+ { 0x44000002, ULONGEST_MAX }, /* sc */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
ppcnbsd_sigtramp_cache_init
};
diff --git a/gdb/sparc-linux-tdep.c b/gdb/sparc-linux-tdep.c
index 0933a44cf9..ee6bd069ca 100644
--- a/gdb/sparc-linux-tdep.c
+++ b/gdb/sparc-linux-tdep.c
@@ -68,9 +68,9 @@ static const struct tramp_frame sparc32_linux_sigframe =
SIGTRAMP_FRAME,
4,
{
- { 0x821020d8, -1 }, /* mov __NR_sugreturn, %g1 */
- { 0x91d02010, -1 }, /* ta 0x10 */
- { TRAMP_SENTINEL_INSN, -1 }
+ { 0x821020d8, ULONGEST_MAX }, /* mov __NR_sugreturn, %g1 */
+ { 0x91d02010, ULONGEST_MAX }, /* ta 0x10 */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
sparc32_linux_sigframe_init
};
@@ -83,9 +83,9 @@ static const struct tramp_frame sparc32_linux_rt_sigframe =
SIGTRAMP_FRAME,
4,
{
- { 0x82102065, -1 }, /* mov __NR_rt_sigreturn, %g1 */
- { 0x91d02010, -1 }, /* ta 0x10 */
- { TRAMP_SENTINEL_INSN, -1 }
+ { 0x82102065, ULONGEST_MAX }, /* mov __NR_rt_sigreturn, %g1 */
+ { 0x91d02010, ULONGEST_MAX }, /* ta 0x10 */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
sparc32_linux_sigframe_init
};
diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c
index 6451ffdacc..a135f353c4 100644
--- a/gdb/sparc64-linux-tdep.c
+++ b/gdb/sparc64-linux-tdep.c
@@ -64,9 +64,9 @@ static const struct tramp_frame sparc64_linux_rt_sigframe =
SIGTRAMP_FRAME,
4,
{
- { 0x82102065, -1 }, /* mov __NR_rt_sigreturn, %g1 */
- { 0x91d0206d, -1 }, /* ta 0x6d */
- { TRAMP_SENTINEL_INSN, -1 }
+ { 0x82102065, ULONGEST_MAX }, /* mov __NR_rt_sigreturn, %g1 */
+ { 0x91d0206d, ULONGEST_MAX }, /* ta 0x6d */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
sparc64_linux_sigframe_init
};
diff --git a/gdb/tic6x-linux-tdep.c b/gdb/tic6x-linux-tdep.c
index d54bbe74d0..08f6dd0dca 100644
--- a/gdb/tic6x-linux-tdep.c
+++ b/gdb/tic6x-linux-tdep.c
@@ -137,7 +137,7 @@ static struct tramp_frame tic6x_linux_rt_sigreturn_tramp_frame =
4,
{
{0x000045aa, 0x0fffffff}, /* mvk .S2 139,b0 */
- {0x10000000, -1}, /* swe */
+ {0x10000000, ULONGEST_MAX}, /* swe */
{TRAMP_SENTINEL_INSN}
},
tic6x_linux_rt_sigreturn_init
diff --git a/gdb/tilegx-linux-tdep.c b/gdb/tilegx-linux-tdep.c
index d5280f3e17..a3c72e030f 100644
--- a/gdb/tilegx-linux-tdep.c
+++ b/gdb/tilegx-linux-tdep.c
@@ -65,9 +65,9 @@ static const struct tramp_frame tilegx_linux_rt_sigframe =
SIGTRAMP_FRAME,
8,
{
- { 0x00045fe551483000ULL, -1 }, /* { moveli r10, 139 } */
- { 0x286b180051485000ULL, -1 }, /* { swint1 } */
- { TRAMP_SENTINEL_INSN, -1 }
+ { 0x00045fe551483000ULL, ULONGEST_MAX }, /* { moveli r10, 139 } */
+ { 0x286b180051485000ULL, ULONGEST_MAX }, /* { swint1 } */
+ { TRAMP_SENTINEL_INSN, ULONGEST_MAX }
},
tilegx_linux_sigframe_init
};
diff --git a/gdb/tramp-frame.h b/gdb/tramp-frame.h
index 6ba0943a04..ff2e8b6c29 100644
--- a/gdb/tramp-frame.h
+++ b/gdb/tramp-frame.h
@@ -41,7 +41,7 @@ struct trad_frame_cache;
/* Magic instruction that to mark the end of the signal trampoline
instruction sequence. */
-#define TRAMP_SENTINEL_INSN ((LONGEST) -1)
+#define TRAMP_SENTINEL_INSN ULONGEST_MAX
struct tramp_frame
{
--
2.13.6
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 4/7] Fix two -Wnarrowing warnings in xtensa-tdep.h
2018-08-08 23:20 [PATCH 0/7] Remove -Wno-narrowing Tom Tromey
` (4 preceding siblings ...)
2018-08-08 23:20 ` [PATCH 5/7] Avoid -Wnarrowing warnings in ppc64-tdep.c Tom Tromey
@ 2018-08-08 23:20 ` Tom Tromey
2018-08-09 18:09 ` Pedro Alves
2018-08-08 23:20 ` [PATCH 6/7] Avoid -Wnarrowing warnings in gdbserver Tom Tromey
6 siblings, 1 reply; 18+ messages in thread
From: Tom Tromey @ 2018-08-08 23:20 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
This fixes a couple of -Wnarrowing warnings in xtensa-tdep.h, by
introducing some casts to unsigned.
gdb/ChangeLog
2018-08-08 Tom Tromey <tom@tromey.com>
* xtensa-tdep.h (XTREG_END): Add cast to unsigned.
(XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
---
gdb/ChangeLog | 5 +++++
gdb/xtensa-tdep.h | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h
index ccd3714640..d170e054d4 100644
--- a/gdb/xtensa-tdep.h
+++ b/gdb/xtensa-tdep.h
@@ -130,7 +130,7 @@ typedef struct
ct, bsz, sz, al, tnum, flg, cp, mas, fet, sto},
#define XTREG_END \
{0, 0, (xtensa_register_type_t) 0, (xtensa_register_group_t) 0, \
- 0, 0, 0, 0, -1, 0, 0, 0, 0, 0},
+ 0, 0, 0, 0, (unsigned) -1, 0, 0, 0, 0, 0},
#define XTENSA_REGISTER_FLAGS_PRIVILEGED 0x0001
#define XTENSA_REGISTER_FLAGS_READABLE 0x0002
@@ -228,7 +228,7 @@ struct gdbarch_tdep
#define XTENSA_GDBARCH_TDEP_INSTANTIATE(rmap,spillsz) \
{ \
0, /* target_flags */ \
- -1, /* spill_location */ \
+ (unsigned) -1, /* spill_location */ \
(spillsz), /* spill_size */ \
0, /* unused */ \
(XSHAL_ABI == XTHAL_ABI_CALL0 \
--
2.13.6
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/7] Change completion_tracker to use char type
2018-08-08 23:20 ` [PATCH 1/7] Change completion_tracker to use char type Tom Tromey
@ 2018-08-09 17:38 ` Pedro Alves
2018-08-09 18:42 ` Tom Tromey
0 siblings, 1 reply; 18+ messages in thread
From: Pedro Alves @ 2018-08-09 17:38 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
On 08/09/2018 12:20 AM, Tom Tromey wrote:
> This changes completion_tracker to use the char type for the quote
> char. This avoids some narrowing warnings at the places where
> quote_char() is called.
See comment about use of int vs char here:
https://sourceware.org/ml/gdb-patches/2017-07/msg00228.html
Look for "Why int".
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/7] Avoid -Wnarrowing warnings in struct tramp_frame instances
2018-08-08 23:20 ` [PATCH 3/7] Avoid -Wnarrowing warnings in struct tramp_frame instances Tom Tromey
@ 2018-08-09 18:08 ` Pedro Alves
2018-08-09 18:17 ` Tom Tromey
0 siblings, 1 reply; 18+ messages in thread
From: Pedro Alves @ 2018-08-09 18:08 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
On 08/09/2018 12:20 AM, Tom Tromey wrote:
> --- a/gdb/common/common-types.h
> +++ b/gdb/common/common-types.h
> @@ -58,6 +58,9 @@ typedef unsigned long long ULONGEST;
> /* * The largest CORE_ADDR value. */
> #define CORE_ADDR_MAX (~ (CORE_ADDR) 0)
>
> +/* * The largest ULONGEST value. */
> +#define ULONGEST_MAX (~ (ULONGEST) 0)
With '~' being a unary operator, the right format would be:
#define ULONGEST_MAX (~(ULONGEST) 0)
But I see that CORE_ADDR_MAX has the same issue...
LGTM.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/7] Use CORE_ADDR_MAX in various "breaks" arrays
2018-08-08 23:20 ` [PATCH 2/7] Use CORE_ADDR_MAX in various "breaks" arrays Tom Tromey
@ 2018-08-09 18:08 ` Pedro Alves
0 siblings, 0 replies; 18+ messages in thread
From: Pedro Alves @ 2018-08-09 18:08 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
On 08/09/2018 12:20 AM, Tom Tromey wrote:
> Code like this:
>
> CORE_ADDR breaks[2] = {-1, -1};
>
> ... gives a warning with -Wnarrowing. This patch changes all
> instances of this to use CORE_ADDR_MAX instead.
OK.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/7] Fix two -Wnarrowing warnings in xtensa-tdep.h
2018-08-08 23:20 ` [PATCH 4/7] Fix two -Wnarrowing warnings in xtensa-tdep.h Tom Tromey
@ 2018-08-09 18:09 ` Pedro Alves
0 siblings, 0 replies; 18+ messages in thread
From: Pedro Alves @ 2018-08-09 18:09 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
On 08/09/2018 12:20 AM, Tom Tromey wrote:
> This fixes a couple of -Wnarrowing warnings in xtensa-tdep.h, by
> introducing some casts to unsigned.
LGTM.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] Remove -Wno-narrowing from warnings.m4
2018-08-08 23:20 ` [PATCH 7/7] Remove -Wno-narrowing from warnings.m4 Tom Tromey
@ 2018-08-09 18:10 ` Pedro Alves
2018-08-27 17:46 ` Tom Tromey
0 siblings, 1 reply; 18+ messages in thread
From: Pedro Alves @ 2018-08-09 18:10 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
On 08/09/2018 12:20 AM, Tom Tromey wrote:
> This removes -Wno-narrowing from warnings.m4.
> This is PR build/23087.
OK. Thanks much for doing this.
Patches 5 and 6 look OK to me too, but you may want to
give the IBM folks some time to comment in case
they'd prefer some other solution.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/7] Avoid -Wnarrowing warnings in struct tramp_frame instances
2018-08-09 18:08 ` Pedro Alves
@ 2018-08-09 18:17 ` Tom Tromey
0 siblings, 0 replies; 18+ messages in thread
From: Tom Tromey @ 2018-08-09 18:17 UTC (permalink / raw)
To: Pedro Alves; +Cc: Tom Tromey, gdb-patches
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> On 08/09/2018 12:20 AM, Tom Tromey wrote:
>> --- a/gdb/common/common-types.h
>> +++ b/gdb/common/common-types.h
>> @@ -58,6 +58,9 @@ typedef unsigned long long ULONGEST;
>> /* * The largest CORE_ADDR value. */
>> #define CORE_ADDR_MAX (~ (CORE_ADDR) 0)
>>
>> +/* * The largest ULONGEST value. */
>> +#define ULONGEST_MAX (~ (ULONGEST) 0)
Pedro> With '~' being a unary operator, the right format would be:
Pedro> #define ULONGEST_MAX (~(ULONGEST) 0)
Pedro> But I see that CORE_ADDR_MAX has the same issue...
I'll just fix them both in the next revision.
Tom
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/7] Change completion_tracker to use char type
2018-08-09 17:38 ` Pedro Alves
@ 2018-08-09 18:42 ` Tom Tromey
2018-08-09 18:50 ` Pedro Alves
0 siblings, 1 reply; 18+ messages in thread
From: Tom Tromey @ 2018-08-09 18:42 UTC (permalink / raw)
To: Pedro Alves; +Cc: Tom Tromey, gdb-patches
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> See comment about use of int vs char here:
Pedro> https://sourceware.org/ml/gdb-patches/2017-07/msg00228.html
Pedro> Look for "Why int".
Thanks. How about just this patch, that adds a couple of casts at the
necessary spots?
Tom
commit 5683b8e5ff3dabcea180e0ce84c236189f047cb0
Author: Tom Tromey <tom@tromey.com>
Date: Thu Aug 9 12:38:39 2018 -0600
Avoid -Wnarrowing warnings from quote_char()
This adds a couple of casts to avoid -Wnarrowing warnings coming from
the use of quote_char().
2018-08-09 Tom Tromey <tom@tromey.com>
* linespec.c (complete_linespec_component): Add cast to "char".
* completer.c (completion_tracker::build_completion_result): Add
cast to "char".
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b405915c43..2a284fbc10 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2018-08-09 Tom Tromey <tom@tromey.com>
+ * linespec.c (complete_linespec_component): Add cast to "char".
+ * completer.c (completion_tracker::build_completion_result): Add
+ cast to "char".
+
+2018-08-09 Tom Tromey <tom@tromey.com>
+
* riscv-tdep.h: Minor formatting fixes.
2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
diff --git a/gdb/completer.c b/gdb/completer.c
index 3e87ed454c..1c285262de 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -2032,7 +2032,7 @@ completion_tracker::build_completion_result (const char *text,
/* We don't rely on readline appending the quote char as
delimiter as then readline wouldn't append the ' ' after the
completion. */
- char buf[2] = { quote_char () };
+ char buf[2] = { (char) quote_char () };
match_list[0] = reconcat (match_list[0], match_list[0],
buf, (char *) NULL);
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 790ddf4740..dcaaaefaaa 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -2894,7 +2894,7 @@ complete_linespec_component (linespec_parser *parser,
new "quote" char. */
if (tracker.quote_char ())
{
- char quote_char_str[2] = { tracker.quote_char () };
+ char quote_char_str[2] = { (char) tracker.quote_char () };
fn = reconcat (fn, fn, quote_char_str, (char *) NULL);
tracker.set_quote_char (':');
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/7] Change completion_tracker to use char type
2018-08-09 18:42 ` Tom Tromey
@ 2018-08-09 18:50 ` Pedro Alves
0 siblings, 0 replies; 18+ messages in thread
From: Pedro Alves @ 2018-08-09 18:50 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On 08/09/2018 07:42 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
> Pedro> See comment about use of int vs char here:
> Pedro> https://sourceware.org/ml/gdb-patches/2017-07/msg00228.html
> Pedro> Look for "Why int".
>
> Thanks. How about just this patch, that adds a couple of casts at the
> necessary spots?
LGTM.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] Remove -Wno-narrowing from warnings.m4
2018-08-09 18:10 ` Pedro Alves
@ 2018-08-27 17:46 ` Tom Tromey
2018-08-27 18:00 ` Tom Tromey
0 siblings, 1 reply; 18+ messages in thread
From: Tom Tromey @ 2018-08-27 17:46 UTC (permalink / raw)
To: Pedro Alves; +Cc: Tom Tromey, gdb-patches
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> On 08/09/2018 12:20 AM, Tom Tromey wrote:
>> This removes -Wno-narrowing from warnings.m4.
>> This is PR build/23087.
Pedro> OK. Thanks much for doing this.
Pedro> Patches 5 and 6 look OK to me too, but you may want to
Pedro> give the IBM folks some time to comment in case
Pedro> they'd prefer some other solution.
I'm checking this in now.
Tom
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] Remove -Wno-narrowing from warnings.m4
2018-08-27 17:46 ` Tom Tromey
@ 2018-08-27 18:00 ` Tom Tromey
0 siblings, 0 replies; 18+ messages in thread
From: Tom Tromey @ 2018-08-27 18:00 UTC (permalink / raw)
To: Tom Tromey; +Cc: Pedro Alves, gdb-patches
>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
Tom> I'm checking this in now.
I spoke a little too soon. Rebasing showed a new instance of the
warning, which I've fixed as appended.
I'm pushing the series with this addition.
Tom
commit fb45de8f4132b8212bf88eaeef5eed7c9ca78a55
Author: Tom Tromey <tom@tromey.com>
Date: Mon Aug 27 11:55:39 2018 -0600
Avoid -Wnarrowing warnings in aarch64-linux-tdep.c
This avoids -Wnarrowing warnings in
aarch64_linux_iterate_over_regset_sections, by adding some casts to
int.
2018-08-27 Tom Tromey <tom@tromey.com>
* aarch64-linux-tdep.c
(aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
casts to int.
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 52321a8c64e..03a97a56899 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2018-08-27 Tom Tromey <tom@tromey.com>
+
+ * aarch64-linux-tdep.c
+ (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
+ casts to int.
+
2018-08-08 Tom Tromey <tom@tromey.com>
* ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index 0d46acde5fa..dc2b89121a6 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -411,8 +411,8 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
/* Create this on the fly in order to handle vector register sizes. */
const struct regcache_map_entry sve_regmap[] =
{
- { 32, AARCH64_SVE_Z0_REGNUM, tdep->vq * 16 },
- { 16, AARCH64_SVE_P0_REGNUM, tdep->vq * 16 / 8 },
+ { 32, AARCH64_SVE_Z0_REGNUM, (int) (tdep->vq * 16) },
+ { 16, AARCH64_SVE_P0_REGNUM, (int) (tdep->vq * 16 / 8) },
{ 1, AARCH64_SVE_FFR_REGNUM, 4 },
{ 1, AARCH64_FPSR_REGNUM, 4 },
{ 1, AARCH64_FPCR_REGNUM, 4 },
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2018-08-27 18:00 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 23:20 [PATCH 0/7] Remove -Wno-narrowing Tom Tromey
2018-08-08 23:20 ` [PATCH 7/7] Remove -Wno-narrowing from warnings.m4 Tom Tromey
2018-08-09 18:10 ` Pedro Alves
2018-08-27 17:46 ` Tom Tromey
2018-08-27 18:00 ` Tom Tromey
2018-08-08 23:20 ` [PATCH 3/7] Avoid -Wnarrowing warnings in struct tramp_frame instances Tom Tromey
2018-08-09 18:08 ` Pedro Alves
2018-08-09 18:17 ` Tom Tromey
2018-08-08 23:20 ` [PATCH 2/7] Use CORE_ADDR_MAX in various "breaks" arrays Tom Tromey
2018-08-09 18:08 ` Pedro Alves
2018-08-08 23:20 ` [PATCH 1/7] Change completion_tracker to use char type Tom Tromey
2018-08-09 17:38 ` Pedro Alves
2018-08-09 18:42 ` Tom Tromey
2018-08-09 18:50 ` Pedro Alves
2018-08-08 23:20 ` [PATCH 5/7] Avoid -Wnarrowing warnings in ppc64-tdep.c Tom Tromey
2018-08-08 23:20 ` [PATCH 4/7] Fix two -Wnarrowing warnings in xtensa-tdep.h Tom Tromey
2018-08-09 18:09 ` Pedro Alves
2018-08-08 23:20 ` [PATCH 6/7] Avoid -Wnarrowing warnings in gdbserver Tom Tromey
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).