* inconsistent sigtramp code in mips target
@ 2003-10-28 21:58 Kevin Nomura
2003-10-29 22:27 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Nomura @ 2003-10-28 21:58 UTC (permalink / raw)
To: gdb-patches
gdb 6.0, file gdb/mips-tdep.c, function mips_find_saved_regs:
There are calls to "set_reg_offset" in a loop, followed by
some individual calls after the loop. The latter have
no effect if the register was processed in the loop
(see the code for set_reg_offset). SP_REGNUM is like this,
but PC_REGNUM is not, because of the particular values of
these constants (ugh).
if ((get_frame_type (fci) == SIGTRAMP_FRAME))
{
for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
{
CORE_ADDR reg_position = (get_frame_base (fci) + SIGFRAME_REGSAVE_OFF
+ ireg * SIGFRAME_REG_SIZE);
set_reg_offset (saved_regs, ireg, reg_position);
}
for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
{
CORE_ADDR reg_position = (get_frame_base (fci)
+ SIGFRAME_FPREGSAVE_OFF
+ ireg * SIGFRAME_REG_SIZE);
set_reg_offset (saved_regs, FP0_REGNUM + ireg, reg_position);
}
set_reg_offset (saved_regs, PC_REGNUM, get_frame_base (fci) + SIGFRAME_PC_OFF);
/* SP_REGNUM, contains the value and not the address. */
set_reg_offset (saved_regs, SP_REGNUM, get_frame_base (fci));
return;
}
The logical patch would be to move the special cases up front,
but I have no way to test this out (no access to a MIPS UNIX
platform).
On the other hand this isn't purely academic. I came across this
because I need to define a custom sigtramp frame for our own
MIPS embedded platform. It was baffling for a while that my
modification to the SP_REGNUM override had no effect.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: inconsistent sigtramp code in mips target
2003-10-28 21:58 inconsistent sigtramp code in mips target Kevin Nomura
@ 2003-10-29 22:27 ` Andrew Cagney
2003-10-29 22:30 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2003-10-29 22:27 UTC (permalink / raw)
To: Kevin Nomura; +Cc: gdb-patches
> The logical patch would be to move the special cases up front,
> but I have no way to test this out (no access to a MIPS UNIX
> platform).
>
> On the other hand this isn't purely academic. I came across this
> because I need to define a custom sigtramp frame for our own
> MIPS embedded platform. It was baffling for a while that my
> modification to the SP_REGNUM override had no effect.
Rather than the MIPS, check the x86 family for how to add a custom
sigtramp handler (ex, i386_sigtramp_frame_sniffer). Hopefully the new
mechanism is less baffling - the current MIPS code is not a good reference.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inconsistent sigtramp code in mips target
2003-10-29 22:27 ` Andrew Cagney
@ 2003-10-29 22:30 ` Daniel Jacobowitz
2003-10-29 22:43 ` Kevin Nomura
2003-10-29 22:50 ` Andrew Cagney
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-10-29 22:30 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Kevin Nomura, gdb-patches
On Wed, Oct 29, 2003 at 05:27:40PM -0500, Andrew Cagney wrote:
> >The logical patch would be to move the special cases up front,
> >but I have no way to test this out (no access to a MIPS UNIX
> >platform).
> >
> >On the other hand this isn't purely academic. I came across this
> >because I need to define a custom sigtramp frame for our own
> >MIPS embedded platform. It was baffling for a while that my
> >modification to the SP_REGNUM override had no effect.
>
> Rather than the MIPS, check the x86 family for how to add a custom
> sigtramp handler (ex, i386_sigtramp_frame_sniffer). Hopefully the new
> mechanism is less baffling - the current MIPS code is not a good reference.
But since he's got a MIPS target, the frame sniffers won't help him at
all, will they? They can't be used until the MIPS is converted.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inconsistent sigtramp code in mips target
2003-10-29 22:30 ` Daniel Jacobowitz
@ 2003-10-29 22:43 ` Kevin Nomura
2003-10-29 22:50 ` Andrew Cagney
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Nomura @ 2003-10-29 22:43 UTC (permalink / raw)
To: Andrew Cagney, Kevin Nomura, gdb-patches
On Wed, Oct 29, 2003 at 05:30:01PM -0500, Daniel Jacobowitz wrote:
> On Wed, Oct 29, 2003 at 05:27:40PM -0500, Andrew Cagney wrote:
> > >The logical patch would be to move the special cases up front,
> > >but I have no way to test this out (no access to a MIPS UNIX
> > >platform).
> > >
> > >On the other hand this isn't purely academic. I came across this
> > >because I need to define a custom sigtramp frame for our own
> > >MIPS embedded platform. It was baffling for a while that my
> > >modification to the SP_REGNUM override had no effect.
> >
> > Rather than the MIPS, check the x86 family for how to add a custom
> > sigtramp handler (ex, i386_sigtramp_frame_sniffer). Hopefully the new
> > mechanism is less baffling - the current MIPS code is not a good reference.
>
> But since he's got a MIPS target, the frame sniffers won't help him at
> all, will they? They can't be used until the MIPS is converted.
Right. I used the new framework for i386, and am puzzling it out
for Alpha. MIPS is a horse of a different colour and required
breaking encapsulation entirely by hacking
frame.c:deprecated_update_frame_base_hack() in addition to the
above.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inconsistent sigtramp code in mips target
2003-10-29 22:30 ` Daniel Jacobowitz
2003-10-29 22:43 ` Kevin Nomura
@ 2003-10-29 22:50 ` Andrew Cagney
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2003-10-29 22:50 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Andrew Cagney, Kevin Nomura, gdb-patches
> On Wed, Oct 29, 2003 at 05:27:40PM -0500, Andrew Cagney wrote:
>
>> >The logical patch would be to move the special cases up front,
>> >but I have no way to test this out (no access to a MIPS UNIX
>> >platform).
>> >
>> >On the other hand this isn't purely academic. I came across this
>> >because I need to define a custom sigtramp frame for our own
>> >MIPS embedded platform. It was baffling for a while that my
>> >modification to the SP_REGNUM override had no effect.
>
>>
>> Rather than the MIPS, check the x86 family for how to add a custom
>> sigtramp handler (ex, i386_sigtramp_frame_sniffer). Hopefully the new
>> mechanism is less baffling - the current MIPS code is not a good reference.
>
>
> But since he's got a MIPS target, the frame sniffers won't help him at
> all, will they? They can't be used until the MIPS is converted.
Looks like Kevin may have drawn the short straw.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-29 22:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-28 21:58 inconsistent sigtramp code in mips target Kevin Nomura
2003-10-29 22:27 ` Andrew Cagney
2003-10-29 22:30 ` Daniel Jacobowitz
2003-10-29 22:43 ` Kevin Nomura
2003-10-29 22:50 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox