* [patch/rfc:alpha] Switch ALPHA, NS32k and VAX to unwind mechanism
@ 2002-08-06 14:18 Andrew Cagney
2002-08-06 15:28 ` Jason R Thorpe
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andrew Cagney @ 2002-08-06 14:18 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 624 bytes --]
Hello,
Each of these three targets contain their own implementation of
get_saved_register(). In true GDB style, all three implementations are
identical and as best I can tell, also identical to the old
generic_get_saved_register!
Since generic_unwind_get_saved_register() provides equivalent (but less
buggy) functionality, this patch switches these three platforms to that
mechanism.
Given that the old code relied on the broken find_saved_registers() (see
post from KevinB) the test results should improve.
Anyone with an Alpha want to try it (I think we can suck/see the vax and
ns32k ... :-)?
enjoy,
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 6849 bytes --]
2002-08-06 Andrew Cagney <ac131313@redhat.com>
* vax-tdep.c (vax_get_saved_register): Delete function.
(vax_gdbarch_init): Update.
* ns32k-tdep.c (ns32k_get_saved_register): Delete function.
(ns32k_gdbarch_init): Update.
* alpha-tdep.c (alpha_get_saved_register): Delete function.
(alpha_gdbarch_init): Update.
Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.37
diff -u -r1.37 alpha-tdep.c
--- alpha-tdep.c 19 Jun 2002 01:12:07 -0000 1.37
+++ alpha-tdep.c 6 Aug 2002 21:05:39 -0000
@@ -65,7 +65,6 @@
static gdbarch_frame_locals_address_ftype alpha_frame_locals_address;
static gdbarch_skip_prologue_ftype alpha_skip_prologue;
-static gdbarch_get_saved_register_ftype alpha_get_saved_register;
static gdbarch_saved_pc_after_call_ftype alpha_saved_pc_after_call;
static gdbarch_frame_chain_ftype alpha_frame_chain;
static gdbarch_frame_saved_pc_ftype alpha_frame_saved_pc;
@@ -501,54 +500,6 @@
return read_next_frame_reg (frame, pcreg);
}
-static void
-alpha_get_saved_register (char *raw_buffer,
- int *optimized,
- CORE_ADDR *addrp,
- struct frame_info *frame,
- int regnum,
- enum lval_type *lval)
-{
- CORE_ADDR addr;
-
- if (!target_has_registers)
- error ("No registers.");
-
- /* Normal systems don't optimize out things with register numbers. */
- if (optimized != NULL)
- *optimized = 0;
- addr = find_saved_register (frame, regnum);
- if (addr != 0)
- {
- if (lval != NULL)
- *lval = lval_memory;
- if (regnum == SP_REGNUM)
- {
- if (raw_buffer != NULL)
- {
- /* Put it back in target format. */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- (LONGEST) addr);
- }
- if (addrp != NULL)
- *addrp = 0;
- return;
- }
- if (raw_buffer != NULL)
- target_read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
- }
- else
- {
- if (lval != NULL)
- *lval = lval_register;
- addr = REGISTER_BYTE (regnum);
- if (raw_buffer != NULL)
- read_register_gen (regnum, raw_buffer);
- }
- if (addrp != NULL)
- *addrp = addr;
-}
-
static CORE_ADDR
alpha_saved_pc_after_call (struct frame_info *frame)
{
@@ -1904,7 +1855,6 @@
set_gdbarch_frame_saved_pc (gdbarch, alpha_frame_saved_pc);
set_gdbarch_frame_init_saved_regs (gdbarch, alpha_frame_init_saved_regs);
- set_gdbarch_get_saved_register (gdbarch, alpha_get_saved_register);
set_gdbarch_use_struct_convention (gdbarch, alpha_use_struct_convention);
set_gdbarch_deprecated_extract_return_value (gdbarch, alpha_extract_return_value);
Index: ns32k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ns32k-tdep.c,v
retrieving revision 1.15
diff -u -r1.15 ns32k-tdep.c
--- ns32k-tdep.c 17 Jun 2002 23:32:32 -0000 1.15
+++ ns32k-tdep.c 6 Aug 2002 21:05:39 -0000
@@ -337,51 +337,6 @@
return (frame->frame);
}
-static void
-ns32k_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
- struct frame_info *frame, int regnum,
- enum lval_type *lval)
-{
- CORE_ADDR addr;
-
- if (!target_has_registers)
- error ("No registers.");
-
- /* Normal systems don't optimize out things with register numbers. */
- if (optimized != NULL)
- *optimized = 0;
- addr = find_saved_register (frame, regnum);
- if (addr != 0)
- {
- if (lval != NULL)
- *lval = lval_memory;
- if (regnum == SP_REGNUM)
- {
- if (raw_buffer != NULL)
- {
- /* Put it back in target format. */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- (LONGEST) addr);
- }
- if (addrp != NULL)
- *addrp = 0;
- return;
- }
- if (raw_buffer != NULL)
- target_read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
- }
- else
- {
- if (lval != NULL)
- *lval = lval_register;
- addr = REGISTER_BYTE (regnum);
- if (raw_buffer != NULL)
- read_register_gen (regnum, raw_buffer);
- }
- if (addrp != NULL)
- *addrp = addr;
-}
-
/* Code to initialize the addresses of the saved registers of frame described
by FRAME_INFO. This includes special registers such as pc and fp saved in
special ways in the stack frame. sp is even more special: the address we
@@ -613,8 +568,6 @@
set_gdbarch_frame_init_saved_regs (gdbarch, ns32k_frame_init_saved_regs);
set_gdbarch_frame_args_skip (gdbarch, 8);
-
- set_gdbarch_get_saved_register (gdbarch, ns32k_get_saved_register);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
Index: vax-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/vax-tdep.c,v
retrieving revision 1.16
diff -u -r1.16 vax-tdep.c
--- vax-tdep.c 26 Jun 2002 17:20:35 -0000 1.16
+++ vax-tdep.c 6 Aug 2002 21:05:39 -0000
@@ -45,7 +45,6 @@
static gdbarch_frame_args_address_ftype vax_frame_args_address;
static gdbarch_frame_locals_address_ftype vax_frame_locals_address;
static gdbarch_frame_init_saved_regs_ftype vax_frame_init_saved_regs;
-static gdbarch_get_saved_register_ftype vax_get_saved_register;
static gdbarch_store_struct_return_ftype vax_store_struct_return;
static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value;
@@ -125,51 +124,6 @@
}
\f
static void
-vax_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
- struct frame_info *frame, int regnum,
- enum lval_type *lval)
-{
- CORE_ADDR addr;
-
- if (!target_has_registers)
- error ("No registers.");
-
- /* Normal systems don't optimize out things with register numbers. */
- if (optimized != NULL)
- *optimized = 0;
- addr = find_saved_register (frame, regnum);
- if (addr != 0)
- {
- if (lval != NULL)
- *lval = lval_memory;
- if (regnum == SP_REGNUM)
- {
- if (raw_buffer != NULL)
- {
- /* Put it back in target format. */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- (LONGEST) addr);
- }
- if (addrp != NULL)
- *addrp = 0;
- return;
- }
- if (raw_buffer != NULL)
- target_read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
- }
- else
- {
- if (lval != NULL)
- *lval = lval_register;
- addr = REGISTER_BYTE (regnum);
- if (raw_buffer != NULL)
- read_register_gen (regnum, raw_buffer);
- }
- if (addrp != NULL)
- *addrp = addr;
-}
-
-static void
vax_frame_init_saved_regs (struct frame_info *frame)
{
int regnum, regmask;
@@ -690,8 +644,6 @@
set_gdbarch_frame_init_saved_regs (gdbarch, vax_frame_init_saved_regs);
set_gdbarch_frame_args_skip (gdbarch, 4);
-
- set_gdbarch_get_saved_register (gdbarch, vax_get_saved_register);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch/rfc:alpha] Switch ALPHA, NS32k and VAX to unwind mechanism
2002-08-06 14:18 [patch/rfc:alpha] Switch ALPHA, NS32k and VAX to unwind mechanism Andrew Cagney
@ 2002-08-06 15:28 ` Jason R Thorpe
2002-08-12 12:09 ` Joel Brobecker
2002-08-13 17:25 ` Andrew Cagney
2 siblings, 0 replies; 4+ messages in thread
From: Jason R Thorpe @ 2002-08-06 15:28 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
On Tue, Aug 06, 2002 at 05:18:07PM -0400, Andrew Cagney wrote:
> Anyone with an Alpha want to try it (I think we can suck/see the vax and
> ns32k ... :-)?
I will give it a try sometime this week on Alpha.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch/rfc:alpha] Switch ALPHA, NS32k and VAX to unwind mechanism
2002-08-06 14:18 [patch/rfc:alpha] Switch ALPHA, NS32k and VAX to unwind mechanism Andrew Cagney
2002-08-06 15:28 ` Jason R Thorpe
@ 2002-08-12 12:09 ` Joel Brobecker
2002-08-13 17:25 ` Andrew Cagney
2 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2002-08-12 12:09 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
> Anyone with an Alpha want to try it (I think we can suck/see the vax and
> ns32k ... :-)?
[...]
> 2002-08-06 Andrew Cagney <ac131313@redhat.com>
>
> * vax-tdep.c (vax_get_saved_register): Delete function.
> (vax_gdbarch_init): Update.
> * ns32k-tdep.c (ns32k_get_saved_register): Delete function.
> (ns32k_gdbarch_init): Update.
> * alpha-tdep.c (alpha_get_saved_register): Delete function.
> (alpha_gdbarch_init): Update.
The change in alpha-tdep.c introduces no new regression on alpha-tru64.
Tested on a Tru64 5.1A alpha machine.
Just for the records, here are the results that I get with GNAT as the
compiler:
# of expected passes 7246
# of unexpected failures 680
# of unexpected successes 5
# of expected failures 149
# of unresolved testcases 59
# of untested testcases 3
# of unsupported tests 2
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch/rfc:alpha] Switch ALPHA, NS32k and VAX to unwind mechanism
2002-08-06 14:18 [patch/rfc:alpha] Switch ALPHA, NS32k and VAX to unwind mechanism Andrew Cagney
2002-08-06 15:28 ` Jason R Thorpe
2002-08-12 12:09 ` Joel Brobecker
@ 2002-08-13 17:25 ` Andrew Cagney
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2002-08-13 17:25 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
>> Anyone with an Alpha want to try it (I think we can suck/see the vax and
>> ns32k ... :-)?
>
> [...]
>
>> 2002-08-06 Andrew Cagney <ac131313@redhat.com>
>>
>> * vax-tdep.c (vax_get_saved_register): Delete function.
>> (vax_gdbarch_init): Update.
>> * ns32k-tdep.c (ns32k_get_saved_register): Delete function.
>> (ns32k_gdbarch_init): Update.
>> * alpha-tdep.c (alpha_get_saved_register): Delete function.
>> (alpha_gdbarch_init): Update.
>
>
> The change in alpha-tdep.c introduces no new regression on alpha-tru64.
> Tested on a Tru64 5.1A alpha machine.
>
> Just for the records, here are the results that I get with GNAT as the
> compiler:
>
> # of expected passes 7246
> # of unexpected failures 680
> # of unexpected successes 5
> # of expected failures 149
> # of unresolved testcases 59
> # of untested testcases 3
> # of unsupported tests 2
Thanks! I've committed it.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-08-14 0:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-06 14:18 [patch/rfc:alpha] Switch ALPHA, NS32k and VAX to unwind mechanism Andrew Cagney
2002-08-06 15:28 ` Jason R Thorpe
2002-08-12 12:09 ` Joel Brobecker
2002-08-13 17:25 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox