* [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf
@ 2002-04-22 6:42 Joel Brobecker
2002-04-22 8:49 ` Jason R Thorpe
2002-04-22 8:56 ` Jason R Thorpe
0 siblings, 2 replies; 8+ messages in thread
From: Joel Brobecker @ 2002-04-22 6:42 UTC (permalink / raw)
To: gdb-patches
[-- 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));
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf
2002-04-22 6:42 [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf Joel Brobecker
@ 2002-04-22 8:49 ` Jason R Thorpe
2002-04-22 8:56 ` Jason R Thorpe
1 sibling, 0 replies; 8+ messages in thread
From: Jason R Thorpe @ 2002-04-22 8:49 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On Mon, Apr 22, 2002 at 03:42:34PM +0200, Joel Brobecker wrote:
> 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.
"Oops!"
Try including "alpha-tdep.h" and using ALPHA_NUM_REGS and
ALPHA_MAX_REGISTER_RAW_SIZE; this is how I changed it in
other places in the Alpha target code.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf
2002-04-22 6:42 [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf Joel Brobecker
2002-04-22 8:49 ` Jason R Thorpe
@ 2002-04-22 8:56 ` Jason R Thorpe
2002-04-23 3:14 ` Joel Brobecker
1 sibling, 1 reply; 8+ messages in thread
From: Jason R Thorpe @ 2002-04-22 8:56 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
On Mon, Apr 22, 2002 at 03:42:34PM +0200, Joel Brobecker wrote:
> Ideas for a better fix are welcome.
I'll commit this; it mimmicks what I did in the other Alpha code.
* alpha-nat.c (get_longjmp_target): Use ALPHA_* constants
where needed.
(fetch_osf_core_registers): Likewise.
(supply_gregset): Likewise.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
[-- Attachment #2: alpha-patch --]
[-- Type: text/plain, Size: 1257 bytes --]
Index: alpha-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-nat.c,v
retrieving revision 1.9
diff -u -r1.9 alpha-nat.c
--- alpha-nat.c 21 Apr 2002 16:52:39 -0000 1.9
+++ alpha-nat.c 22 Apr 2002 15:50:30 -0000
@@ -63,7 +63,7 @@
get_longjmp_target (CORE_ADDR *pc)
{
CORE_ADDR jb_addr;
- char raw_buffer[MAX_REGISTER_RAW_SIZE];
+ char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
jb_addr = read_register (ALPHA_A0_REGNUM);
@@ -101,7 +101,7 @@
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] =
+ static int core_reg_mapping[ALPHA_NUM_REGS] =
{
#ifdef NCF_REGS
#define EFL NCF_REGS
@@ -127,7 +127,7 @@
EF_PC, -1
#endif
};
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
+ static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] =
{0};
for (regno = 0; regno < NUM_REGS; regno++)
@@ -222,7 +222,7 @@
{
register int regi;
register long *regp = ALPHA_REGSET_BASE (gregsetp);
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
+ static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] =
{0};
for (regi = 0; regi < 31; regi++)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf
2002-04-22 8:56 ` Jason R Thorpe
@ 2002-04-23 3:14 ` Joel Brobecker
2002-04-23 3:55 ` David S. Miller
0 siblings, 1 reply; 8+ messages in thread
From: Joel Brobecker @ 2002-04-23 3:14 UTC (permalink / raw)
To: Jason R Thorpe, gdb-patches
> I'll commit this; it mimmicks what I did in the other Alpha code.
>
> * alpha-nat.c (get_longjmp_target): Use ALPHA_* constants
> where needed.
> (fetch_osf_core_registers): Likewise.
> (supply_gregset): Likewise.
Thanks for the help. I relaunched the testsuite, and here are the
results on our Tru64 5.1A machine. They should be identical to
yesterday's results:
# of expected passes 6990
# of unexpected failures 791
# of unexpected successes 3
# of expected failures 149
# of unresolved testcases 64
# of unsupported tests 2
--
Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf
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
0 siblings, 2 replies; 8+ messages in thread
From: David S. Miller @ 2002-04-23 3:55 UTC (permalink / raw)
To: brobecker; +Cc: thorpej, gdb-patches
From: Joel Brobecker <brobecker@ACT-Europe.FR>
Date: Tue, 23 Apr 2002 12:14:42 +0200
Thanks for the help. I relaunched the testsuite, and here are the
results on our Tru64 5.1A machine. They should be identical to
yesterday's results:
# of unexpected failures 791
This reminds me of an issue Richard Henderson mentioned to
me. At least at one point in time gdb got really confused when gcc
used float regs for integer values. This happens quite often on
Alpha, and can happen on other systems too (Sparc when usage of
VIS instructions is enabled).
Does GDB still have a problem with this situation?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf
2002-04-23 3:55 ` David S. Miller
@ 2002-04-23 10:56 ` Michael Snyder
2002-04-23 16:33 ` Andrew Cagney
1 sibling, 0 replies; 8+ messages in thread
From: Michael Snyder @ 2002-04-23 10:56 UTC (permalink / raw)
To: David S. Miller; +Cc: brobecker, thorpej, gdb-patches
"David S. Miller" wrote:
>
> From: Joel Brobecker <brobecker@ACT-Europe.FR>
> Date: Tue, 23 Apr 2002 12:14:42 +0200
>
> Thanks for the help. I relaunched the testsuite, and here are the
> results on our Tru64 5.1A machine. They should be identical to
> yesterday's results:
>
> # of unexpected failures 791
>
> This reminds me of an issue Richard Henderson mentioned to
> me. At least at one point in time gdb got really confused when gcc
> used float regs for integer values. This happens quite often on
> Alpha, and can happen on other systems too (Sparc when usage of
> VIS instructions is enabled).
>
> Does GDB still have a problem with this situation?
Very likely. But it would be on a target-by-target basis, I think.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf
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
1 sibling, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2002-04-23 16:33 UTC (permalink / raw)
To: David S. Miller; +Cc: brobecker, thorpej, gdb-patches
> From: Joel Brobecker <brobecker@ACT-Europe.FR>
> Date: Tue, 23 Apr 2002 12:14:42 +0200
>
> Thanks for the help. I relaunched the testsuite, and here are the
> results on our Tru64 5.1A machine. They should be identical to
> yesterday's results:
>
> # of unexpected failures 791
>
> This reminds me of an issue Richard Henderson mentioned to
> me. At least at one point in time gdb got really confused when gcc
> used float regs for integer values. This happens quite often on
> Alpha, and can happen on other systems too (Sparc when usage of
> VIS instructions is enabled).
>
> Does GDB still have a problem with this situation?
The *CONVERT* stuff should be capable of handling this. For the Alpha,
PeterS added:
Tue Nov 2 13:42:30 1993 Peter Schauer
(pes@regent.e-technik.tu-muenchen.de)
* alpha-tdep.c (alpha_register_convert_to_raw,
alpha_register_convert_to_virtual): New routines to handle
the different raw formats in alpha floating point registers.
* config/alpha/tm-alpha.h (REGISTER_CONVERTIBLE,
REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW): Use them.
So it is certanly using the correct mechanism. Perhaphs if you can give
a concrete example it can be fixed.
enjoy,
Andrew
(A word of caution - the CONVERT stuff is overloaded, the above use is
ok but the second use as seen in the MIPS isn't).
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf
2002-04-23 16:33 ` Andrew Cagney
@ 2002-04-23 22:04 ` David S. Miller
0 siblings, 0 replies; 8+ messages in thread
From: David S. Miller @ 2002-04-23 22:04 UTC (permalink / raw)
To: ac131313; +Cc: brobecker, thorpej, gdb-patches
From: Andrew Cagney <ac131313@cygnus.com>
Date: Tue, 23 Apr 2002 19:33:37 -0400
So it is certanly using the correct mechanism. Perhaphs if you can give
a concrete example it can be fixed.
Richard only told me in passing about this issue once, and
it sounded like he hadn't checked into this for some time.
I'll have him check the current code and whether the problem
still exists, and if so field more information.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-04-24 5:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-22 6:42 [RFA] Fix recent compilation errors in alpha-nat.c on alpha-osf Joel Brobecker
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox