public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* [Fwd: Re: tdep/1155: s/390 Linux: GDB can't reselect the right frame after an inferior function call]
@ 2003-03-27 21:32 Andrew Cagney
  2003-03-27 21:37 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2003-03-27 21:32 UTC (permalink / raw)
  To: gdb, Daniel Jacobowitz, Jim Blandy

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

There are two ways of handling bugs:

a. the bug remains open until every last possible [un]related issue is 
resolved

b. the original bug, as filed, is closed, as soon as the original 
problem is resolved.  If additional problems or enhancements are 
identified, they are recorded in new separate bug reports

Andrew

[-- Attachment #2: Re: tdep/1155: s/390 Linux: GDB can't reselect the right frame after an inferiorfunction call --]
[-- Type: message/rfc822, Size: 2629 bytes --]

From: Daniel Jacobowitz <drow@mvista.com>
To: cagney@redhat.com, jimb@redhat.com, gdb-gnats@sources.redhat.com
Subject: Re: tdep/1155: s/390 Linux: GDB can't reselect the right frame after an inferior function call
Date: Thu, 27 Mar 2003 16:14:47 -0500
Message-ID: <20030327211447.GA18656@nevyn.them.org>

On Thu, Mar 27, 2003 at 05:50:51PM -0000, cagney@redhat.com wrote:
> Synopsis: s/390 Linux: GDB can't reselect the right frame after an inferior function call
> 
> Responsible-Changed-From-To: unassigned->cagney
> Responsible-Changed-By: cagney
> Responsible-Changed-When: Thu Mar 27 17:50:51 2003
> Responsible-Changed-Why:
>     already fixed
> State-Changed-From-To: open->closed
> State-Changed-By: cagney
> State-Changed-When: Thu Mar 27 17:50:51 2003
> State-Changed-Why:
>     required functionality already available

I don't think it's appropriate to close a "this doesn't work" bug with
"required functionality already available".  The reported problem is
still there.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Fwd: Re: tdep/1155: s/390 Linux: GDB can't reselect the right frame after an inferior function call]
  2003-03-27 21:32 [Fwd: Re: tdep/1155: s/390 Linux: GDB can't reselect the right frame after an inferior function call] Andrew Cagney
@ 2003-03-27 21:37 ` Daniel Jacobowitz
  2003-03-27 22:23   ` Andrew Cagney
  2003-03-30 16:57   ` Andrew Cagney
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-03-27 21:37 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb, Jim Blandy

On Thu, Mar 27, 2003 at 04:32:42PM -0500, Andrew Cagney wrote:
> There are two ways of handling bugs:
> 
> a. the bug remains open until every last possible [un]related issue is 
> resolved
> 
> b. the original bug, as filed, is closed, as soon as the original 
> problem is resolved.  If additional problems or enhancements are 
> identified, they are recorded in new separate bug reports

The original bug, as filed, said:

<quote>
If you ask GDB to make an inferior function call when the youngest
frame is a frameless function, and the selected frame is the
second-to-youngest frame, then GDB will not properly re-select the
second-to-youngest frame when the inferior call returns.

On the S/390, if a function doesn't use alloca, then the compiler just
uses the stack pointer as the frame pointer.  This means that GDB's
frame_info structures use the address of the low end of the frame as
the frame base, not the high end.  (The S/390 stack grows downwards.)
So, if the youngest function call hasn't allocated any stack space,
then its frame base address is equal to that of its caller. This means
that frame_find_by_id is unable to distinguish between the two.
</quote>

In what way do you see this problem as resolved?


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Fwd: Re: tdep/1155: s/390 Linux: GDB can't reselect the right frame after an inferior function call]
  2003-03-27 21:37 ` Daniel Jacobowitz
@ 2003-03-27 22:23   ` Andrew Cagney
  2003-03-30 16:57   ` Andrew Cagney
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-03-27 22:23 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb, Jim Blandy

> On Thu, Mar 27, 2003 at 04:32:42PM -0500, Andrew Cagney wrote:
> 
>> There are two ways of handling bugs:
>> 
>> a. the bug remains open until every last possible [un]related issue is 
>> resolved
>> 
>> b. the original bug, as filed, is closed, as soon as the original 
>> problem is resolved.  If additional problems or enhancements are 
>> identified, they are recorded in new separate bug reports

FYI, I moved this thread here because the bug database is not the place 
to hold meta discussions about things like the above.

To me, as soon as the original problem is resolved, the bug should be 
closed.  If, as part of that analysis, new problems are found, or other 
related changes are identified, then they should be tracked separatly as 
new bugs.

If this isn't done, the bug database quickly accumulates misleading and 
poorly filed bug reports :-(

Of course, if the original problem, as filed, turns out to not be fixed, 
  the bug gets re-opened (I've already re-opened the bug in question, I 
misread the analysis and the original problem was not resolved :-( )

Andrew


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Fwd: Re: tdep/1155: s/390 Linux: GDB can't reselect the right frame after an inferior function call]
  2003-03-27 21:37 ` Daniel Jacobowitz
  2003-03-27 22:23   ` Andrew Cagney
@ 2003-03-30 16:57   ` Andrew Cagney
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-03-30 16:57 UTC (permalink / raw)
  To: Daniel Jacobowitz, Jim Blandy; +Cc: gdb

> 
> The original bug, as filed, said:
> 
> <quote>
> If you ask GDB to make an inferior function call when the youngest
> frame is a frameless function, and the selected frame is the
> second-to-youngest frame, then GDB will not properly re-select the
> second-to-youngest frame when the inferior call returns.
> 
> On the S/390, if a function doesn't use alloca, then the compiler just
> uses the stack pointer as the frame pointer.  This means that GDB's
> frame_info structures use the address of the low end of the frame as
> the frame base, not the high end.  (The S/390 stack grows downwards.)
> So, if the youngest function call hasn't allocated any stack space,
> then its frame base address is equal to that of its caller. This means
> that frame_find_by_id is unable to distinguish between the two.
> </quote>
> 
> In what way do you see this problem as resolved?

Just to close this, further analysis revealed that the s390's frame ID's 
stack address wasn't correct (wasn't constant, pointing at the wrong end 
of the frame).  Fixing that will fix the above.

It's also useful to note that, in the critical edge cases, GDB is 
already doing frame/func comparisons vis:
             case PRINT_UNKNOWN:
               /* FIXME: cagney/2002-12-01: Given that a frame ID does
                  (or should) carry around the function and does (or
                  should) use that when doing a frame comparison.  */
               if (stop_step
                   && frame_id_eq (step_frame_id,
                                   get_frame_id (get_current_frame ()))
                   && step_start_function == find_pc_function (stop_pc))
Moving the test to frame_id_eq() is something of a clean up.  It will 
also make it possible to flush out all those remaining edge cases though.

Andrew


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-30 16:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-27 21:32 [Fwd: Re: tdep/1155: s/390 Linux: GDB can't reselect the right frame after an inferior function call] Andrew Cagney
2003-03-27 21:37 ` Daniel Jacobowitz
2003-03-27 22:23   ` Andrew Cagney
2003-03-30 16:57   ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).