This is an archive of the discontinued LLVM Phabricator instance.

Fix jumpy debug behavior issue
Needs ReviewPublic

Authored by yixi on Dec 15 2020, 8:20 AM.

Details

Summary

When debugging an executable program completed by Clang, if you set a break to a function, it is often no way to stop right at the line of the function, but jump to the end of the program. For example:

Reading symbols from ./a.out...done.
(gdb) b main
Breakpoint 1 at 0x4005ec
(gdb) r
Starting program: /tmp/a.out

Breakpoint 1, 0x00000000004005ec in main ()
(gdb) n
Single stepping until exit from function main,
which has no line number information.
0x0000ffffbf559ae0 in __libc_start_main () from /usr/lib64/libc.so.6

GDB version: GNU gdb (GDB) 8.2

This patch is trying to solve the issue.

Diff Detail

Event Timeline

yixi created this revision.Dec 15 2020, 8:20 AM
yixi requested review of this revision.Dec 15 2020, 8:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2020, 8:20 AM