This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/23537] Add step-non-pure command
- From: "vries at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 17 Aug 2018 12:00:20 +0000
- Subject: [Bug gdb/23537] Add step-non-pure command
- Auto-submitted: auto-generated
- References: <bug-23537-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=23537
--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Pedro Alves from comment #6)
> (In reply to Tom de Vries from comment #4)
> > (In reply to Pedro Alves from comment #2)
> > > anchoring this on "pureness" seems quite odd to me.
> >
> > > A user debugging some
> > > code won't normally know off hand if the functions are pure or not?!
> >
> > Indeed, one won't know in general. And one could argue that that is
> > precisely why such an instruction can be useful.
>
> My issue is with using "pure" as the function's characteristic that
> determines whether users normally want to skip a function.
The proposal is _not_ 'using "pure" as the function's characteristic that
determines whether users normally want to skip a function'.
The proposal is to allow users to use "pure" as a function's characteristic to
determine whether users want to skip a specific function.
> It seems orthogonal to me.
In my experience, there are specific cases where this overlaps.
> But then, I'd think that we likely want to made gdb's stepping skip those by
> default instead of adding a separate command (e.g., do you want new action
> buttons in IDEs for this new stepping/nexting kind?)
I don't use IDEs, so I haven't thought it through that far.
> > Stepping through code you don't known using snp lets you automatically skip
> > "uninteresting" functions, and step into "interesting" functions, which is
> > useful if you're stepping through code in order find where something is
> > changed (in other words, in a situation where the measure "interesting"
> > matches "non-pure").
>
> Sure. But why aren't pure functions interesting? Seems like an orthogonal
> concept.
Again, I'm _not_ saying pure functions are not interesting. I'm saying there
are scenarios when you're stepping through a program and you're only interested
in non-pure functions.
> The only rationale I can think of is that you can always call it
> manually if you skipped past it by mistake, since given the same inputs a
> pure function's implementation should go via the same internal code paths.
> Still, I'm sceptic. I argue that in practice, "pure" is not the
> discriminant that matters most and that what you _really_ want 99% of the
> time is either bug 12940, or auto-skipping artificial functions.
I think those make sense in their own right, but I think the same about snp.
Just think of it as way to step through a program with more detail than next,
and less detail than step.
[ Btw, perhaps instead of having a separate snp command, we can add "skip
-pure" or some such. ]
--
You are receiving this mail because:
You are on the CC list for the bug.