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/12940] New: RFE: Step into the last function call on a line


http://sourceware.org/bugzilla/show_bug.cgi?id=12940

           Summary: RFE: Step into the last function call on a line
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com


int a (void) { return 1; }
int b (void) { return 2; }
void f (int x) {}
int main (void)
{
  f (a () + b ());
  return 0;
}
-------------------------------------------------------------------------------

Expected:
6      f (a () + b ());
(gdb) stepfunc
f (x=3) at lastfunc.c:3
3    void f (int x) {}

Actual:
6      f (a () + b ());
(gdb) step
a () at lastfunc.c:1
1    int a (void) { return 1; }

Now one has to (according to the number of called functions):
(gdb) step
(gdb) finish
(gdb) step
(gdb) finish
(gdb) step

or:
(gdb) record 
(gdb) next
(gdb) reverse-step
(gdb) reverse-finish 
(gdb) step

or to use:
(gdb) ignorefunc a
(gdb) ignorefunc b
(gdb) step
with:
define ignorefunc
    break $arg0
    commands
        up
        tbreak
        commands
            step
        end
        continue
    end
end

This feature should be doable the right way (to find the last call instruction
during instruction stepping in a line) with the recent DW_TAG_GNU_call_site
markers.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]