[Lldb-commits] [PATCH] D71784: Fedora Linux fails `Unwind/thread-step-out-ret-addr-check.test`
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 20 13:26:00 PST 2019
jankratochvil created this revision.
jankratochvil added reviewers: jingham, labath, clayborg, mossberg.
jankratochvil added a project: LLDB.
Herald added a subscriber: kristof.beyls.
D71372 <https://reviews.llvm.org/D71372> introduced: `Unwind/thread-step-out-ret-addr-check.test` failing on Fedora 30 Linux x86_64.
One problem is the underscored `_nonstandard_stub` in the `.s` file but not in the LLDB command:
(lldb) breakpoint set -n nonstandard_stub
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) process launch
Process 21919 exited with status = 0 (0x00000000)
Process 21919 launched: '/home/jkratoch/redhat/llvm-monorepo-clangassert/tools/lldb/test/Unwind/Output/thread-step-out-ret-addr-check.test.tmp' (x86_64)
(lldb) thread step-out
error: invalid thread
(lldb) _
Another problem is that Fedora Linux has executable stack by default and all programs indicate non-executable stack by `PT_GNU_STACK`, after fixing the underscore I was getting:
(lldb) thread step-out
Process 22294 exited with status = 0 (0x00000000)
(lldb) _
Is the `.section` harmless for non-Linux platforms or will it need some conditional compilation? (`#ifdef` is not available in `.s` file)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71784
Files:
lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s
lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
Index: lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
===================================================================
--- lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
+++ lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
@@ -7,7 +7,7 @@
# RUN: %lldb %t -s %s -b 2>&1 | FileCheck %s
breakpoint set -n nonstandard_stub
-# CHECK: Breakpoint 1: where = {{.*}}`nonstandard_stub
+# CHECK: Breakpoint 1: where = {{.*`_?}}nonstandard_stub
process launch
# CHECK: stop reason = breakpoint 1.1
Index: lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s
===================================================================
--- lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s
+++ lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s
@@ -10,6 +10,7 @@
# Executing 'thread step-out' here will initially attempt to write a
# breakpoint to that stack address, but should fail because of the executable
# memory check.
+nonstandard_stub:
_nonstandard_stub:
mov (%rsp), %rdi
mov (%rdi), %rsi
@@ -18,3 +19,5 @@
add $0x10, %rsp
ret
+
+ .section .note.GNU-stack,"", at progbits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71784.234965.patch
Type: text/x-patch
Size: 1185 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191220/de44e64b/attachment-0001.bin>
More information about the lldb-commits
mailing list