aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorwanglei <wanglei@loongson.cn>2025-01-09 09:11:24 +0800
committerGitHub <noreply@github.com>2025-01-09 09:11:24 +0800
commit5ae44bf718a460a2d5fd3636c8182093e1e27e7a (patch)
tree1d32f71398167f881873f1dc62b2aa984af59636 /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parentfce0314c384f72cacbfcce148c9d110687c78261 (diff)
downloadllvm-5ae44bf718a460a2d5fd3636c8182093e1e27e7a.zip
llvm-5ae44bf718a460a2d5fd3636c8182093e1e27e7a.tar.gz
llvm-5ae44bf718a460a2d5fd3636c8182093e1e27e7a.tar.bz2
[LoongArch] Add debug location for register reload
Although the automatically inserted reload instruction in the `Epilogue` is unrelated to the original code, in order to improve debugger functionality, we have re-added debugging location information in the reload instruction. When using an empty debugging location, the following issue occurs: ``` loongson@linux:~$ cat -n test.c 1 int printf(const char *, ...); 2 int main(int argc, char **argv) { 3 printf("%d\n", argc); 4 return 0; 5 } clang -g -O0 test.c -o test ``` Without this patch, the debugger is unable to correctly access the current stack information when a breakpoint is set on line 4: ``` loongson@linux:~$ gdb -q ./test Reading symbols from ./test... (gdb) break 4 Breakpoint 1 at 0x7c0: file test.c, line 4. (gdb) run Starting program: /home/wanglei/test [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/loongarch64-linux-gnu/libthread_db.so.1". 1 Breakpoint 1, main (argc=<error reading variable: Cannot access memory at address 0xffffffffffffffe8>, argv=<error reading variable: Cannot access memory at address 0xffffffffffffffe0>) at test.c:4 4 return 0; ``` Reviewed By: heiher, xen0n Pull Request: https://github.com/llvm/llvm-project/pull/122057
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions