public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/65839] New: xmethods need updating once gdb decides how to fix 18285
@ 2015-04-21 22:32 dje at google dot com
  2015-04-21 23:38 ` [Bug libstdc++/65839] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dje at google dot com @ 2015-04-21 22:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65839
           Summary: xmethods need updating once gdb decides how to fix
                    18285
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dje at google dot com

https://sourceware.org/bugzilla/show_bug.cgi?id=18285
documents a mea culpa: ptype on an xmethod expression segvs gdb.
Bleah.

Once we decide how to handle this in gdb, libstdc++'s xmethods
will need updating.

I can think of a way to fix the gdb side that doesn't involve changing
libstdc++'s xmethods. Maybe it's a reasonable way to go. The issue is that
currently, in order to know what the type of the result of the xmethod is,
we have to invoke the xmethod. But for "ptype" we don't want any side-effects.
GDB evaluates such expressions with EVAL_AVOID_SIDE_EFFECTS, and while many
xmethods typically don't have side-effects some can. And, for completeness
sake,
even reading target memory can have a side-effect.

A better solution would be a way to get the type of the result of the xmethod
without having to invoke it, and that will require changes to the source.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-26 21:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 22:32 [Bug libstdc++/65839] New: xmethods need updating once gdb decides how to fix 18285 dje at google dot com
2015-04-21 23:38 ` [Bug libstdc++/65839] " redi at gcc dot gnu.org
2015-04-21 23:48 ` dje at google dot com
2015-04-27 22:40 ` dje at google dot com
2015-04-29 22:51 ` devans at gcc dot gnu.org
2015-05-26 21:29 ` devans at gcc dot gnu.org
2015-05-26 21:46 ` dje at google dot com

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).