* remove enum from ppc-linux-tdep.c
@ 2003-01-26 19:21 Olaf Hering
2003-01-26 19:30 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2003-01-26 19:21 UTC (permalink / raw)
To: gdb, Will Schmidt
Hi,
this patch uses the defines from asm/elf.h instead of the hardcoded
values. Would that have any bad side effects? asm-ppc64 includes elf.h
via sigcontext.h and that will result in a syntax error.
Index: ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.22
diff -u -p -r1.22 ppc-linux-tdep.c
--- ppc-linux-tdep.c 4 Jan 2003 23:38:45 -0000 1.22
+++ ppc-linux-tdep.c 26 Jan 2003 19:15:27 -0000
@@ -36,6 +36,8 @@
#include "solib-svr4.h"
#include "ppc-tdep.h"
+#include "<asm/elf.h>"
+
/* The following two instructions are used in the signal trampoline
code on GNU/Linux PPC. */
#define INSTR_LI_R0_0x7777 0x38007777
@@ -607,12 +609,6 @@ ppc_linux_svr4_fetch_link_map_offsets (v
return lmp;
}
-
-enum {
- ELF_NGREG = 48,
- ELF_NFPREG = 33,
- ELF_NVRREG = 33
-};
enum {
ELF_GREGSET_SIZE = (ELF_NGREG * 4),
--
A: No.
Q: Should I include quotations after my reply?
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: remove enum from ppc-linux-tdep.c
2003-01-26 19:21 remove enum from ppc-linux-tdep.c Olaf Hering
@ 2003-01-26 19:30 ` Daniel Jacobowitz
2003-01-26 19:38 ` Olaf Hering
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2003-01-26 19:30 UTC (permalink / raw)
To: Olaf Hering; +Cc: gdb, Will Schmidt
On Sun, Jan 26, 2003 at 08:20:55PM +0100, Olaf Hering wrote:
> Hi,
>
> this patch uses the defines from asm/elf.h instead of the hardcoded
> values. Would that have any bad side effects? asm-ppc64 includes elf.h
> via sigcontext.h and that will result in a syntax error.
> +#include "<asm/elf.h>"
First of all, that's a syntax error :)
Secondly, tdep stands for target dependant. This needs to work from
any host platform. The right thing to do is probably to rename the
enum: PPC_LINUX_ELF_NGREG, or something like that.
[Or fix your headers. That's pretty bad namespace polution. It
shouldn't do that.]
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: remove enum from ppc-linux-tdep.c
2003-01-26 19:30 ` Daniel Jacobowitz
@ 2003-01-26 19:38 ` Olaf Hering
0 siblings, 0 replies; 3+ messages in thread
From: Olaf Hering @ 2003-01-26 19:38 UTC (permalink / raw)
To: gdb, Will Schmidt
On Sun, Jan 26, Daniel Jacobowitz wrote:
> On Sun, Jan 26, 2003 at 08:20:55PM +0100, Olaf Hering wrote:
> > Hi,
> >
> > this patch uses the defines from asm/elf.h instead of the hardcoded
> > values. Would that have any bad side effects? asm-ppc64 includes elf.h
> > via sigcontext.h and that will result in a syntax error.
>
>
> > +#include "<asm/elf.h>"
>
> First of all, that's a syntax error :)
sigh...
> Secondly, tdep stands for target dependant. This needs to work from
> any host platform. The right thing to do is probably to rename the
> enum: PPC_LINUX_ELF_NGREG, or something like that.
>
> [Or fix your headers. That's pretty bad namespace polution. It
> shouldn't do that.]
Ok, I will leave that to Will.
Thanks for the pointers.
Gruss Olaf
--
A: No.
Q: Should I include quotations after my reply?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-26 19:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-26 19:21 remove enum from ppc-linux-tdep.c Olaf Hering
2003-01-26 19:30 ` Daniel Jacobowitz
2003-01-26 19:38 ` Olaf Hering
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox