Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: Andrew Cagney <cagney@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] OSF/1 - "next" over prologueless function call
Date: Mon, 08 Dec 2003 23:25:00 -0000	[thread overview]
Message-ID: <20031208232502.GF698@gnat.com> (raw)
In-Reply-To: <3FD0E83F.30203@gnu.org>

Sorry for the delay in my answers. I am traveling again now, and
will be on and off until next week.

> There's always plan B.
> 
> Looking at the body of that IF, I believe it always returns.  That 
> should let us do:
> 
> if (legacy_frame_p ())
>   if (all the existing tests)
>     call a function to do the body of work ()
>     return;
> else if (our new improved test)
>   call a function to do the body of work ()
>   return;
> 
> that way the legacy and non legacy cases are clearly split - we're free 
> to refine the new conditional with out worrying about breaking the old 
> code.  However ....


We might have to take that route, because I rechecked on Solaris, and I
forgot (yes, I forgot) to make the change there before I reran the test,
so of course there were no regressions. I feel very embarrassed.

> So I'm guessing for the moment just replace
> 	stop_pc == ecs->stop_func_start
> with the frame id test in the new code?

That works with x86-linux and alpha-tru64, but unfortunately breaks
on sparc-solaris. Maybe something minor, but the call-ar-st starts
timeouting and takes forever to complete after that change.

So I think we should follow your suggestion above and separate
completely the two conditions, conditionalized by legacy_frame_p().
The function name we could use, at least for now, could be
handle_subroutine_call() or handle_step_into_function().

It seems that the correct test when legacy_frame_p() is nonzero
would only be the frame ID equality test, but I must admit being
nervous again not knowing how reliable the new frame implementations
are... Despite the fact that the current heuristics (check if PC ==
address of function first instruction or is inside function prologue)
doesn't cover 100% of the cases, it was still a simple, platform
independent, solid test that worked in most cases. We are about to
replace that by something that's a bit more complex and might cause some
unexpected behavior if the unwinder fails to unwind properly (imagine
for instance that the unwinder skipped one frame).

I am really torn, so I am relying on you who has had a closer look at
the frame implementations that have been converted so far. If it was
just me, I would be very conservative and simply add and extra

  || (legacy_frame_p() && frame_id_eq (...))

It only fixes one problem, but the changes of introducing another is
smaller. I am a coward :-).

-- 
Joel


  reply	other threads:[~2003-12-08 23:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-02  4:26 Joel Brobecker
2003-12-02  4:30 ` Daniel Jacobowitz
2003-12-02  6:06   ` Joel Brobecker
2003-12-02  6:35 ` Richard Henderson
2003-12-02  7:21   ` Joel Brobecker
2003-12-02 15:14     ` Daniel Jacobowitz
2003-12-03  1:54       ` Joel Brobecker
2003-12-02 13:55   ` Daniel Jacobowitz
2003-12-03  4:19 ` Andrew Cagney
2003-12-04  0:55   ` Joel Brobecker
2003-12-04  1:49     ` Andrew Cagney
2003-12-04 23:24       ` Joel Brobecker
2003-12-04 23:28         ` Daniel Jacobowitz
2003-12-05 20:19         ` Andrew Cagney
2003-12-08 23:25           ` Joel Brobecker [this message]
2003-12-09 23:10             ` Andrew Cagney
2003-12-02  5:49 Michael Elizabeth Chastain
2003-12-02  7:53 Michael Elizabeth Chastain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031208232502.GF698@gnat.com \
    --to=brobecker@gnat.com \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox