From: Joel Brobecker <brobecker@ACT-Europe.FR>
To: gdb-patches@sources.redhat.com
Subject: [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf
Date: Mon, 22 Apr 2002 06:42:00 -0000 [thread overview]
Message-ID: <20020422154234.F21070@act-europe.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 544 bytes --]
I tested the following change on Tru64 5.1. I made the small change
possible to allow this code to compile again, there is probably a better
way to write this code, but I'm not very familiar with this part of the
code...
Ideas for a better fix are welcome.
2002-04-22 J. Brobecker <brobecker@gnat.com>
* alpha-nat.c (fetch_osf_core_registers): Fix compilation errors
due to NUM_REGS and MAX_REGISTER_RAW_SIZE not being constants
anymore after a recent multi-arching effort.
(supply_gregset): Ditto
--
Joel
[-- Attachment #2: alpha-nat.c.diff --]
[-- Type: text/plain, Size: 2133 bytes --]
Index: alpha-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-nat.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 alpha-nat.c
*** alpha-nat.c 21 Apr 2002 16:52:39 -0000 1.9
--- alpha-nat.c 22 Apr 2002 13:32:32 -0000
*************** fetch_osf_core_registers (char *core_reg
*** 101,107 ****
OSF/1.2 core files. OSF5 uses different names for the register
enum list, need to handle two cases. The actual values are the
same. */
! static int core_reg_mapping[NUM_REGS] =
{
#ifdef NCF_REGS
#define EFL NCF_REGS
--- 101,107 ----
OSF/1.2 core files. OSF5 uses different names for the register
enum list, need to handle two cases. The actual values are the
same. */
! static int core_reg_mapping[] =
{
#ifdef NCF_REGS
#define EFL NCF_REGS
*************** fetch_osf_core_registers (char *core_reg
*** 127,134 ****
EF_PC, -1
#endif
};
! static char zerobuf[MAX_REGISTER_RAW_SIZE] =
! {0};
for (regno = 0; regno < NUM_REGS; regno++)
{
--- 127,139 ----
EF_PC, -1
#endif
};
! char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE * sizeof (char));
!
! if (sizeof (core_reg_mapping) != NUM_REGS)
! internal_error (__FILE__, __LINE__,
! "Invalid number of elements in register mapping array.");
!
! memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE * sizeof (char));
for (regno = 0; regno < NUM_REGS; regno++)
{
*************** supply_gregset (gdb_gregset_t *gregsetp)
*** 222,229 ****
{
register int regi;
register long *regp = ALPHA_REGSET_BASE (gregsetp);
! static char zerobuf[MAX_REGISTER_RAW_SIZE] =
! {0};
for (regi = 0; regi < 31; regi++)
supply_register (regi, (char *) (regp + regi));
--- 227,235 ----
{
register int regi;
register long *regp = ALPHA_REGSET_BASE (gregsetp);
! char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE * sizeof (char));
!
! memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE * sizeof (char));
for (regi = 0; regi < 31; regi++)
supply_register (regi, (char *) (regp + regi));
next reply other threads:[~2002-04-22 13:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-22 6:42 Joel Brobecker [this message]
2002-04-22 8:49 ` Jason R Thorpe
2002-04-22 8:56 ` Jason R Thorpe
2002-04-23 3:14 ` Joel Brobecker
2002-04-23 3:55 ` David S. Miller
2002-04-23 10:56 ` Michael Snyder
2002-04-23 16:33 ` Andrew Cagney
2002-04-23 22:04 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020422154234.F21070@act-europe.fr \
--to=brobecker@act-europe.fr \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox