public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Fix gdb.python/py-finish-breakpoint2.exp with -m32
Date: Thu, 21 Jan 2021 09:45:09 +0100	[thread overview]
Message-ID: <13409e22-657c-28f3-2b90-bbbd90d68c41@suse.de> (raw)
In-Reply-To: <a44763bf-28f8-def1-1016-baf375eca2b3@suse.de>

On 1/21/21 9:29 AM, Tom de Vries wrote:
> The different outcomes for -m32 and -m64 are both valid given the
> semantics of FinishBreakpoint, which is "set at the return address of a
> frame".  It all depends where that return address is.  There is no
> guarantee that the return address is an insn that uniquely represent the
> function return control path.

And, reading the documentation:
...
Function: FinishBreakpoint.out_of_scope (self)

    In some circumstances (e.g. longjmp, C++ exceptions, GDB return
    command, …), a function may not properly terminate, and thus never
    hit the finish breakpoint. When GDB notices such a situation, the
    out_of_scope callback will be triggered.
...
this may be somewhat misleading or unclear, given that it's possible (as
the -m64 case demonstrates) that both:
- the function does properly terminate, and
- the finish breakpoint still hits (meaning the stop method is called).

Thanks,
- Tom

  reply	other threads:[~2021-01-21  8:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18 10:31 Tom de Vries
2021-01-21  7:04 ` Simon Marchi
2021-01-21  8:29   ` Tom de Vries
2021-01-21  8:45     ` Tom de Vries [this message]
2021-01-21 14:22       ` Simon Marchi
2021-09-28 14:33         ` [RFC][gdb/python] FinishBreakPoint update Tom de Vries

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=13409e22-657c-28f3-2b90-bbbd90d68c41@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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).