* [RFA] mips-o64-extract-return-value
@ 2003-11-20 1:08 Michael Snyder
2003-11-20 1:23 ` Andrew Cagney
0 siblings, 1 reply; 12+ messages in thread
From: Michael Snyder @ 2003-11-20 1:08 UTC (permalink / raw)
To: gdb-patches, cagney
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
Hi Andrew,
This change fixes 100s of FAILs for mips64-elf, 'cause gdb can't
find the function's return value. It follows some work that you
were apparently doing w.r.t. the mips internal register representation.
I suspect that the same thing needs to be done for mips_eabi_extract...,
but I haven't tested that. What do you think?
I'll probably try doing something similar for store_return_value too.
Michael
[-- Attachment #2: extract --]
[-- Type: text/plain, Size: 1165 bytes --]
2003-11-19 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (mips_o64_extract_return_value):
Correct for raw reg / virtual reg scheme.
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.254
diff -p -r1.254 mips-tdep.c
*** mips-tdep.c 16 Nov 2003 22:46:49 -0000 1.254
--- mips-tdep.c 20 Nov 2003 01:00:31 -0000
*************** mips_o64_extract_return_value (struct ty
*** 4681,4692 ****
return_value_location (valtype, &hi, &lo);
memcpy (valbuf + lo.buf_offset,
! regbuf + DEPRECATED_REGISTER_BYTE (lo.reg) + lo.reg_offset,
lo.len);
if (hi.len > 0)
memcpy (valbuf + hi.buf_offset,
! regbuf + DEPRECATED_REGISTER_BYTE (hi.reg) + hi.reg_offset,
hi.len);
}
--- 4681,4692 ----
return_value_location (valtype, &hi, &lo);
memcpy (valbuf + lo.buf_offset,
! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + lo.reg) + lo.reg_offset,
lo.len);
if (hi.len > 0)
memcpy (valbuf + hi.buf_offset,
! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + hi.reg) + hi.reg_offset,
hi.len);
}
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [RFA] mips-o64-extract-return-value 2003-11-20 1:08 [RFA] mips-o64-extract-return-value Michael Snyder @ 2003-11-20 1:23 ` Andrew Cagney 2003-11-20 21:28 ` Michael Snyder 2003-11-25 22:15 ` Michael Snyder 0 siblings, 2 replies; 12+ messages in thread From: Andrew Cagney @ 2003-11-20 1:23 UTC (permalink / raw) To: Michael Snyder; +Cc: gdb-patches, cagney > Hi Andrew, > > This change fixes 100s of FAILs for mips64-elf, 'cause gdb can't > find the function's return value. It follows some work that you > were apparently doing w.r.t. the mips internal register representation. > > I suspect that the same thing needs to be done for mips_eabi_extract..., > but I haven't tested that. What do you think? Ok. > I'll probably try doing something similar for store_return_value too. Rather than doing the same thing for store_return_value, take a look at the PPC's "ppc_sysv_abi_return_value". BTW, rumour has it that GCC finally fixed MIPS struct return. http://gcc.gnu.org/gcc-3.4/mips-abi.html Andrew ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFA] mips-o64-extract-return-value 2003-11-20 1:23 ` Andrew Cagney @ 2003-11-20 21:28 ` Michael Snyder 2003-11-20 21:54 ` Andrew Cagney 2003-11-25 22:15 ` Michael Snyder 1 sibling, 1 reply; 12+ messages in thread From: Michael Snyder @ 2003-11-20 21:28 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches, cagney Andrew Cagney wrote: >> Hi Andrew, >> >> This change fixes 100s of FAILs for mips64-elf, 'cause gdb can't >> find the function's return value. It follows some work that you >> were apparently doing w.r.t. the mips internal register representation. >> >> I suspect that the same thing needs to be done for mips_eabi_extract..., >> but I haven't tested that. What do you think? > > > Ok. > >> I'll probably try doing something similar for store_return_value too. > > > Rather than doing the same thing for store_return_value, take a look at > the PPC's "ppc_sysv_abi_return_value". Grep grep... ah, you mean ppc_sysv_abi_STORE_return_value. Shall I fix your change log entries for you? ;-) ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFA] mips-o64-extract-return-value 2003-11-20 21:28 ` Michael Snyder @ 2003-11-20 21:54 ` Andrew Cagney 2003-11-21 1:04 ` Michael Snyder 0 siblings, 1 reply; 12+ messages in thread From: Andrew Cagney @ 2003-11-20 21:54 UTC (permalink / raw) To: Michael Snyder; +Cc: gdb-patches > Andrew Cagney wrote: > Hi Andrew, > > This change fixes 100s of FAILs for mips64-elf, 'cause gdb can't > find the function's return value. It follows some work that you > were apparently doing w.r.t. the mips internal register representation. > > I suspect that the same thing needs to be done for mips_eabi_extract..., > but I haven't tested that. What do you think? > > > Ok. > > I'll probably try doing something similar for store_return_value too. > > > Rather than doing the same thing for store_return_value, take a look at the PPC's "ppc_sysv_abi_return_value". > > Grep grep... ah, you mean ppc_sysv_abi_STORE_return_value. > Shall I fix your change log entries for you? ;-) no? $ grep ppc_sysv_abi_store_return_value ChangeLog (ppc_sysv_abi_store_return_value): Delete function. (ppc_sysv_abi_store_return_value): Delete. * ppc-tdep.h: (ppc_sysv_abi_store_return_value): Declare. (ppc_sysv_abi_store_return_value): New function. $ grep ppc_sysv_store_return_value *.c In the MIPS, take a look at n32/n64 and o32 which I previously cleaned up (probably time to s/ xfer_return_value / return_value /). That just leaves o64 and eabi (which are still riddled with deprecated code) :-( Andrew ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFA] mips-o64-extract-return-value 2003-11-20 21:54 ` Andrew Cagney @ 2003-11-21 1:04 ` Michael Snyder 2003-11-21 16:14 ` Andrew Cagney 0 siblings, 1 reply; 12+ messages in thread From: Michael Snyder @ 2003-11-21 1:04 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches Andrew Cagney wrote: >> Andrew Cagney wrote: >> Hi Andrew, >> >> This change fixes 100s of FAILs for mips64-elf, 'cause gdb can't >> find the function's return value. It follows some work that you >> were apparently doing w.r.t. the mips internal register representation. >> >> I suspect that the same thing needs to be done for mips_eabi_extract..., >> but I haven't tested that. What do you think? >> >> >> Ok. >> >> I'll probably try doing something similar for store_return_value too. >> >> >> Rather than doing the same thing for store_return_value, take a look >> at the PPC's "ppc_sysv_abi_return_value". >> >> Grep grep... ah, you mean ppc_sysv_abi_STORE_return_value. >> Shall I fix your change log entries for you? ;-) > > > no? > > $ grep ppc_sysv_abi_store_return_value ChangeLog > (ppc_sysv_abi_store_return_value): Delete function. > (ppc_sysv_abi_store_return_value): Delete. > * ppc-tdep.h: (ppc_sysv_abi_store_return_value): Declare. > (ppc_sysv_abi_store_return_value): New function. Right -- I meant *these* changelog entries: [msnyder@reddwarf gdb]$ grep sysv_abi_return_value ChangeLog * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto. (ppc64_sysv_abi_return_value): Ditto. (ppc_sysv_abi_return_value): Ditto. (ppc64_sysv_abi_return_value): Ditto. * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): New function. * ppc-tdep.h (ppc64_sysv_abi_return_value): Declare. (ppc_sysv_abi_return_value): Declare. (ppc64_sysv_abi_return_value): New function. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFA] mips-o64-extract-return-value 2003-11-21 1:04 ` Michael Snyder @ 2003-11-21 16:14 ` Andrew Cagney 2003-11-21 21:53 ` Michael Snyder 0 siblings, 1 reply; 12+ messages in thread From: Andrew Cagney @ 2003-11-21 16:14 UTC (permalink / raw) To: Michael Snyder; +Cc: gdb-patches >>>> Rather than doing the same thing for store_return_value, take a look at the PPC's "ppc_sysv_abi_return_value". >>> >>> Grep grep... ah, you mean ppc_sysv_abi_STORE_return_value. >>> Shall I fix your change log entries for you? ;-) >>> >>> > >> no? >> >> $ grep ppc_sysv_abi_store_return_value ChangeLog >> (ppc_sysv_abi_store_return_value): Delete function. >> (ppc_sysv_abi_store_return_value): Delete. >> * ppc-tdep.h: (ppc_sysv_abi_store_return_value): Declare. >> (ppc_sysv_abi_store_return_value): New function. >> > Right -- I meant *these* changelog entries: > > [msnyder@reddwarf gdb]$ grep sysv_abi_return_value ChangeLog > * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto. > (ppc64_sysv_abi_return_value): Ditto. > (ppc_sysv_abi_return_value): Ditto. > (ppc64_sysv_abi_return_value): Ditto. > * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): New function. > * ppc-tdep.h (ppc64_sysv_abi_return_value): Declare. > (ppc_sysv_abi_return_value): Declare. > (ppc64_sysv_abi_return_value): New function. Sorry, I'm lost. What's wrong with those ChangeLogs? Andrew ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFA] mips-o64-extract-return-value 2003-11-21 16:14 ` Andrew Cagney @ 2003-11-21 21:53 ` Michael Snyder 2003-11-22 0:13 ` Andrew Cagney 0 siblings, 1 reply; 12+ messages in thread From: Michael Snyder @ 2003-11-21 21:53 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches Andrew Cagney wrote: > >>>>> Rather than doing the same thing for store_return_value, take a >>>>> look at the PPC's "ppc_sysv_abi_return_value". >>>> >>>> >>>> Grep grep... ah, you mean ppc_sysv_abi_STORE_return_value. >>>> Shall I fix your change log entries for you? ;-) >>>> >>>> >> >>> no? >>> >>> $ grep ppc_sysv_abi_store_return_value ChangeLog >>> (ppc_sysv_abi_store_return_value): Delete function. >>> (ppc_sysv_abi_store_return_value): Delete. >>> * ppc-tdep.h: (ppc_sysv_abi_store_return_value): Declare. >>> (ppc_sysv_abi_store_return_value): New function. >>> > >> Right -- I meant *these* changelog entries: >> >> [msnyder@reddwarf gdb]$ grep sysv_abi_return_value ChangeLog >> * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto. >> (ppc64_sysv_abi_return_value): Ditto. >> (ppc_sysv_abi_return_value): Ditto. >> (ppc64_sysv_abi_return_value): Ditto. >> * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): New function. >> * ppc-tdep.h (ppc64_sysv_abi_return_value): Declare. >> (ppc_sysv_abi_return_value): Declare. >> (ppc64_sysv_abi_return_value): New function. > > > Sorry, I'm lost. What's wrong with those ChangeLogs? s/abi_return_value/abi_store_return_value/g ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFA] mips-o64-extract-return-value 2003-11-21 21:53 ` Michael Snyder @ 2003-11-22 0:13 ` Andrew Cagney 2003-11-22 1:01 ` Michael Snyder 0 siblings, 1 reply; 12+ messages in thread From: Andrew Cagney @ 2003-11-22 0:13 UTC (permalink / raw) To: Michael Snyder; +Cc: Andrew Cagney, gdb-patches > > Right -- I meant *these* changelog entries: > > [msnyder@reddwarf gdb]$ grep sysv_abi_return_value ChangeLog > * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto. > (ppc64_sysv_abi_return_value): Ditto. > (ppc_sysv_abi_return_value): Ditto. > (ppc64_sysv_abi_return_value): Ditto. > * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): New function. > * ppc-tdep.h (ppc64_sysv_abi_return_value): Declare. > (ppc_sysv_abi_return_value): Declare. > (ppc64_sysv_abi_return_value): New function. > > > Sorry, I'm lost. What's wrong with those ChangeLogs? > > s/abi_return_value/abi_store_return_value/g What? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFA] mips-o64-extract-return-value 2003-11-22 0:13 ` Andrew Cagney @ 2003-11-22 1:01 ` Michael Snyder 2003-11-22 1:05 ` Daniel Jacobowitz 0 siblings, 1 reply; 12+ messages in thread From: Michael Snyder @ 2003-11-22 1:01 UTC (permalink / raw) To: Andrew Cagney; +Cc: Andrew Cagney, gdb-patches Andrew Cagney wrote: >> >> Right -- I meant *these* changelog entries: >> >> [msnyder@reddwarf gdb]$ grep sysv_abi_return_value ChangeLog >> * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto. >> (ppc64_sysv_abi_return_value): Ditto. >> (ppc_sysv_abi_return_value): Ditto. >> (ppc64_sysv_abi_return_value): Ditto. >> * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): New function. >> * ppc-tdep.h (ppc64_sysv_abi_return_value): Declare. >> (ppc_sysv_abi_return_value): Declare. >> (ppc64_sysv_abi_return_value): New function. >> >> >> Sorry, I'm lost. What's wrong with those ChangeLogs? >> >> s/abi_return_value/abi_store_return_value/g > > > What? ;-) Honest, I didn't mean to make a federal case out of this -- your original suggestion to me was to look for a function called "ppc_sysv_abi_return_value". That function doesn't exist -- but there are several references to it in the changelog. I eventually figured out that it was missing the word "store_", as in "store_return_value". So I asked if you'd like me to fix up the change log entries, so they would match the actual function name. Sorry for the confusion... ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFA] mips-o64-extract-return-value 2003-11-22 1:01 ` Michael Snyder @ 2003-11-22 1:05 ` Daniel Jacobowitz 2003-11-25 22:04 ` Michael Snyder 0 siblings, 1 reply; 12+ messages in thread From: Daniel Jacobowitz @ 2003-11-22 1:05 UTC (permalink / raw) To: gdb-patches On Fri, Nov 21, 2003 at 05:00:57PM -0800, Michael Snyder wrote: > Andrew Cagney wrote: > >> > >>Right -- I meant *these* changelog entries: > >> > >>[msnyder@reddwarf gdb]$ grep sysv_abi_return_value ChangeLog > >> * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto. > >> (ppc64_sysv_abi_return_value): Ditto. > >> (ppc_sysv_abi_return_value): Ditto. > >> (ppc64_sysv_abi_return_value): Ditto. > >> * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): New function. > >> * ppc-tdep.h (ppc64_sysv_abi_return_value): Declare. > >> (ppc_sysv_abi_return_value): Declare. > >> (ppc64_sysv_abi_return_value): New function. > >> > >> > >>Sorry, I'm lost. What's wrong with those ChangeLogs? > >> > >>s/abi_return_value/abi_store_return_value/g > > > > > >What? > > ;-) > Honest, I didn't mean to make a federal case out of this -- > your original suggestion to me was to look for a function called > "ppc_sysv_abi_return_value". That function doesn't exist -- but > there are several references to it in the changelog. I eventually > figured out that it was missing the word "store_", as in > "store_return_value". So I asked if you'd like me to fix up > the change log entries, so they would match the actual function name. > > Sorry for the confusion... Try current CVS? ppc-sysv-tdep.c:ppc_sysv_abi_return_value -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFA] mips-o64-extract-return-value 2003-11-22 1:05 ` Daniel Jacobowitz @ 2003-11-25 22:04 ` Michael Snyder 0 siblings, 0 replies; 12+ messages in thread From: Michael Snyder @ 2003-11-25 22:04 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches Daniel Jacobowitz wrote: > On Fri, Nov 21, 2003 at 05:00:57PM -0800, Michael Snyder wrote: > >>Andrew Cagney wrote: >> >>>>Right -- I meant *these* changelog entries: >>>> >>>>[msnyder@reddwarf gdb]$ grep sysv_abi_return_value ChangeLog >>>> * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto. >>>> (ppc64_sysv_abi_return_value): Ditto. >>>> (ppc_sysv_abi_return_value): Ditto. >>>> (ppc64_sysv_abi_return_value): Ditto. >>>> * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): New function. >>>> * ppc-tdep.h (ppc64_sysv_abi_return_value): Declare. >>>> (ppc_sysv_abi_return_value): Declare. >>>> (ppc64_sysv_abi_return_value): New function. >>>> >>>> >>>>Sorry, I'm lost. What's wrong with those ChangeLogs? >>>> >>>>s/abi_return_value/abi_store_return_value/g >>> >>> >>>What? >> >>;-) >>Honest, I didn't mean to make a federal case out of this -- >>your original suggestion to me was to look for a function called >>"ppc_sysv_abi_return_value". That function doesn't exist -- but >>there are several references to it in the changelog. I eventually >>figured out that it was missing the word "store_", as in >>"store_return_value". So I asked if you'd like me to fix up >>the change log entries, so they would match the actual function name. >> >>Sorry for the confusion... > > > Try current CVS? > > ppc-sysv-tdep.c:ppc_sysv_abi_return_value D'oh, you're right, my bad. Sorry Andrew -- you must have thought I was nuts... ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFA] mips-o64-extract-return-value 2003-11-20 1:23 ` Andrew Cagney 2003-11-20 21:28 ` Michael Snyder @ 2003-11-25 22:15 ` Michael Snyder 1 sibling, 0 replies; 12+ messages in thread From: Michael Snyder @ 2003-11-25 22:15 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches, cagney, Eric Christopher [-- Attachment #1: Type: text/plain, Size: 426 bytes --] Andrew Cagney wrote: >> Hi Andrew, >> >> This change fixes 100s of FAILs for mips64-elf, 'cause gdb can't >> find the function's return value. It follows some work that you >> were apparently doing w.r.t. the mips internal register representation. >> >> I suspect that the same thing needs to be done for mips_eabi_extract..., >> but I haven't tested that. What do you think? > > > Ok. Amended and committed as follows: [-- Attachment #2: mips --] [-- Type: text/plain, Size: 1968 bytes --] 2003-11-25 Michael Snyder <msnyder@redhat.com> * mips-tdep.c (mips_o64_extract_return_value): Correct for NUM_REGS (see changes 2003-06-21). (mips_eabi_extract_return_value): Ditto. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.261 diff -p -r1.261 mips-tdep.c *** mips-tdep.c 23 Nov 2003 21:49:12 -0000 1.261 --- mips-tdep.c 25 Nov 2003 22:14:08 -0000 *************** mips_eabi_extract_return_value (struct t *** 4696,4707 **** return_value_location (valtype, &hi, &lo); memcpy (valbuf + lo.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (lo.reg) + lo.reg_offset, lo.len); if (hi.len > 0) memcpy (valbuf + hi.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (hi.reg) + hi.reg_offset, hi.len); } --- 4696,4707 ---- return_value_location (valtype, &hi, &lo); memcpy (valbuf + lo.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + lo.reg) + lo.reg_offset, lo.len); if (hi.len > 0) memcpy (valbuf + hi.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + hi.reg) + hi.reg_offset, hi.len); } *************** mips_o64_extract_return_value (struct ty *** 4715,4726 **** return_value_location (valtype, &hi, &lo); memcpy (valbuf + lo.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (lo.reg) + lo.reg_offset, lo.len); if (hi.len > 0) memcpy (valbuf + hi.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (hi.reg) + hi.reg_offset, hi.len); } --- 4715,4726 ---- return_value_location (valtype, &hi, &lo); memcpy (valbuf + lo.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + lo.reg) + lo.reg_offset, lo.len); if (hi.len > 0) memcpy (valbuf + hi.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + hi.reg) + hi.reg_offset, hi.len); } ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-11-25 22:15 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-11-20 1:08 [RFA] mips-o64-extract-return-value Michael Snyder 2003-11-20 1:23 ` Andrew Cagney 2003-11-20 21:28 ` Michael Snyder 2003-11-20 21:54 ` Andrew Cagney 2003-11-21 1:04 ` Michael Snyder 2003-11-21 16:14 ` Andrew Cagney 2003-11-21 21:53 ` Michael Snyder 2003-11-22 0:13 ` Andrew Cagney 2003-11-22 1:01 ` Michael Snyder 2003-11-22 1:05 ` Daniel Jacobowitz 2003-11-25 22:04 ` Michael Snyder 2003-11-25 22:15 ` Michael Snyder
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox