public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/99215] coroutines: debugging with gdb
Date: Mon, 22 Mar 2021 12:23:52 +0000	[thread overview]
Message-ID: <bug-99215-4-KUXGQHceCx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99215-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99215

--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Nils Gladitz from comment #7)
> (In reply to Nils Gladitz from comment #5)
> > Apparently when the coroutine happens to be a member function (even a static
> > one) printing *frame_ptr results in "{<No data fields>}".
> 
> I reported the "{<No data fields>}" issue at the gdb issue tracker:
> https://sourceware.org/bugzilla/show_bug.cgi?id=27556
> 
> Managed to create a local workaround from comments made there.
> It was mentioned that gcc itself may be generating improper debug
> information (I think specifically nesting the frame type within a function)
> but as I mentioned  over there I myself don't know for sure if this is
> uncommon or actually invalid.

I am not 100% sure about the nesting of the type info
on one hand, the type _is_ local to the function (it's compiler-generated, end
users shouldn't need to look inside it - we are only doing so as a work-around
for missing info)

on the other, I suppose it's also unique to the function and therefore could be
pushed to file scope.

In the end I expect things to work better if we make use of the existing
machinery for decls being represented by some specified expression - then you
would not need to be poking inside the private (compiler-generated) type for
the frame.

In support of improved debug, I'm collecting some local patches - ready for
next stage 1.  One thing done already is to change the resume index even if the
suspend is not taken - so that an interrupted coro would have some indication
of which part of the code was active.

  parent reply	other threads:[~2021-03-22 12:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23  7:29 [Bug c++/99215] New: " nilsgladitz at gmail dot com
2021-02-23 14:21 ` [Bug c++/99215] " iains at gcc dot gnu.org
2021-02-23 14:59 ` nilsgladitz at gmail dot com
2021-02-23 15:26 ` iains at gcc dot gnu.org
2021-02-23 15:53 ` nilsgladitz at gmail dot com
2021-02-24 15:03 ` nilsgladitz at gmail dot com
2021-02-24 15:23 ` iains at gcc dot gnu.org
2021-03-22 12:13 ` nilsgladitz at gmail dot com
2021-03-22 12:23 ` iains at gcc dot gnu.org [this message]
2021-03-22 12:30 ` iains at gcc dot gnu.org
2021-07-09 18:14 ` cvs-commit at gcc dot gnu.org
2021-07-20  6:55 ` cvs-commit at gcc dot gnu.org
2021-09-03 20:25 ` iains at gcc dot gnu.org
2021-10-03 19:28 ` cvs-commit at gcc dot gnu.org
2022-02-15  2:12 ` jarrod.smith at ardentblue dot com

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=bug-99215-4-KUXGQHceCx@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).