* Re: [patch] Remove uses of deprecated_registers from hppah-nat.c
[not found] <no.id>
@ 2004-11-20 18:04 ` John David Anglin
2004-11-20 18:36 ` Mark Kettenis
0 siblings, 1 reply; 4+ messages in thread
From: John David Anglin @ 2004-11-20 18:04 UTC (permalink / raw)
To: John David Anglin; +Cc: gdb-patches, randolph
> 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
>
> * infttrace.h (ttrace_write_reg_64): Add prototype.
> * hppah-nat.c (store_inferior_registers): Fix warning from ambiguous
> expression.
> (store_inferior_registers): Correct formatting. Replace uses of
> deprecated_registers with calls to regcache_raw_read,
> regcache_raw_write_part and regcache_raw_read_part.
> HP-UX 11(i) is still broken; it really needs a clean new inf-ttrace.c.
> You might get away with configuring GDB with --host=hppa-hp-hpux10.20
> on HP-UX 11(i) if you don't care about threads support.
I've been doing quite a few HP-UX 11(i) build as Randolph added fixes.
Sure, a lot of stuff is broken but a lot of stuff works as well. For
example, watchpoint support surprisingly works on hppa64.
> We can discuss changes required to fix the hpux target, but let's not
> assume that hpux support will be gone in the next release (which is
> what's currently in the NEWS file...)
Bah, it appears that I have wasted my time given the politics of HP-UX
support in the gdb project.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [patch] Remove uses of deprecated_registers from hppah-nat.c
2004-11-20 18:04 ` [patch] Remove uses of deprecated_registers from hppah-nat.c John David Anglin
@ 2004-11-20 18:36 ` Mark Kettenis
2004-11-21 0:23 ` John David Anglin
0 siblings, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2004-11-20 18:36 UTC (permalink / raw)
To: dave; +Cc: dave, gdb-patches, randolph
Date: Sat, 20 Nov 2004 13:04:03 -0500 (EST)
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
> 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
>
> * infttrace.h (ttrace_write_reg_64): Add prototype.
> * hppah-nat.c (store_inferior_registers): Fix warning from ambiguous
> expression.
> (store_inferior_registers): Correct formatting. Replace uses of
> deprecated_registers with calls to regcache_raw_read,
> regcache_raw_write_part and regcache_raw_read_part.
Please check this in. It's obviously correct since it removes
deprecated stuff and makes things build again ;-) We can always fix
any fallout later.
> HP-UX 11(i) is still broken; it really needs a clean new inf-ttrace.c.
> You might get away with configuring GDB with --host=hppa-hp-hpux10.20
> on HP-UX 11(i) if you don't care about threads support.
I've been doing quite a few HP-UX 11(i) build as Randolph added fixes.
Sure, a lot of stuff is broken but a lot of stuff works as well. For
example, watchpoint support surprisingly works on hppa64.
I think I was more talking about 10.20 than 11.x when I said that most
of the fancy stuff was broken anyway.
> We can discuss changes required to fix the hpux target, but let's not
> assume that hpux support will be gone in the next release (which is
> what's currently in the NEWS file...)
Bah, it appears that I have wasted my time given the politics of HP-UX
support in the gdb project.
Well, your patch removes the reason why HP-UX was listed to be removed
in the NEWS file. So a big thank-you from me (and probably all other
people with an interest in HP-UX).
About the politics. Everything except GNU/Linux is a second class
citizen in GNU-land. I really hope that given enough support from the
userbase we can give other platforms a place too. I'll stronly oppose
any unreasonable attempt to remove features that such platforms depend
on.
Unfortunately the HP-UX support in GDB has many problems. It'll
require a significant amount of work to keep it alive. I hope you'll
continue to help with that.
Personally, I think we can increase the likelyhood of continued HP-UX
support by getting rid of some of the badly implemented HP-UX-only
features. That's why I just committed that HP-UX 10.20 change.
Hopefully we can do something like it for HP-UX 11.x. I sincerely
hope you don't view this as if I'm throwing away the stuff that you
spent hours of time on to get it working again.
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Remove uses of deprecated_registers from hppah-nat.c
2004-11-20 18:36 ` Mark Kettenis
@ 2004-11-21 0:23 ` John David Anglin
0 siblings, 0 replies; 4+ messages in thread
From: John David Anglin @ 2004-11-21 0:23 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches, randolph
> About the politics. Everything except GNU/Linux is a second class
> citizen in GNU-land. I really hope that given enough support from the
> userbase we can give other platforms a place too. I'll stronly oppose
> any unreasonable attempt to remove features that such platforms depend
> on.
What happened to GNU/Hurd ;-) In GCC, I've tried to maintain an even
balance in supporting HP-UX and Linux as I know that I came to be
an open source supporter by using GNU tools on proprietory systems.
> Unfortunately the HP-UX support in GDB has many problems. It'll
> require a significant amount of work to keep it alive. I hope you'll
> continue to help with that.
Unfortunately, although I would like to help more, I'm really stretched
to the limit with GCC and the other volunteer projects that I support.
> Personally, I think we can increase the likelyhood of continued HP-UX
> support by getting rid of some of the badly implemented HP-UX-only
> features. That's why I just committed that HP-UX 10.20 change.
> Hopefully we can do something like it for HP-UX 11.x. I sincerely
> hope you don't view this as if I'm throwing away the stuff that you
> spent hours of time on to get it working again.
It's really the thousands of hours of time spent on the PA-RISC GCC
port that I'm concened about. Gdb is the most important tool in keeping
the GCC port alive. HP really messed up gdb with its badly implemented
features and then walking away. The old Utah versions of gdb worked much
better.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch] Remove uses of deprecated_registers from hppah-nat.c
@ 2004-11-20 17:45 John David Anglin
0 siblings, 0 replies; 4+ messages in thread
From: John David Anglin @ 2004-11-20 17:45 UTC (permalink / raw)
To: gdb-patches; +Cc: randolph
The enclosed patch fixes the build problem of gdb on hppa64-hp-hpux11.11
due to the removal of deprecated_registers. It's had a small amount of
real world testing on this port. I've tried to address the issue of
accessing 64-bit registers in 32-bit chunks as required by the current
code by using regcache_raw_read_part and regcache_raw_write_part.
Ok?
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* infttrace.h (ttrace_write_reg_64): Add prototype.
* hppah-nat.c (store_inferior_registers): Fix warning from ambiguous
expression.
(store_inferior_registers): Correct formatting. Replace uses of
deprecated_registers with calls to regcache_raw_read,
regcache_raw_write_part and regcache_raw_read_part.
Index: infttrace.h
===================================================================
RCS file: /cvs/src/src/gdb/infttrace.h,v
retrieving revision 1.4
diff -u -3 -p -r1.4 infttrace.h
--- infttrace.h 26 May 2004 15:38:40 -0000 1.4
+++ infttrace.h 19 Nov 2004 04:07:38 -0000
@@ -31,5 +31,6 @@ extern int hpux_has_vforked (int pid, in
extern int hpux_has_execd (int pid, char **execd_pathname);
extern int hpux_has_syscall_event (int pid, enum target_waitkind *kind,
int *syscall_id);
+extern int ttrace_write_reg_64 (int, CORE_ADDR, CORE_ADDR);
#endif
Index: hppah-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/hppah-nat.c,v
retrieving revision 1.34
diff -u -3 -p -r1.34 hppah-nat.c
--- hppah-nat.c 5 Oct 2004 21:53:33 -0000 1.34
+++ hppah-nat.c 19 Nov 2004 04:07:40 -0000
@@ -141,11 +141,11 @@ store_inferior_registers (int regno)
layering will not allow us to perform a 64bit register store.
What a crock. */
- if (regno == HPPA_PCOQ_HEAD_REGNUM || regno == HPPA_PCOQ_TAIL_REGNUM && len == 8)
+ if ((regno == HPPA_PCOQ_HEAD_REGNUM || regno == HPPA_PCOQ_TAIL_REGNUM) && len == 8)
{
CORE_ADDR temp;
- temp = *(CORE_ADDR *)&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
+ regcache_raw_read (current_regcache, regno, &temp);
/* Set the priv level (stored in the low two bits of the PC. */
temp |= 0x3;
@@ -155,7 +155,7 @@ store_inferior_registers (int regno)
/* If we fail to write the PC, give a true error instead of
just a warning. */
- if (errno != 0)
+ if (errno != 0)
{
char *err = safe_strerror (errno);
char *msg = alloca (strlen (err) + 128);
@@ -170,15 +170,24 @@ store_inferior_registers (int regno)
the high part of IPSW. What will it take for HP to catch a
clue about building sensible interfaces? */
if (regno == HPPA_IPSW_REGNUM && len == 8)
- *(int *)&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)] = 0;
+ {
+ int temp = 0;
+
+ regcache_raw_write_part (current_regcache, regno, 0,
+ sizeof (int), &temp);
+ }
#endif
for (i = 0; i < len; i += sizeof (int))
{
+ int temp;
+
errno = 0;
+ regcache_raw_read_part (current_regcache, regno, i,
+ sizeof (int), &temp);
call_ptrace (PT_WUREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) addr + i,
- *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno) + i]);
+ temp);
if (errno != 0)
{
/* Warning, not error, in case we are attached; sometimes
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-11-21 0:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <no.id>
2004-11-20 18:04 ` [patch] Remove uses of deprecated_registers from hppah-nat.c John David Anglin
2004-11-20 18:36 ` Mark Kettenis
2004-11-21 0:23 ` John David Anglin
2004-11-20 17:45 John David Anglin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox