Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Daniel Jacobowitz <drow@mvista.com>,
	Joel Brobecker <brobecker@gnat.com>,
	Elena Zannoni <ezannoni@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] use frame IDs to detect function calls while stepping
Date: Mon, 09 Feb 2004 19:21:00 -0000	[thread overview]
Message-ID: <4027DDCB.50003@gnu.org> (raw)
In-Reply-To: <20040205194933.GB30363@nevyn.them.org>

> On Thu, Feb 05, 2004 at 02:20:10PM -0500, Elena Zannoni wrote:
> 
>> Daniel Jacobowitz writes:
>> 
>>  > > +      if (IN_SOLIB_CALL_TRAMPOLINE (stop_pc, ecs->stop_func_name))
>>  > > +        {
>>  > > +          /* We landed in a shared library call trampoline, so it
>>  > > +             is a subroutine call.  */
>>  > > +          handle_step_into_function (ecs);
>>  > > +          return;
>>  > > +        }
>>  > > +
>>  > > +      if (frame_id_eq (get_frame_id (get_prev_frame (get_current_frame ())),
>>  > > +                       step_frame_id))
>>  > > +        {
>>  > > +          /* It's a subroutine call.  */
>>  > > +          handle_step_into_function (ecs);
>>  > > +          return;
>>  > > +        }
>>  > > +
>>  > 
>>  > get_prev_frame can return NULL.  In fact, it generally does in main.
>>  > 
>> 
>> I don't think it matters, frame_id_eq will handle a comparison with
>> null_frame_id.
> 
> 
> Oh, you're right - I was expecting get_frame_id (NULL) to be a problem,
> but it isn't.

Hmm, I suspect there's a latent bug here.  In this context, when at 
main, get_prev_frame should unconditionally return main's caller.  Even 
when backtrace-beyond-main is false.

This suggests that some of the conditions found in get_prev_frame 
(namely in_entry_func and in_main_func) should be separated out.

However, that can be sorted later.

Andrew



      reply	other threads:[~2004-02-09 19:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-05  4:41 Joel Brobecker
2004-02-05 17:13 ` Joel Brobecker
2004-02-05 18:54   ` Elena Zannoni
2004-02-07  4:01     ` Joel Brobecker
2004-02-27 15:23       ` Andrew Cagney
2004-03-19  0:09         ` Joel Brobecker
2004-03-01 19:48           ` Joel Brobecker
2004-03-19  0:09           ` Joel Brobecker
2004-03-01 23:52             ` Joel Brobecker
2004-03-02  6:16             ` Joel Brobecker
2004-03-03 21:12               ` Mark Kettenis
2004-03-19  0:09                 ` Mark Kettenis
2004-03-19  0:09               ` Joel Brobecker
2004-03-19  0:09               ` Andrew Cagney
2004-03-02 15:48                 ` Andrew Cagney
2004-03-19  0:09                 ` Joel Brobecker
2004-03-02 22:07                   ` Joel Brobecker
2004-03-06  0:15                   ` Andrew Cagney
2004-03-19  0:09                     ` Andrew Cagney
2004-02-05 19:01   ` Daniel Jacobowitz
2004-02-05 19:23     ` Elena Zannoni
2004-02-05 19:49       ` Daniel Jacobowitz
2004-02-09 19:21         ` Andrew Cagney [this message]

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=4027DDCB.50003@gnu.org \
    --to=cagney@gnu.org \
    --cc=brobecker@gnat.com \
    --cc=drow@mvista.com \
    --cc=ezannoni@redhat.com \
    --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