summaryrefslogtreecommitdiff
path: root/tests/allregs.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2006-07-21 10:06:31 +0000
committerRoland McGrath <roland@redhat.com>2006-07-21 10:06:31 +0000
commit950246297c03f9ce25f645470250619e40d71018 (patch)
tree9727ed2b50b6c582cfb7f36672361f7f3d335876 /tests/allregs.c
parent858b189f82ecc32ca7042e74ccb022f794a9f83b (diff)
downloadelfutils-950246297c03f9ce25f645470250619e40d71018.tar.gz
backends/
2006-07-21 Roland McGrath <roland@redhat.com> * i386_regs.c (i386_register_name): Fix return value when using stpcpy. * ppc_regs.c (ppc_register_name): Likewise. * s390_regs.c (s390_register_name): Likewise. * ia64_retval.c: New file. * Makefile.am (ia64_SRCS): Add it. * ia64_init.c (ia64_init): Install return_value_location hook. * ia64_regs.c: New file. * Makefile.am (ia64_SRCS): Add it. * ia64_init.c (ia64_init): Install register_name hook. tests/ 2006-07-21 Roland McGrath <roland@redhat.com> * allregs.c (struct reginfo): Increase size of name. (one_register): Assert that it's big enough.
Diffstat (limited to 'tests/allregs.c')
-rw-r--r--tests/allregs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/allregs.c b/tests/allregs.c
index bad4c85e..baec94ed 100644
--- a/tests/allregs.c
+++ b/tests/allregs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Red Hat, Inc.
+/* Copyright (C) 2005, 2006 Red Hat, Inc.
This file is part of Red Hat elfutils.
Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -62,7 +62,7 @@ struct reginfo
{
const char *set, *pfx;
int regno;
- char name[8];
+ char name[32];
};
static int
@@ -103,6 +103,7 @@ one_register (void *arg,
state->info[regno].regno = regno;
state->info[regno].set = setname;
state->info[regno].pfx = prefix;
+ assert (strlen (regname) < sizeof state->info[regno].name);
strcpy (state->info[regno].name, regname);
return DWARF_CB_OK;