This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/23537] New: Add step-non-pure command


https://sourceware.org/bugzilla/show_bug.cgi?id=23537

            Bug ID: 23537
           Summary: Add step-non-pure command
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Consider this source:
...
int a = foo1 ();
int b = foo2 ();
int c = foo3 ();
bar (a, b, c);
...
In order to step into bar, we need to do "n, n, n, s".

Now consider an alternative way of writing this (typically used when a, b and c
are only used in the call to bar):
...
bar (foo1 (), foo2(), foo3());
...
Here in order to step into bar, we need to do "s, f, s, f, s, f, s".

Now assume that the foo functions will not do interesting stuff, but just get
certain values, in other words, they're pure functions (no effects except the
return value and their return value depends only on the parameters and/or
global variables).

If the compiler marks these functions as pure, we can introduce a command snp
(step-non-pure) that would step into bar without bothering with the foos. So,
we need to do just "snp".

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]