public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Metzger, Markus T" <markus.t.metzger@intel.com>
To: Pedro Alves <palves@redhat.com>,
	"gdb-patches@sourceware.org"	<gdb-patches@sourceware.org>
Subject: RE: [PATCH] infrun: step through indirect branch thunks
Date: Mon, 09 Apr 2018 16:24:00 -0000	[thread overview]
Message-ID: <A78C989F6D9628469189715575E55B2369669720@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <b8417e47-4306-65b1-979b-9eb62a54cfb4@redhat.com>

Hello Pedro,

> > --- a/gdb/gdbarch.sh
> > +++ b/gdb/gdbarch.sh
> > @@ -660,6 +660,9 @@ m;CORE_ADDR;skip_solib_resolver;CORE_ADDR
> > pc;pc;;generic_skip_solib_resolver;;0
> >  # Some systems also have trampoline code for returning from shared libs.
> >  m;int;in_solib_return_trampoline;CORE_ADDR pc, const char *name;pc,
> > name;;generic_in_solib_return_trampoline;;0
> >
> > +# Return true if PC lies inside an indirect branch thunk.
> > +m;bool;in_indirect_branch_thunk;CORE_ADDR
> > +pc;pc;;default_in_indirect_branch_thunk;;0
> 
> If that last 0 is the default (I never remember off hand), then please write "false"
> instead.  Assuming that works.

It is not the default.  I had to add a new function to return the default.  IIUC this
is disabling INVALID_P checks to allow default_in_indirect_branch_thunk to be
used as default.


> > +    gdb_test_multiple "stepi" "$test: stepi" {
> > +        -re "$current.*$gdb_prompt $" {
> > +            send_gdb "stepi\n"
> > +            exp_continue
> 
> This should probably have some upper bound.

Unless some compiler bug generated an infinite loop or GDB's stepping is
completely broken, we should eventually step out of $current.

I read your comment about an upper bound in your first reply but thought
that it wouldn't be necessary.  Do you think we need one?

Thanks,
Markus.

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

  reply	other threads:[~2018-04-09 16:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19  5:16 Markus Metzger
2018-03-26 17:38 ` Pedro Alves
2018-04-09 14:20   ` Metzger, Markus T
2018-04-09 14:42     ` [pushed/ob] Apply "Convert observers to C++" edit to gdbarch.sh (Re: [PATCH] infrun: step through indirect branch thunks) Pedro Alves
2018-04-09 15:04     ` [PATCH] infrun: step through indirect branch thunks Pedro Alves
2018-04-09 16:24       ` Metzger, Markus T [this message]
2018-04-09 16:29         ` Pedro Alves
2018-04-10  9:02       ` Metzger, Markus T
2018-04-10  9:10         ` Pedro Alves
2018-04-13 14:58         ` Gary Benson
2018-04-13 16:07           ` Simon Marchi
2018-04-15 19:47             ` Simon Marchi
2018-04-16  6:51               ` Metzger, Markus T
2018-04-17 13:32               ` Gary Benson

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=A78C989F6D9628469189715575E55B2369669720@IRSMSX103.ger.corp.intel.com \
    --to=markus.t.metzger@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).