* [RFA/hppa] Remove hack in hppa_push_dummy_frame...
@ 2003-03-18 2:30 Joel Brobecker
2003-03-18 4:46 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2003-03-18 2:30 UTC (permalink / raw)
To: gdb-patches
Hello,
A long time ago (that long already), I sent a question asking how to
rework a hack that was currently in place. Andrew looked at the code,
and wondered how it could possibly be working.
The probable answer is: it doesn't! I removed the code in question, and
rerun it through the testsuite, and did not see any regression.
This hack is causing me trouble for the multiarch conversion, and Andrew
mentionned that this was preventing him from making `struct frame_info'
opaque. I therefore suggest that we remove this code at once.
I am sure this code was there for something, and that some problem will
show up later, but I suggest we fix it then, and we fix it the proper
way.
2003-03-17 J. Brobecker <brobecker@gnat.com>
* hppa-tdep.c (hppa_push_dummy_frame): Remove hack which does not
appear to be working in any case.
The next will then to fix the profile of hppa_push_dummy_frame to remove
the dependency on struct inferior_status (by removing the now-unused
parameter), to make it conformant with the push_dummy_frame gdbarch method.
Ok to apply?
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFA/hppa] Remove hack in hppa_push_dummy_frame...
2003-03-18 2:30 [RFA/hppa] Remove hack in hppa_push_dummy_frame Joel Brobecker
@ 2003-03-18 4:46 ` Andrew Cagney
2003-03-18 18:28 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2003-03-18 4:46 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
> 2003-03-17 J. Brobecker <brobecker@gnat.com>
>
> * hppa-tdep.c (hppa_push_dummy_frame): Remove hack which does not
> appear to be working in any case.
>
Yes!
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA/hppa] Remove hack in hppa_push_dummy_frame...
2003-03-18 4:46 ` Andrew Cagney
@ 2003-03-18 18:28 ` Joel Brobecker
0 siblings, 0 replies; 3+ messages in thread
From: Joel Brobecker @ 2003-03-18 18:28 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
> >2003-03-17 J. Brobecker <brobecker@gnat.com>
> >
> > * hppa-tdep.c (hppa_push_dummy_frame): Remove hack which does not
> > appear to be working in any case.
> >
> Yes!
I knew you'd like it :-).
But did I forget to attach the patch? :-(. Here is the change I just
checked in.
--
Joel
[-- Attachment #2: hppa-tdep.c.diff --]
[-- Type: text/plain, Size: 2164 bytes --]
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.56
diff -c -3 -p -r1.56 hppa-tdep.c
*** hppa-tdep.c 17 Mar 2003 23:25:08 -0000 1.56
--- hppa-tdep.c 18 Mar 2003 02:18:23 -0000
*************** hppa_push_dummy_frame (struct inferior_s
*** 1440,1470 ****
CORE_ADDR int_buffer;
double freg_buffer;
- /* Oh, what a hack. If we're trying to perform an inferior call
- while the inferior is asleep, we have to make sure to clear
- the "in system call" bit in the flag register (the call will
- start after the syscall returns, so we're no longer in the system
- call!) This state is kept in "inf_status", change it there.
-
- We also need a number of horrid hacks to deal with lossage in the
- PC queue registers (apparently they're not valid when the in syscall
- bit is set). */
pc = hppa_target_read_pc (inferior_ptid);
int_buffer = read_register (FLAGS_REGNUM);
if (int_buffer & 0x2)
{
! unsigned int sid;
! int_buffer &= ~0x2;
! write_inferior_status_register (inf_status, 0, int_buffer);
! write_inferior_status_register (inf_status, PCOQ_HEAD_REGNUM, pc + 0);
! write_inferior_status_register (inf_status, PCOQ_TAIL_REGNUM, pc + 4);
! sid = (pc >> 30) & 0x3;
if (sid == 0)
pcspace = read_register (SR4_REGNUM);
else
pcspace = read_register (SR4_REGNUM + 4 + sid);
- write_inferior_status_register (inf_status, PCSQ_HEAD_REGNUM, pcspace);
- write_inferior_status_register (inf_status, PCSQ_TAIL_REGNUM, pcspace);
}
else
pcspace = read_register (PCSQ_HEAD_REGNUM);
--- 1440,1454 ----
CORE_ADDR int_buffer;
double freg_buffer;
pc = hppa_target_read_pc (inferior_ptid);
int_buffer = read_register (FLAGS_REGNUM);
if (int_buffer & 0x2)
{
! const unsigned int sid = (pc >> 30) & 0x3;
if (sid == 0)
pcspace = read_register (SR4_REGNUM);
else
pcspace = read_register (SR4_REGNUM + 4 + sid);
}
else
pcspace = read_register (PCSQ_HEAD_REGNUM);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-03-18 18:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-18 2:30 [RFA/hppa] Remove hack in hppa_push_dummy_frame Joel Brobecker
2003-03-18 4:46 ` Andrew Cagney
2003-03-18 18:28 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox