Skip to content

Commit e2115cf

Browse files
author
Al Viro
committed
[ia64] teach elf_access_reg() to handle the missing range (r16..r31)
Now it's easy to make elf_access_gpreg() handle the rest of global registers (r16..r31). That gets rid of the hole in the registers elf_access_reg() can handle, which will allow to simplify its callers later in the series. Signed-off-by: Al Viro <[email protected]>
1 parent 4c35bf3 commit e2115cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/ia64/kernel/ptrace.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,12 +1273,14 @@ struct regset_getset {
12731273
int ret;
12741274
};
12751275

1276-
static const ptrdiff_t pt_offsets[16] =
1276+
static const ptrdiff_t pt_offsets[32] =
12771277
{
12781278
#define R(n) offsetof(struct pt_regs, r##n)
12791279
[0] = -1, R(1), R(2), R(3),
12801280
[4] = -1, [5] = -1, [6] = -1, [7] = -1,
12811281
R(8), R(9), R(10), R(11), R(12), R(13), R(14), R(15),
1282+
R(16), R(17), R(18), R(19), R(20), R(21), R(22), R(23),
1283+
R(24), R(25), R(26), R(27), R(28), R(29), R(30), R(31),
12821284
#undef R
12831285
};
12841286

@@ -1479,7 +1481,7 @@ static int
14791481
access_elf_reg(struct task_struct *target, struct unw_frame_info *info,
14801482
unsigned long addr, unsigned long *data, int write_access)
14811483
{
1482-
if (addr >= ELF_GR_OFFSET(1) && addr <= ELF_GR_OFFSET(15))
1484+
if (addr >= ELF_GR_OFFSET(1) && addr <= ELF_GR_OFFSET(31))
14831485
return access_elf_gpreg(target, info, addr, data, write_access);
14841486
else if (addr >= ELF_BR_OFFSET(0) && addr <= ELF_BR_OFFSET(7))
14851487
return access_elf_breg(target, info, addr, data, write_access);

0 commit comments

Comments
 (0)