[Bug breakpoints/25280] breaking on pointer functions without specifying an asterisk yields an unexpected result.

me at tomaszubiri dot com sourceware-bugzilla@sourceware.org
Sat Dec 14 20:06:00 GMT 2019


--- Comment #1 from Tomas Zubiri <me at tomaszubiri dot com> ---
Either my hypothesis as to why the unexpected result occured was wrong, or the
source code is incorrectly looking for function instead of *function as well.
Running break *get_branch did correctly identify the function in the source
files for me, however, the program breaks on the random remote.c:1589 which is
a random else in the middle of a function.
Even running a breakpoint immediately before the line that calls get_branch and
stepping in yields control to this random else.

Bottom line, I can't find a way to step into this function. 

Here is my terminal log:

(gdb) break setup_default_push_refspecs 
Breakpoint 4 at 0x5555555f415e: file builtin/push.c, line 244.
(gdb) run push
Starting program: /home/tomas/Projects/git/git/git push
[Depuración de hilo usando libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 4, setup_default_push_refspecs (remote=0x555555b2fe60) at
244             struct branch *branch = branch_get(NULL);
(gdb) s
branch_get (name=0x0) at remote.c:1589
1589            read_config();

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

More information about the Gdb-prs mailing list