* fix "too much information" bug w/ "info vector" on PowerPC
@ 2005-08-30 21:44 Paul Gilliam
2005-08-30 21:46 ` Jim Blandy
2005-08-31 20:26 ` Kevin Buettner
0 siblings, 2 replies; 21+ messages in thread
From: Paul Gilliam @ 2005-08-30 21:44 UTC (permalink / raw)
To: gdb-patches
Here is the problem: When I do 'info vector', I get ALL the registers, not just the vector registers.
This happens because a test is made to see if a given register is in the vector group. The test
compares the incoming register number against appropriate register numbers from tdep, ignoring
the fact that if, for example, there are no ev registers, the value of tdep->ppc_ev0_regnum will be
-1. Same thing for tdep->ppc_vr0_regnum.
I was temped to commit this is obvious, but wanted the warm fuzzy of peer review.
-=# Paul #=-
2005-08-30 Paul Gilliam <pgilliam@us.ibm.com>
* rs6000-tdep.c (rs6000_register_reggroup_p): don't assume that
tdep->ppc_vr0_regnum or tdep->ppc_ev0_regnum are not -1
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.241
diff -3 -c -p -r1.241 rs6000-tdep.c
*** rs6000-tdep.c 25 May 2005 03:12:13 -0000 1.241
--- rs6000-tdep.c 30 Aug 2005 21:07:25 -0000
*************** rs6000_register_reggroup_p (struct gdbar
*** 1882,1890 ****
if (group == float_reggroup)
return float_p;
! vector_p = ((regnum >= tdep->ppc_vr0_regnum
&& regnum < tdep->ppc_vr0_regnum + 32)
! || (regnum >= tdep->ppc_ev0_regnum
&& regnum < tdep->ppc_ev0_regnum + 32)
|| regnum == tdep->ppc_vrsave_regnum
|| regnum == tdep->ppc_acc_regnum
--- 1882,1892 ----
if (group == float_reggroup)
return float_p;
! vector_p = ((tdep->ppc_vr0_regnum >= 0
! && regnum >= tdep->ppc_vr0_regnum
&& regnum < tdep->ppc_vr0_regnum + 32)
! || (tdep->ppc_ev0_regnum >= 0
! && regnum >= tdep->ppc_ev0_regnum
&& regnum < tdep->ppc_ev0_regnum + 32)
|| regnum == tdep->ppc_vrsave_regnum
|| regnum == tdep->ppc_acc_regnum
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-30 21:44 fix "too much information" bug w/ "info vector" on PowerPC Paul Gilliam
@ 2005-08-30 21:46 ` Jim Blandy
2005-08-30 22:24 ` Daniel Jacobowitz
2005-08-31 20:30 ` Paul Gilliam
2005-08-31 20:26 ` Kevin Buettner
1 sibling, 2 replies; 21+ messages in thread
From: Jim Blandy @ 2005-08-30 21:46 UTC (permalink / raw)
To: pgilliam; +Cc: gdb-patches
Paul Gilliam <pgilliam@us.ibm.com> writes:
> I was temped to commit this is obvious, but wanted the warm fuzzy of
> peer review.
Well, you can have the cold slimy of a review from me. :)
Yes, that looks right. Comments:
- Could you also add comments above the definitions of
tdep->ppc_vr0_regnum and tdep->ppc_ev0_regnum in ppc-tdep.h?
Perhaps such comments could have prevented the bugs's appearance in
the first place.
- I'm not sure why the indentation in your patch is weird, but in any
case, there seems to be a preference for using spaces in new code,
not tabs.
Thanks!
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-30 21:46 ` Jim Blandy
@ 2005-08-30 22:24 ` Daniel Jacobowitz
2005-08-30 22:30 ` Jim Blandy
2005-08-31 20:30 ` Paul Gilliam
1 sibling, 1 reply; 21+ messages in thread
From: Daniel Jacobowitz @ 2005-08-30 22:24 UTC (permalink / raw)
To: Jim Blandy; +Cc: pgilliam, gdb-patches
On Tue, Aug 30, 2005 at 02:42:31PM -0700, Jim Blandy wrote:
> - I'm not sure why the indentation in your patch is weird, but in any
> case, there seems to be a preference for using spaces in new code,
> not tabs.
Er, really? GNU convention is tabs, as far as I know.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-30 22:24 ` Daniel Jacobowitz
@ 2005-08-30 22:30 ` Jim Blandy
2005-08-30 22:44 ` Daniel Jacobowitz
` (2 more replies)
0 siblings, 3 replies; 21+ messages in thread
From: Jim Blandy @ 2005-08-30 22:30 UTC (permalink / raw)
To: pgilliam; +Cc: gdb-patches
Daniel Jacobowitz <drow@false.org> writes:
> On Tue, Aug 30, 2005 at 02:42:31PM -0700, Jim Blandy wrote:
>> - I'm not sure why the indentation in your patch is weird, but in any
>> case, there seems to be a preference for using spaces in new code,
>> not tabs.
>
> Er, really? GNU convention is tabs, as far as I know.
I don't see anything in the coding standards, but maybe I've missed
something.
Avoiding tab characters makes patches read normally and avoids
problems with different tab sizes. And all the popular editors can be
configured to make the 'tab' command use either. Most of the other
Free software projects I know of have a convention of using spaces.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-30 22:30 ` Jim Blandy
@ 2005-08-30 22:44 ` Daniel Jacobowitz
2005-08-30 23:50 ` Jim Blandy
2005-08-30 22:46 ` Stan Shebs
2005-08-30 23:36 ` Mark Kettenis
2 siblings, 1 reply; 21+ messages in thread
From: Daniel Jacobowitz @ 2005-08-30 22:44 UTC (permalink / raw)
To: Jim Blandy; +Cc: pgilliam, gdb-patches
On Tue, Aug 30, 2005 at 03:22:51PM -0700, Jim Blandy wrote:
>
> Daniel Jacobowitz <drow@false.org> writes:
> > On Tue, Aug 30, 2005 at 02:42:31PM -0700, Jim Blandy wrote:
> >> - I'm not sure why the indentation in your patch is weird, but in any
> >> case, there seems to be a preference for using spaces in new code,
> >> not tabs.
> >
> > Er, really? GNU convention is tabs, as far as I know.
>
> I don't see anything in the coding standards, but maybe I've missed
> something.
>
> Avoiding tab characters makes patches read normally and avoids
> problems with different tab sizes. And all the popular editors can be
> configured to make the 'tab' command use either. Most of the other
> Free software projects I know of have a convention of using spaces.
I know all these things - but they aren't relevant to GDB. GDB has
about eight times more code using tabs than spaces (I just checked).
Let's not dribble in the opposite direction without a deliberate
decision, please.
IIRC GCC and binutils also use a tab convention.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-30 22:30 ` Jim Blandy
2005-08-30 22:44 ` Daniel Jacobowitz
@ 2005-08-30 22:46 ` Stan Shebs
2005-08-30 23:36 ` Mark Kettenis
2 siblings, 0 replies; 21+ messages in thread
From: Stan Shebs @ 2005-08-30 22:46 UTC (permalink / raw)
To: Jim Blandy; +Cc: pgilliam, gdb-patches
Jim Blandy wrote:
>Daniel Jacobowitz <drow@false.org> writes:
>
>>On Tue, Aug 30, 2005 at 02:42:31PM -0700, Jim Blandy wrote:
>>
>>>- I'm not sure why the indentation in your patch is weird, but in any
>>> case, there seems to be a preference for using spaces in new code,
>>> not tabs.
>>>
>>Er, really? GNU convention is tabs, as far as I know.
>>
>
>I don't see anything in the coding standards, but maybe I've missed
>something.
>
>Avoiding tab characters makes patches read normally and avoids
>problems with different tab sizes. And all the popular editors can be
>configured to make the 'tab' command use either. Most of the other
>Free software projects I know of have a convention of using spaces.
>
I think we're still on the tab standard, despite its flaws. I think
eCos folks decided to go the spaces way, and got hassled by
everybody else at Cygnus for it. :-)
Stan
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-30 22:30 ` Jim Blandy
2005-08-30 22:44 ` Daniel Jacobowitz
2005-08-30 22:46 ` Stan Shebs
@ 2005-08-30 23:36 ` Mark Kettenis
2005-08-31 7:52 ` Jim Blandy
2 siblings, 1 reply; 21+ messages in thread
From: Mark Kettenis @ 2005-08-30 23:36 UTC (permalink / raw)
To: jimb; +Cc: pgilliam, gdb-patches
> From: Jim Blandy <jimb@redhat.com>
> Date: Tue, 30 Aug 2005 15:22:51 -0700
>
> Daniel Jacobowitz <drow@false.org> writes:
> > On Tue, Aug 30, 2005 at 02:42:31PM -0700, Jim Blandy wrote:
> >> - I'm not sure why the indentation in your patch is weird, but in any
> >> case, there seems to be a preference for using spaces in new code,
> >> not tabs.
> >
> > Er, really? GNU convention is tabs, as far as I know.
>
> I don't see anything in the coding standards, but maybe I've missed
> something.
Well, emacs generates tabs by default.
Mark
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-30 22:44 ` Daniel Jacobowitz
@ 2005-08-30 23:50 ` Jim Blandy
0 siblings, 0 replies; 21+ messages in thread
From: Jim Blandy @ 2005-08-30 23:50 UTC (permalink / raw)
To: pgilliam; +Cc: gdb-patches
Daniel Jacobowitz <drow@false.org> writes:
> On Tue, Aug 30, 2005 at 03:22:51PM -0700, Jim Blandy wrote:
>>
>> Daniel Jacobowitz <drow@false.org> writes:
>> > On Tue, Aug 30, 2005 at 02:42:31PM -0700, Jim Blandy wrote:
>> >> - I'm not sure why the indentation in your patch is weird, but in any
>> >> case, there seems to be a preference for using spaces in new code,
>> >> not tabs.
>> >
>> > Er, really? GNU convention is tabs, as far as I know.
>>
>> I don't see anything in the coding standards, but maybe I've missed
>> something.
>>
>> Avoiding tab characters makes patches read normally and avoids
>> problems with different tab sizes. And all the popular editors can be
>> configured to make the 'tab' command use either. Most of the other
>> Free software projects I know of have a convention of using spaces.
>
> I know all these things - but they aren't relevant to GDB. GDB has
> about eight times more code using tabs than spaces (I just checked).
> Let's not dribble in the opposite direction without a deliberate
> decision, please.
Sorry for the misdirection, Paul. Please tab away.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-30 23:36 ` Mark Kettenis
@ 2005-08-31 7:52 ` Jim Blandy
0 siblings, 0 replies; 21+ messages in thread
From: Jim Blandy @ 2005-08-31 7:52 UTC (permalink / raw)
To: Mark Kettenis; +Cc: pgilliam, gdb-patches
Mark Kettenis <mark.kettenis@xs4all.nl> writes:
>> From: Jim Blandy <jimb@redhat.com>
>> Date: Tue, 30 Aug 2005 15:22:51 -0700
>>
>> Daniel Jacobowitz <drow@false.org> writes:
>> > On Tue, Aug 30, 2005 at 02:42:31PM -0700, Jim Blandy wrote:
>> >> - I'm not sure why the indentation in your patch is weird, but in any
>> >> case, there seems to be a preference for using spaces in new code,
>> >> not tabs.
>> >
>> > Er, really? GNU convention is tabs, as far as I know.
>>
>> I don't see anything in the coding standards, but maybe I've missed
>> something.
>
> Well, emacs generates tabs by default.
Ah, this is the "Emacs *is* the GNU Coding Standard" school of thought
--- to which I do occasionally subscribe. But I've got
indent-tabs-mode set to nil, after being asked to do so several times
(by other projects).
Once all the bugs in GDB's actual behavior are fixed, I'll raise the
tab/space question again. [goes back under rock]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-30 21:44 fix "too much information" bug w/ "info vector" on PowerPC Paul Gilliam
2005-08-30 21:46 ` Jim Blandy
@ 2005-08-31 20:26 ` Kevin Buettner
2005-08-31 20:32 ` Paul Gilliam
1 sibling, 1 reply; 21+ messages in thread
From: Kevin Buettner @ 2005-08-31 20:26 UTC (permalink / raw)
To: gdb-patches
On Tue, 30 Aug 2005 14:59:57 -0700
Paul Gilliam <pgilliam@us.ibm.com> wrote:
> 2005-08-30 Paul Gilliam <pgilliam@us.ibm.com>
>
> * rs6000-tdep.c (rs6000_register_reggroup_p): don't assume that
> tdep->ppc_vr0_regnum or tdep->ppc_ev0_regnum are not -1
Okay.
(But please capitalize the 'd' in "don't" in your ChangeLog entry.
Also, add a period at the end.)
Kevin
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-30 21:46 ` Jim Blandy
2005-08-30 22:24 ` Daniel Jacobowitz
@ 2005-08-31 20:30 ` Paul Gilliam
2005-08-31 20:48 ` Daniel Jacobowitz
2005-08-31 20:48 ` Jim Blandy
1 sibling, 2 replies; 21+ messages in thread
From: Paul Gilliam @ 2005-08-31 20:30 UTC (permalink / raw)
To: gdb-patches
On Tuesday 30 August 2005 14:42, Jim Blandy wrote:
> - Could you also add comments above the definitions of
> tdep->ppc_vr0_regnum and tdep->ppc_ev0_regnum in ppc-tdep.h?
> Perhaps such comments could have prevented the bugs's appearance in
> the first place.
Here is the new patch with comments added/chanded in ppc-tdep.h
If I hear no objections, I'll commit this tomorrow.
-=# Paul #=-
2005-08-30 Paul Gilliam <pgilliam@us.ibm.com>
* ppc-tdep.h: better explanation of using -1 for nonexistant registers
* rs6000-tdep.c (rs6000_register_reggroup_p): don't assume that
tdep->ppc_vr0_regnum or tdep->ppc_ev0_regnum are not -1
Index: ppc-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/ppc-tdep.h,v
retrieving revision 1.46
diff -c -3 -p -r1.46 ppc-tdep.h
*** ppc-tdep.h 25 May 2005 03:12:13 -0000 1.46
--- ppc-tdep.h 31 Aug 2005 20:06:35 -0000
*************** struct gdbarch_tdep
*** 152,177 ****
int ppc_ctr_regnum; /* Count register */
int ppc_xer_regnum; /* Integer exception register */
! /* On PPC and RS6000 variants that have no floating-point
! registers, the next two members will be -1. */
int ppc_fp0_regnum; /* floating-point register 0 */
! int ppc_fpscr_regnum; /* Floating point status and condition
! register */
! int ppc_sr0_regnum; /* segment register 0, or -1 on
! variants that have no segment
! registers. */
int ppc_mq_regnum; /* Multiply/Divide extension register */
int ppc_vr0_regnum; /* First AltiVec register */
int ppc_vrsave_regnum; /* Last AltiVec register */
int ppc_ev0_upper_regnum; /* First GPR upper half register */
int ppc_ev0_regnum; /* First ev register */
int ppc_ev31_regnum; /* Last ev register */
int ppc_acc_regnum; /* SPE 'acc' register */
int ppc_spefscr_regnum; /* SPE 'spefscr' register */
! int lr_frame_offset; /* Offset to ABI specific location where
! link register is saved. */
/* An array of integers, such that sim_regno[I] is the simulator
register number for GDB register number I, or -1 if the
--- 152,184 ----
int ppc_ctr_regnum; /* Count register */
int ppc_xer_regnum; /* Integer exception register */
! /* Not all PPC and RS6000 variants will have the registers
! represented below. A -1 is used to indicate that the register
! is not present in this variant. */
!
! /* Floating-point registers. */
int ppc_fp0_regnum; /* floating-point register 0 */
! int ppc_fpscr_regnum; /* fp status and condition register */
! /* Segment registers */
! int ppc_sr0_regnum; /* segment register 0 */
+ /* Used in some older Power architectures. */
int ppc_mq_regnum; /* Multiply/Divide extension register */
+
+ /* Altivec registers */
int ppc_vr0_regnum; /* First AltiVec register */
int ppc_vrsave_regnum; /* Last AltiVec register */
int ppc_ev0_upper_regnum; /* First GPR upper half register */
+
+ /* SPE registers. */
int ppc_ev0_regnum; /* First ev register */
int ppc_ev31_regnum; /* Last ev register */
int ppc_acc_regnum; /* SPE 'acc' register */
int ppc_spefscr_regnum; /* SPE 'spefscr' register */
!
! /* Offset to ABI specific location where link register is saved. */
! int lr_frame_offset;
/* An array of integers, such that sim_regno[I] is the simulator
register number for GDB register number I, or -1 if the
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.241
diff -c -3 -p -r1.241 rs6000-tdep.c
*** rs6000-tdep.c 25 May 2005 03:12:13 -0000 1.241
--- rs6000-tdep.c 31 Aug 2005 20:06:35 -0000
*************** rs6000_register_reggroup_p (struct gdbar
*** 1882,1890 ****
if (group == float_reggroup)
return float_p;
! vector_p = ((regnum >= tdep->ppc_vr0_regnum
&& regnum < tdep->ppc_vr0_regnum + 32)
! || (regnum >= tdep->ppc_ev0_regnum
&& regnum < tdep->ppc_ev0_regnum + 32)
|| regnum == tdep->ppc_vrsave_regnum
|| regnum == tdep->ppc_acc_regnum
--- 1882,1892 ----
if (group == float_reggroup)
return float_p;
! vector_p = ((tdep->ppc_vr0_regnum >= 0
! && regnum >= tdep->ppc_vr0_regnum
&& regnum < tdep->ppc_vr0_regnum + 32)
! || (tdep->ppc_ev0_regnum >= 0
! && regnum >= tdep->ppc_ev0_regnum
&& regnum < tdep->ppc_ev0_regnum + 32)
|| regnum == tdep->ppc_vrsave_regnum
|| regnum == tdep->ppc_acc_regnum
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-31 20:26 ` Kevin Buettner
@ 2005-08-31 20:32 ` Paul Gilliam
0 siblings, 0 replies; 21+ messages in thread
From: Paul Gilliam @ 2005-08-31 20:32 UTC (permalink / raw)
To: gdb-patches; +Cc: Kevin Buettner
On Wednesday 31 August 2005 13:17, Kevin Buettner wrote:
> On Tue, 30 Aug 2005 14:59:57 -0700
> Paul Gilliam <pgilliam@us.ibm.com> wrote:
>
> > 2005-08-30 Paul Gilliam <pgilliam@us.ibm.com>
> >
> > * rs6000-tdep.c (rs6000_register_reggroup_p): don't assume that
> > tdep->ppc_vr0_regnum or tdep->ppc_ev0_regnum are not -1
>
> Okay.
>
> (But please capitalize the 'd' in "don't" in your ChangeLog entry.
> Also, add a period at the end.)
I'll make these changes before I commit
-=# Paul #=-
>
> Kevin
>
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-31 20:30 ` Paul Gilliam
2005-08-31 20:48 ` Daniel Jacobowitz
@ 2005-08-31 20:48 ` Jim Blandy
1 sibling, 0 replies; 21+ messages in thread
From: Jim Blandy @ 2005-08-31 20:48 UTC (permalink / raw)
To: pgilliam; +Cc: gdb-patches
Paul Gilliam <pgilliam@us.ibm.com> writes:
> int ppc_mq_regnum; /* Multiply/Divide extension register */
> +
> + /* Altivec registers */
> int ppc_vr0_regnum; /* First AltiVec register */
> int ppc_vrsave_regnum; /* Last AltiVec register */
> int ppc_ev0_upper_regnum; /* First GPR upper half register */
> +
> + /* SPE registers. */
> int ppc_ev0_regnum; /* First ev register */
> int ppc_ev31_regnum; /* Last ev register */
> int ppc_acc_regnum; /* SPE 'acc' register */
> int ppc_spefscr_regnum; /* SPE 'spefscr' register */
ppc_ev0_upper_regnum goes with ppc_ev0_regnum, not the Altivec
registers. (Thanks!)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-31 20:30 ` Paul Gilliam
@ 2005-08-31 20:48 ` Daniel Jacobowitz
2005-09-01 0:30 ` Paul Gilliam
2005-09-01 18:12 ` [commit] " Paul Gilliam
2005-08-31 20:48 ` Jim Blandy
1 sibling, 2 replies; 21+ messages in thread
From: Daniel Jacobowitz @ 2005-08-31 20:48 UTC (permalink / raw)
To: Paul Gilliam; +Cc: gdb-patches
On Wed, Aug 31, 2005 at 01:23:15PM -0700, Paul Gilliam wrote:
> Here is the new patch with comments added/chanded in ppc-tdep.h
>
> If I hear no objections, I'll commit this tomorrow.
Kevin's OK'd it, so go ahead. But:
> 2005-08-30 Paul Gilliam <pgilliam@us.ibm.com>
>
> * ppc-tdep.h: better explanation of using -1 for nonexistant registers
> * rs6000-tdep.c (rs6000_register_reggroup_p): don't assume that
> tdep->ppc_vr0_regnum or tdep->ppc_ev0_regnum are not -1
* ppc-tdep.h (struct gdbarch_tdep): Better explanation of using
-1 for nonexistant registers.
* rs6000-tdep.c (rs6000_register_reggroup_p): Don't assume that
tdep->ppc_vr0_regnum and tdep->ppc_ev0_regnum are not -1.
> ! /* Not all PPC and RS6000 variants will have the registers
> ! represented below. A -1 is used to indicate that the register
> ! is not present in this variant. */
Two spaces after periods please, here and below. Also end comments
with periods where you didn't. Yes, I realize the file is inconsistent
about this.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-08-31 20:48 ` Daniel Jacobowitz
@ 2005-09-01 0:30 ` Paul Gilliam
2005-09-01 23:07 ` Jim Blandy
2005-09-01 18:12 ` [commit] " Paul Gilliam
1 sibling, 1 reply; 21+ messages in thread
From: Paul Gilliam @ 2005-09-01 0:30 UTC (permalink / raw)
To: gdb-patches; +Cc: Daniel Jacobowitz
[-- Attachment #1: Type: text/plain, Size: 310 bytes --]
Talking about spaces, tabs, and formatting, I noticed that some of the function prototypes in ppc-tdep.h are over 80 columns and
real ugly.
Here, for your consideration, are two patches to change that: one uses a short-lived macro (ppc-tdep.patch) and the other uses a
typedef (newest.patch).
-=# Paul #=-
[-- Attachment #2: ppc-tdep.patch --]
[-- Type: text/x-diff, Size: 2600 bytes --]
20050831 Paul Gilliam <pgilliam@us.ibm.com>
* ppc-tdep.h: Use a short-lived macro to shorten some ugly function
prototypes.
Index: ppc-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/ppc-tdep.h,v
retrieving revision 1.46
diff -c -3 -p -r1.46 ppc-tdep.h
*** ppc-tdep.h 25 May 2005 03:12:13 -0000 1.46
--- ppc-tdep.h 31 Aug 2005 23:07:17 -0000
*************** struct value;
*** 29,45 ****
struct regcache;
struct type;
/* From ppc-linux-tdep.c... */
! enum return_value_convention ppc_sysv_abi_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
! enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
struct value *function,
struct regcache *regcache,
--- 29,47 ----
struct regcache;
struct type;
+ #define E_RVC enum return_value_convention
+
/* From ppc-linux-tdep.c... */
! E_RVC ppc_sysv_abi_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
! E_RVC ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
struct value *function,
struct regcache *regcache,
*************** void ppc_linux_supply_fpregset (const st
*** 66,76 ****
struct regcache *regcache,
int regnum, const void *gregs, size_t size);
! enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
/* From rs6000-tdep.c... */
int altivec_register_p (int regno);
--- 68,79 ----
struct regcache *regcache,
int regnum, const void *gregs, size_t size);
! E_RVC ppc64_sysv_abi_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
! #undef E_RVC
/* From rs6000-tdep.c... */
int altivec_register_p (int regno);
[-- Attachment #3: newest.patch --]
[-- Type: text/x-diff, Size: 36784 bytes --]
20050831 Paul Gilliam <pgilliam@us.ibm.com
* defs.h: Make 'enum return_value_convention' a type:
retval_convention.
* amd64-tdep.c: Change 'enum return_value_convention' to use new type.
* amd64-tdep.c: Same thing.
* arch-utils.c: Same thing.
* arch-utils.h: Same thing.
* cris-tdep.c: Same thing.
* d10v-tdep.c: Same thing.
* gdbarch.c: Same thing.
* gdbarch.h: Same thing.
* h8300-tdep.c: Same thing.
* hppa-tdep.c: Same thing.
* i386-tdep.c: Same thing.
* iq2000-tdep.c: Same thing.
* m32r-tdep.c: Same thing.
* m68hc11-tdep.c: Same thing.
* m68k-tdep.c: Same thing.
* m88k-tdep.c: Same thing.
* mips-tdep.c: Same thing.
* ms1-tdep.c: Same thing.
* ppc-linux-tdep.c: Same thing.
* ppc-sysv-tdep.c: Same thing.
* ppc-tdep.h: Same thing.
* ppcnbsd-tdep.c: Same thing.
* s390-tdep.c: Same thing.
* sh-tdep.c: Same thing.
* sh64-tdep.c: Same thing.
* sparc-tdep.c: Same thing.
* sparc64-tdep.c: Same thing.
* v850-tdep.c: Same thing.
* vax-tdep.c: Same thing.
* xstormy16-tdep.c: Same thing.
Index: amd64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/amd64-tdep.c,v
retrieving revision 1.26
diff -c -3 -p -r1.26 amd64-tdep.c
*** amd64-tdep.c 3 Jul 2005 17:30:22 -0000 1.26
--- amd64-tdep.c 1 Sep 2005 00:21:08 -0000
*************** amd64_classify (struct type *type, enum
*** 429,435 ****
amd64_classify_aggregate (type, class);
}
! static enum return_value_convention
amd64_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
--- 429,435 ----
amd64_classify_aggregate (type, class);
}
! static retval_convention
amd64_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.132
diff -c -3 -p -r1.132 arch-utils.c
*** arch-utils.c 12 Jul 2005 12:11:44 -0000 1.132
--- arch-utils.c 1 Sep 2005 00:21:08 -0000
*************** always_use_struct_convention (int gcc_p,
*** 66,72 ****
return 1;
}
! enum return_value_convention
legacy_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 66,72 ----
return 1;
}
! ret_val_convention
legacy_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
Index: arch-utils.h
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.h,v
retrieving revision 1.78
diff -c -3 -p -r1.78 arch-utils.h
*** arch-utils.h 14 May 2005 06:07:41 -0000 1.78
--- arch-utils.h 1 Sep 2005 00:21:08 -0000
*************** extern int gdbarch_debug;
*** 35,45 ****
/* An implementation of return_value that props up architectures still
using USE_STRUCT_RETURN, EXTRACT_RETURN_VALUE and
STORE_RETURN_VALUE. See also the hacks in "stack.c". */
! enum return_value_convention legacy_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
/* Implementation of extract return value that grubs around in the
register cache. */
--- 35,45 ----
/* An implementation of return_value that props up architectures still
using USE_STRUCT_RETURN, EXTRACT_RETURN_VALUE and
STORE_RETURN_VALUE. See also the hacks in "stack.c". */
! ret_val_convention legacy_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
/* Implementation of extract return value that grubs around in the
register cache. */
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.132
diff -c -3 -p -r1.132 cris-tdep.c
*** cris-tdep.c 27 May 2005 14:36:13 -0000 1.132
--- cris-tdep.c 1 Sep 2005 00:21:08 -0000
*************** cris_extract_return_value (struct type *
*** 1895,1901 ****
/* Handle the CRIS return value convention. */
! static enum return_value_convention
cris_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 1895,1901 ----
/* Handle the CRIS return value convention. */
! static retval_convention
cris_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.150
diff -c -3 -p -r1.150 d10v-tdep.c
*** d10v-tdep.c 1 Nov 2004 14:44:57 -0000 1.150
--- d10v-tdep.c 1 Sep 2005 00:21:08 -0000
***************
*** 370,376 ****
// OBSOLETE
// OBSOLETE /* Handle the d10v's return_value convention. */
// OBSOLETE
! // OBSOLETE static enum return_value_convention
// OBSOLETE d10v_return_value (struct gdbarch *gdbarch, struct type *valtype,
// OBSOLETE struct regcache *regcache, void *readbuf,
// OBSOLETE const void *writebuf)
--- 370,376 ----
// OBSOLETE
// OBSOLETE /* Handle the d10v's return_value convention. */
// OBSOLETE
! // OBSOLETE static retval_convention
// OBSOLETE d10v_return_value (struct gdbarch *gdbarch, struct type *valtype,
// OBSOLETE struct regcache *regcache, void *readbuf,
// OBSOLETE const void *writebuf)
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.189
diff -c -3 -p -r1.189 defs.h
*** defs.h 5 Aug 2005 21:08:54 -0000 1.189
--- defs.h 1 Sep 2005 00:21:09 -0000
*************** enum auto_boolean
*** 218,224 ****
};
/* Potential ways that a function can return a value of a given type. */
! enum return_value_convention
{
/* Where the return value has been squeezed into one or more
registers. */
--- 218,224 ----
};
/* Potential ways that a function can return a value of a given type. */
! typedef enum return_value_convention
{
/* Where the return value has been squeezed into one or more
registers. */
*************** enum return_value_convention
*** 242,248 ****
register or memory slot in the stack frame. Don't use this if
the ABI doesn't explicitly guarantees this. */
RETURN_VALUE_ABI_PRESERVES_ADDRESS,
! };
/* the cleanup list records things that have to be undone
if an error happens (descriptors to be closed, memory to be freed, etc.)
--- 242,248 ----
register or memory slot in the stack frame. Don't use this if
the ABI doesn't explicitly guarantees this. */
RETURN_VALUE_ABI_PRESERVES_ADDRESS,
! } retval_convention;
/* the cleanup list records things that have to be undone
if an error happens (descriptors to be closed, memory to be freed, etc.)
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.326
diff -c -3 -p -r1.326 gdbarch.c
*** gdbarch.c 14 May 2005 06:07:41 -0000 1.326
--- gdbarch.c 1 Sep 2005 00:21:09 -0000
*************** gdbarch_return_value_p (struct gdbarch *
*** 2776,2782 ****
return gdbarch->return_value != legacy_return_value;
}
! enum return_value_convention
gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
{
gdb_assert (gdbarch != NULL);
--- 2776,2782 ----
return gdbarch->return_value != legacy_return_value;
}
! retval_convention
gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
{
gdb_assert (gdbarch != NULL);
Index: gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.282
diff -c -3 -p -r1.282 gdbarch.h
*** gdbarch.h 14 May 2005 06:07:41 -0000 1.282
--- gdbarch.h 1 Sep 2005 00:21:09 -0000
*************** extern void set_gdbarch_deprecated_store
*** 790,796 ****
extern int gdbarch_return_value_p (struct gdbarch *gdbarch);
typedef enum return_value_convention (gdbarch_return_value_ftype) (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf);
! extern enum return_value_convention gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf);
extern void set_gdbarch_return_value (struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value);
/* The deprecated methods EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
--- 790,796 ----
extern int gdbarch_return_value_p (struct gdbarch *gdbarch);
typedef enum return_value_convention (gdbarch_return_value_ftype) (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf);
! extern retval_convention gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf);
extern void set_gdbarch_return_value (struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value);
/* The deprecated methods EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
Index: h8300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/h8300-tdep.c,v
retrieving revision 1.101
diff -c -3 -p -r1.101 h8300-tdep.c
*** h8300-tdep.c 29 Apr 2005 14:21:22 -0000 1.101
--- h8300-tdep.c 1 Sep 2005 00:21:09 -0000
*************** h8300h_store_return_value (struct type *
*** 902,908 ****
}
}
! static enum return_value_convention
h8300_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
--- 902,908 ----
}
}
! static retval_convention
h8300_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
*************** h8300_return_value (struct gdbarch *gdba
*** 916,922 ****
return RETURN_VALUE_REGISTER_CONVENTION;
}
! static enum return_value_convention
h8300h_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
--- 916,922 ----
return RETURN_VALUE_REGISTER_CONVENTION;
}
! static retval_convention
h8300h_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.211
diff -c -3 -p -r1.211 hppa-tdep.c
*** hppa-tdep.c 18 Jul 2005 20:34:09 -0000 1.211
--- hppa-tdep.c 1 Sep 2005 00:21:10 -0000
*************** hppa64_push_dummy_call (struct gdbarch *
*** 1032,1038 ****
/* Handle 32/64-bit struct return conventions. */
! static enum return_value_convention
hppa32_return_value (struct gdbarch *gdbarch,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
--- 1032,1038 ----
/* Handle 32/64-bit struct return conventions. */
! static retval_convention
hppa32_return_value (struct gdbarch *gdbarch,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
*************** hppa32_return_value (struct gdbarch *gdb
*** 1072,1078 ****
return RETURN_VALUE_STRUCT_CONVENTION;
}
! static enum return_value_convention
hppa64_return_value (struct gdbarch *gdbarch,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
--- 1072,1078 ----
return RETURN_VALUE_STRUCT_CONVENTION;
}
! static retval_convention
hppa64_return_value (struct gdbarch *gdbarch,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.217
diff -c -3 -p -r1.217 i386-tdep.c
*** i386-tdep.c 18 Jul 2005 19:18:41 -0000 1.217
--- i386-tdep.c 1 Sep 2005 00:21:10 -0000
*************** i386_reg_struct_return_p (struct gdbarch
*** 1447,1453 ****
and copy it into READBUF. If WRITEBUF is non-zero, write the value
from WRITEBUF into REGCACHE. */
! static enum return_value_convention
i386_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 1447,1453 ----
and copy it into READBUF. If WRITEBUF is non-zero, write the value
from WRITEBUF into REGCACHE. */
! static retval_convention
i386_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
Index: iq2000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/iq2000-tdep.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 iq2000-tdep.c
*** iq2000-tdep.c 8 Mar 2005 08:59:47 -0000 1.1
--- iq2000-tdep.c 1 Sep 2005 00:21:10 -0000
*************** iq2000_extract_return_value (struct type
*** 589,595 ****
}
}
! static enum return_value_convention
iq2000_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
--- 589,595 ----
}
}
! static retval_convention
iq2000_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
Index: m32r-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m32r-tdep.c,v
retrieving revision 1.38
diff -c -3 -p -r1.38 m32r-tdep.c
*** m32r-tdep.c 1 May 2005 19:58:54 -0000 1.38
--- m32r-tdep.c 1 Sep 2005 00:21:10 -0000
*************** m32r_extract_return_value (struct type *
*** 789,795 ****
}
}
! enum return_value_convention
m32r_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, void *readbuf,
const void *writebuf)
--- 789,795 ----
}
}
! retval_convention
m32r_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, void *readbuf,
const void *writebuf)
Index: m68hc11-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v
retrieving revision 1.108
diff -c -3 -p -r1.108 m68hc11-tdep.c
*** m68hc11-tdep.c 11 Feb 2005 04:05:56 -0000 1.108
--- m68hc11-tdep.c 1 Sep 2005 00:21:10 -0000
*************** m68hc11_extract_return_value (struct typ
*** 1322,1328 ****
}
}
! enum return_value_convention
m68hc11_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, void *readbuf,
const void *writebuf)
--- 1322,1328 ----
}
}
! retval_convention
m68hc11_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, void *readbuf,
const void *writebuf)
Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.104
diff -c -3 -p -r1.104 m68k-tdep.c
*** m68k-tdep.c 31 Aug 2005 20:48:21 -0000 1.104
--- m68k-tdep.c 1 Sep 2005 00:21:10 -0000
*************** m68k_reg_struct_return_p (struct gdbarch
*** 325,331 ****
and copy it into READBUF. If WRITEBUF is non-zero, write the value
from WRITEBUF into REGCACHE. */
! static enum return_value_convention
m68k_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 325,331 ----
and copy it into READBUF. If WRITEBUF is non-zero, write the value
from WRITEBUF into REGCACHE. */
! static retval_convention
m68k_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
*************** m68k_return_value (struct gdbarch *gdbar
*** 360,366 ****
return RETURN_VALUE_REGISTER_CONVENTION;
}
! static enum return_value_convention
m68k_svr4_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 360,366 ----
return RETURN_VALUE_REGISTER_CONVENTION;
}
! static retval_convention
m68k_svr4_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
Index: m88k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m88k-tdep.c,v
retrieving revision 1.18
diff -c -3 -p -r1.18 m88k-tdep.c
*** m88k-tdep.c 12 Jun 2005 11:53:00 -0000 1.18
--- m88k-tdep.c 1 Sep 2005 00:21:11 -0000
*************** m88k_unwind_dummy_id (struct gdbarch *ar
*** 382,388 ****
and copy it into READBUF. If WRITEBUF is non-zero, write the value
from WRITEBUF into REGCACHE. */
! static enum return_value_convention
m88k_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 382,388 ----
and copy it into READBUF. If WRITEBUF is non-zero, write the value
from WRITEBUF into REGCACHE. */
! static retval_convention
m88k_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.383
diff -c -3 -p -r1.383 mips-tdep.c
*** mips-tdep.c 1 Jul 2005 19:29:46 -0000 1.383
--- mips-tdep.c 1 Sep 2005 00:21:11 -0000
*************** mips_eabi_push_dummy_call (struct gdbarc
*** 2649,2655 ****
/* Determin the return value convention being used. */
! static enum return_value_convention
mips_eabi_return_value (struct gdbarch *gdbarch,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
--- 2649,2655 ----
/* Determin the return value convention being used. */
! static retval_convention
mips_eabi_return_value (struct gdbarch *gdbarch,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
*************** mips_n32n64_push_dummy_call (struct gdba
*** 2899,2905 ****
return sp;
}
! static enum return_value_convention
mips_n32n64_return_value (struct gdbarch *gdbarch,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
--- 2899,2905 ----
return sp;
}
! static retval_convention
mips_n32n64_return_value (struct gdbarch *gdbarch,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
*************** mips_o32_push_dummy_call (struct gdbarch
*** 3314,3320 ****
return sp;
}
! static enum return_value_convention
mips_o32_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
--- 3314,3320 ----
return sp;
}
! static retval_convention
mips_o32_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
*************** mips_o64_push_dummy_call (struct gdbarch
*** 3768,3774 ****
return sp;
}
! static enum return_value_convention
mips_o64_return_value (struct gdbarch *gdbarch,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
--- 3768,3774 ----
return sp;
}
! static retval_convention
mips_o64_return_value (struct gdbarch *gdbarch,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
Index: ms1-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ms1-tdep.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 ms1-tdep.c
*** ms1-tdep.c 15 Aug 2005 21:46:38 -0000 1.1
--- ms1-tdep.c 1 Sep 2005 00:21:11 -0000
*************** ms1_register_reggroup_p (struct gdbarch
*** 246,252 ****
WRITEBUF respectively using REGCACHE for the register
values. */
! static enum return_value_convention
ms1_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 246,252 ----
WRITEBUF respectively using REGCACHE for the register
values. */
! static retval_convention
ms1_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
Index: ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.75
diff -c -3 -p -r1.75 ppc-linux-tdep.c
*** ppc-linux-tdep.c 13 Jul 2005 16:29:04 -0000 1.75
--- ppc-linux-tdep.c 1 Sep 2005 00:21:11 -0000
*************** ppc_linux_memory_remove_breakpoint (CORE
*** 485,491 ****
structures, no matter their size, are put in memory. Vectors,
which were added later, do get returned in a register though. */
! static enum return_value_convention
ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 485,491 ----
structures, no matter their size, are put in memory. Vectors,
which were added later, do get returned in a register though. */
! static retval_convention
ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
Index: ppc-sysv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-sysv-tdep.c,v
retrieving revision 1.31
diff -c -3 -p -r1.31 ppc-sysv-tdep.c
*** ppc-sysv-tdep.c 17 Aug 2005 07:44:13 -0000 1.31
--- ppc-sysv-tdep.c 1 Sep 2005 00:21:11 -0000
*************** ppc_sysv_abi_push_dummy_call (struct gdb
*** 343,349 ****
GCC (broken): Small struct values right (instead of left) aligned
when returned in general-purpose registers. */
! static enum return_value_convention
do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, void *readbuf,
const void *writebuf, int broken_gcc)
--- 343,349 ----
GCC (broken): Small struct values right (instead of left) aligned
when returned in general-purpose registers. */
! static retval_convention
do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, void *readbuf,
const void *writebuf, int broken_gcc)
*************** do_ppc_sysv_return_value (struct gdbarch
*** 514,520 ****
return RETURN_VALUE_STRUCT_CONVENTION;
}
! enum return_value_convention
ppc_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 514,520 ----
return RETURN_VALUE_STRUCT_CONVENTION;
}
! retval_convention
ppc_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
*************** ppc_sysv_abi_return_value (struct gdbarc
*** 523,529 ****
writebuf, 0);
}
! enum return_value_convention
ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
struct type *valtype,
struct regcache *regcache,
--- 523,529 ----
writebuf, 0);
}
! retval_convention
ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
struct type *valtype,
struct regcache *regcache,
*************** ppc64_sysv_abi_push_dummy_call (struct g
*** 877,883 ****
copy the buffer to the corresponding register return-value location
location; when READBUF is non-NULL, fill the buffer from the
corresponding register return-value location. */
! enum return_value_convention
ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 877,883 ----
copy the buffer to the corresponding register return-value location
location; when READBUF is non-NULL, fill the buffer from the
corresponding register return-value location. */
! retval_convention
ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
Index: ppc-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/ppc-tdep.h,v
retrieving revision 1.46
diff -c -3 -p -r1.46 ppc-tdep.h
*** ppc-tdep.h 25 May 2005 03:12:13 -0000 1.46
--- ppc-tdep.h 1 Sep 2005 00:21:11 -0000
*************** struct regcache;
*** 30,45 ****
struct type;
/* From ppc-linux-tdep.c... */
! enum return_value_convention ppc_sysv_abi_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
! enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
struct value *function,
struct regcache *regcache,
--- 30,45 ----
struct type;
/* From ppc-linux-tdep.c... */
! retval_convention ppc_sysv_abi_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
! retval_convention ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
struct value *function,
struct regcache *regcache,
*************** void ppc_linux_supply_fpregset (const st
*** 66,76 ****
struct regcache *regcache,
int regnum, const void *gregs, size_t size);
! enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
/* From rs6000-tdep.c... */
int altivec_register_p (int regno);
--- 66,76 ----
struct regcache *regcache,
int regnum, const void *gregs, size_t size);
! retval_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch,
! struct type *valtype,
! struct regcache *regcache,
! gdb_byte *readbuf,
! const gdb_byte *writebuf);
/* From rs6000-tdep.c... */
int altivec_register_p (int regno);
Index: ppcnbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppcnbsd-tdep.c,v
retrieving revision 1.26
diff -c -3 -p -r1.26 ppcnbsd-tdep.c
*** ppcnbsd-tdep.c 11 Feb 2005 04:06:01 -0000 1.26
--- ppcnbsd-tdep.c 1 Sep 2005 00:21:12 -0000
*************** static struct core_fns ppcnbsd_elfcore_f
*** 244,250 ****
convention but, 1.6 switched to the below broken convention. For
the moment use the broken convention. Ulgh!. */
! static enum return_value_convention
ppcnbsd_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, void *readbuf,
const void *writebuf)
--- 244,250 ----
convention but, 1.6 switched to the below broken convention. For
the moment use the broken convention. Ulgh!. */
! static retval_convention
ppcnbsd_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, void *readbuf,
const void *writebuf)
Index: s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.147
diff -c -3 -p -r1.147 s390-tdep.c
*** s390-tdep.c 15 Aug 2005 17:36:48 -0000 1.147
--- s390-tdep.c 1 Sep 2005 00:21:12 -0000
*************** s390_frame_align (struct gdbarch *gdbarc
*** 2714,2720 ****
/* Function return value access. */
! static enum return_value_convention
s390_return_value_convention (struct gdbarch *gdbarch, struct type *type)
{
int length = TYPE_LENGTH (type);
--- 2714,2720 ----
/* Function return value access. */
! static retval_convention
s390_return_value_convention (struct gdbarch *gdbarch, struct type *type)
{
int length = TYPE_LENGTH (type);
*************** s390_return_value_convention (struct gdb
*** 2733,2746 ****
}
}
! static enum return_value_convention
s390_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *out,
const gdb_byte *in)
{
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
int length = TYPE_LENGTH (type);
! enum return_value_convention rvc =
s390_return_value_convention (gdbarch, type);
if (in)
{
--- 2733,2746 ----
}
}
! static retval_convention
s390_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *out,
const gdb_byte *in)
{
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
int length = TYPE_LENGTH (type);
! retval_convention rvc =
s390_return_value_convention (gdbarch, type);
if (in)
{
Index: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.187
diff -c -3 -p -r1.187 sh-tdep.c
*** sh-tdep.c 27 Apr 2005 20:48:25 -0000 1.187
--- sh-tdep.c 1 Sep 2005 00:21:12 -0000
*************** sh_store_return_value_fpu (struct type *
*** 1282,1288 ****
sh_store_return_value_nofpu (type, regcache, valbuf);
}
! static enum return_value_convention
sh_return_value_nofpu (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
--- 1282,1288 ----
sh_store_return_value_nofpu (type, regcache, valbuf);
}
! static retval_convention
sh_return_value_nofpu (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
*************** sh_return_value_nofpu (struct gdbarch *g
*** 1296,1302 ****
return RETURN_VALUE_REGISTER_CONVENTION;
}
! static enum return_value_convention
sh_return_value_fpu (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
--- 1296,1302 ----
return RETURN_VALUE_REGISTER_CONVENTION;
}
! static retval_convention
sh_return_value_fpu (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
Index: sh64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh64-tdep.c,v
retrieving revision 1.38
diff -c -3 -p -r1.38 sh64-tdep.c
*** sh64-tdep.c 2 May 2005 15:23:37 -0000 1.38
--- sh64-tdep.c 1 Sep 2005 00:21:12 -0000
*************** sh64_store_return_value (struct type *ty
*** 1310,1316 ****
}
}
! static enum return_value_convention
sh64_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
--- 1310,1316 ----
}
}
! static retval_convention
sh64_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.165
diff -c -3 -p -r1.165 sparc-tdep.c
*** sparc-tdep.c 13 Aug 2005 22:12:24 -0000 1.165
--- sparc-tdep.c 1 Sep 2005 00:21:13 -0000
*************** sparc32_store_return_value (struct type
*** 951,957 ****
}
}
! static enum return_value_convention
sparc32_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 951,957 ----
}
}
! static retval_convention
sparc32_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
Index: sparc64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc64-tdep.c,v
retrieving revision 1.24
diff -c -3 -p -r1.24 sparc64-tdep.c
*** sparc64-tdep.c 12 Jun 2005 11:10:56 -0000 1.24
--- sparc64-tdep.c 1 Sep 2005 00:21:13 -0000
*************** sparc64_store_return_value (struct type
*** 1087,1093 ****
}
}
! static enum return_value_convention
sparc64_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 1087,1093 ----
}
}
! static retval_convention
sparc64_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
Index: v850-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/v850-tdep.c,v
retrieving revision 1.94
diff -c -3 -p -r1.94 v850-tdep.c
*** v850-tdep.c 18 May 2005 08:52:18 -0000 1.94
--- v850-tdep.c 1 Sep 2005 00:21:13 -0000
*************** v850_store_return_value (struct type *ty
*** 792,798 ****
}
}
! static enum return_value_convention
v850_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
--- 792,798 ----
}
}
! static retval_convention
v850_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
Index: vax-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/vax-tdep.c,v
retrieving revision 1.90
diff -c -3 -p -r1.90 vax-tdep.c
*** vax-tdep.c 12 Jun 2005 11:17:57 -0000 1.90
--- vax-tdep.c 1 Sep 2005 00:21:13 -0000
*************** vax_unwind_dummy_id (struct gdbarch *gdb
*** 201,207 ****
}
\f
! static enum return_value_convention
vax_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
--- 201,207 ----
}
\f
! static retval_convention
vax_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
Index: xstormy16-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/xstormy16-tdep.c,v
retrieving revision 1.88
diff -c -3 -p -r1.88 xstormy16-tdep.c
*** xstormy16-tdep.c 11 Feb 2005 18:13:54 -0000 1.88
--- xstormy16-tdep.c 1 Sep 2005 00:21:13 -0000
*************** xstormy16_store_return_value (struct typ
*** 199,205 ****
}
}
! static enum return_value_convention
xstormy16_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
--- 199,205 ----
}
}
! static retval_convention
xstormy16_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
void *readbuf, const void *writebuf)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [commit] fix "too much information" bug w/ "info vector" on PowerPC
2005-08-31 20:48 ` Daniel Jacobowitz
2005-09-01 0:30 ` Paul Gilliam
@ 2005-09-01 18:12 ` Paul Gilliam
1 sibling, 0 replies; 21+ messages in thread
From: Paul Gilliam @ 2005-09-01 18:12 UTC (permalink / raw)
To: gdb-patches; +Cc: Daniel Jacobowitz
Thank you all for you help and advice. Here is the patch I just committed:
20050901 Paul Gilliam <pgilliam@us.ibm.com>
* ppc-tdep.h (struct gdbarch_tdep): Better explanation of using
-1 for nonexistant registers.
* rs6000-tdep.c (rs6000_register_reggroup_p): Don't assume that
tdep->ppc_vr0_regnum and tdep->ppc_ev0_regnum are not -1.
Index: ppc-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/ppc-tdep.h,v
retrieving revision 1.46
diff -a -u -r1.46 ppc-tdep.h
--- ppc-tdep.h 25 May 2005 03:12:13 -0000 1.46
+++ ppc-tdep.h 1 Sep 2005 17:56:58 -0000
@@ -152,26 +152,33 @@
int ppc_ctr_regnum; /* Count register */
int ppc_xer_regnum; /* Integer exception register */
- /* On PPC and RS6000 variants that have no floating-point
- registers, the next two members will be -1. */
+ /* Not all PPC and RS6000 variants will have the registers
+ represented below. A -1 is used to indicate that the register
+ is not present in this variant. */
+
+ /* Floating-point registers. */
int ppc_fp0_regnum; /* floating-point register 0 */
- int ppc_fpscr_regnum; /* Floating point status and condition
- register */
+ int ppc_fpscr_regnum; /* fp status and condition register */
+
+ /* Segment registers. */
+ int ppc_sr0_regnum; /* segment register 0 */
- int ppc_sr0_regnum; /* segment register 0, or -1 on
- variants that have no segment
- registers. */
+ /* Multiplier-Quotient Register (older POWER architectures only). */
+ int ppc_mq_regnum;
- int ppc_mq_regnum; /* Multiply/Divide extension register */
+ /* Altivec registers. */
int ppc_vr0_regnum; /* First AltiVec register */
int ppc_vrsave_regnum; /* Last AltiVec register */
+
+ /* SPE registers. */
int ppc_ev0_upper_regnum; /* First GPR upper half register */
int ppc_ev0_regnum; /* First ev register */
int ppc_ev31_regnum; /* Last ev register */
int ppc_acc_regnum; /* SPE 'acc' register */
int ppc_spefscr_regnum; /* SPE 'spefscr' register */
- int lr_frame_offset; /* Offset to ABI specific location where
- link register is saved. */
+
+ /* Offset to ABI specific location where link register is saved. */
+ int lr_frame_offset;
/* An array of integers, such that sim_regno[I] is the simulator
register number for GDB register number I, or -1 if the
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.241
diff -a -u -r1.241 rs6000-tdep.c
--- rs6000-tdep.c 25 May 2005 03:12:13 -0000 1.241
+++ rs6000-tdep.c 1 Sep 2005 17:56:58 -0000
@@ -1882,9 +1882,11 @@
if (group == float_reggroup)
return float_p;
- vector_p = ((regnum >= tdep->ppc_vr0_regnum
+ vector_p = ((tdep->ppc_vr0_regnum >= 0
+ && regnum >= tdep->ppc_vr0_regnum
&& regnum < tdep->ppc_vr0_regnum + 32)
- || (regnum >= tdep->ppc_ev0_regnum
+ || (tdep->ppc_ev0_regnum >= 0
+ && regnum >= tdep->ppc_ev0_regnum
&& regnum < tdep->ppc_ev0_regnum + 32)
|| regnum == tdep->ppc_vrsave_regnum
|| regnum == tdep->ppc_acc_regnum
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-09-01 0:30 ` Paul Gilliam
@ 2005-09-01 23:07 ` Jim Blandy
2005-09-02 0:55 ` Daniel Jacobowitz
0 siblings, 1 reply; 21+ messages in thread
From: Jim Blandy @ 2005-09-01 23:07 UTC (permalink / raw)
To: pgilliam; +Cc: gdb-patches, Daniel Jacobowitz
Paul Gilliam <pgilliam@us.ibm.com> writes:
> Talking about spaces, tabs, and formatting, I noticed that some of the function prototypes in ppc-tdep.h are over 80 columns and
> real ugly.
>
> Here, for your consideration, are two patches to change that: one uses a short-lived macro (ppc-tdep.patch) and the other uses a
> typedef (newest.patch).
If I were to use a typedef, I'd put it in gdbarch.h and call it
gdb_retval_convention_t; there's nothing special about ppc-tdep.h's
needs.
The following is also legal C, Emacs-friendly, and gdb_indent.sh-friendly:
enum return_value_convention (ppc_sysv_abi_return_value
(struct gdbarch *gdbarch,
struct type *valtype,
struct regcache *regcache,
gdb_byte *readbuf,
const gdb_byte *writebuf));
I used this once before, but Mark Kettenis declared it "weird" or
something and asked me to take it out. :) Be that as it may, I think
it's better than the macro or the local typedef.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-09-01 23:07 ` Jim Blandy
@ 2005-09-02 0:55 ` Daniel Jacobowitz
2005-09-02 14:26 ` Paul Gilliam
2005-09-06 18:14 ` Jim Blandy
0 siblings, 2 replies; 21+ messages in thread
From: Daniel Jacobowitz @ 2005-09-02 0:55 UTC (permalink / raw)
To: Jim Blandy; +Cc: pgilliam, gdb-patches
On Thu, Sep 01, 2005 at 04:06:08PM -0700, Jim Blandy wrote:
> Paul Gilliam <pgilliam@us.ibm.com> writes:
>
> > Talking about spaces, tabs, and formatting, I noticed that some of the function prototypes in ppc-tdep.h are over 80 columns and
> > real ugly.
> >
> > Here, for your consideration, are two patches to change that: one uses a short-lived macro (ppc-tdep.patch) and the other uses a
> > typedef (newest.patch).
>
> If I were to use a typedef, I'd put it in gdbarch.h and call it
> gdb_retval_convention_t; there's nothing special about ppc-tdep.h's
> needs.
>
> The following is also legal C, Emacs-friendly, and gdb_indent.sh-friendly:
>
> enum return_value_convention (ppc_sysv_abi_return_value
> (struct gdbarch *gdbarch,
> struct type *valtype,
> struct regcache *regcache,
> gdb_byte *readbuf,
> const gdb_byte *writebuf));
>
> I used this once before, but Mark Kettenis declared it "weird" or
> something and asked me to take it out. :) Be that as it may, I think
> it's better than the macro or the local typedef.
It is weird :-P
What's so wrong with
enum return_value_convention ppc_sysv_abi_return_value
(struct gdbarch *, struct type *, struct regcache *,
gdb_byte *, const gdb_byte *);
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-09-02 0:55 ` Daniel Jacobowitz
@ 2005-09-02 14:26 ` Paul Gilliam
2005-09-06 18:14 ` Jim Blandy
1 sibling, 0 replies; 21+ messages in thread
From: Paul Gilliam @ 2005-09-02 14:26 UTC (permalink / raw)
To: gdb-patches; +Cc: Daniel Jacobowitz, Jim Blandy
On Thursday 01 September 2005 17:55, Daniel Jacobowitz wrote:
> On Thu, Sep 01, 2005 at 04:06:08PM -0700, Jim Blandy wrote:
> > Paul Gilliam <pgilliam@us.ibm.com> writes:
> >
> > > Talking about spaces, tabs, and formatting, I noticed that some of the function prototypes in ppc-tdep.h are over 80 columns and
> > > real ugly.
> > >
> > > Here, for your consideration, are two patches to change that: one uses a short-lived macro (ppc-tdep.patch) and the other uses a
> > > typedef (newest.patch).
> >
> > If I were to use a typedef, I'd put it in gdbarch.h and call it
> > gdb_retval_convention_t; there's nothing special about ppc-tdep.h's
> > needs.
> >
> > The following is also legal C, Emacs-friendly, and gdb_indent.sh-friendly:
> >
> > enum return_value_convention (ppc_sysv_abi_return_value
> > (struct gdbarch *gdbarch,
> > struct type *valtype,
> > struct regcache *regcache,
> > gdb_byte *readbuf,
> > const gdb_byte *writebuf));
> >
> > I used this once before, but Mark Kettenis declared it "weird" or
> > something and asked me to take it out. :) Be that as it may, I think
> > it's better than the macro or the local typedef.
>
> It is weird :-P
>
> What's so wrong with
>
> enum return_value_convention ppc_sysv_abi_return_value
> (struct gdbarch *, struct type *, struct regcache *,
> gdb_byte *, const gdb_byte *);
>
I noticed this style in other files:
enum return_value_convention
ppc_sysv_abi_return_value (
struct gdbarch *,struct type *, struct regcache *,
gdb_byte *, const gdb_byte *);
Which has the advantage of being able to search for the name with /^name/,
for those who don't have 'ctabs' or 'etabs' :-) And for those compulsive commenters:
enum return_value_convention
ppc_sysv_abi_return_value (
struct gdbarch *, /* Silly comment about this argument */
struct type *, /* Silly comment about this argument */
struct regcache *, /* Silly comment about this argument */
gdb_byte *, /* Silly comment about this argument */
const gdb_byte *); /* Silly comment about this argument */
which realy works best on a definition, rather than a declartation.
If someone wanted too, they could spend years trying to make the source consistant, not to
mention how disruptive it would be to on-going development/support.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-09-02 0:55 ` Daniel Jacobowitz
2005-09-02 14:26 ` Paul Gilliam
@ 2005-09-06 18:14 ` Jim Blandy
2005-09-06 18:21 ` Daniel Jacobowitz
1 sibling, 1 reply; 21+ messages in thread
From: Jim Blandy @ 2005-09-06 18:14 UTC (permalink / raw)
To: pgilliam; +Cc: gdb-patches
Daniel Jacobowitz <drow@false.org> writes:
> What's so wrong with
>
> enum return_value_convention ppc_sysv_abi_return_value
> (struct gdbarch *, struct type *, struct regcache *,
> gdb_byte *, const gdb_byte *);
Emacs doesn't preserve it.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: fix "too much information" bug w/ "info vector" on PowerPC
2005-09-06 18:14 ` Jim Blandy
@ 2005-09-06 18:21 ` Daniel Jacobowitz
0 siblings, 0 replies; 21+ messages in thread
From: Daniel Jacobowitz @ 2005-09-06 18:21 UTC (permalink / raw)
To: Jim Blandy; +Cc: pgilliam, gdb-patches
On Tue, Sep 06, 2005 at 11:12:59AM -0700, Jim Blandy wrote:
>
> Daniel Jacobowitz <drow@false.org> writes:
> > What's so wrong with
> >
> > enum return_value_convention ppc_sysv_abi_return_value
> > (struct gdbarch *, struct type *, struct regcache *,
> > gdb_byte *, const gdb_byte *);
>
> Emacs doesn't preserve it.
Huh. Oh well.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2005-09-06 18:21 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-30 21:44 fix "too much information" bug w/ "info vector" on PowerPC Paul Gilliam
2005-08-30 21:46 ` Jim Blandy
2005-08-30 22:24 ` Daniel Jacobowitz
2005-08-30 22:30 ` Jim Blandy
2005-08-30 22:44 ` Daniel Jacobowitz
2005-08-30 23:50 ` Jim Blandy
2005-08-30 22:46 ` Stan Shebs
2005-08-30 23:36 ` Mark Kettenis
2005-08-31 7:52 ` Jim Blandy
2005-08-31 20:30 ` Paul Gilliam
2005-08-31 20:48 ` Daniel Jacobowitz
2005-09-01 0:30 ` Paul Gilliam
2005-09-01 23:07 ` Jim Blandy
2005-09-02 0:55 ` Daniel Jacobowitz
2005-09-02 14:26 ` Paul Gilliam
2005-09-06 18:14 ` Jim Blandy
2005-09-06 18:21 ` Daniel Jacobowitz
2005-09-01 18:12 ` [commit] " Paul Gilliam
2005-08-31 20:48 ` Jim Blandy
2005-08-31 20:26 ` Kevin Buettner
2005-08-31 20:32 ` Paul Gilliam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox