llvm-project/lldb/test/Shell/Commands/command-breakpoint-by-addr.test
Michael Buch 1608fe8d56
[lldb][Breakpoint] Allow whitespace in breakpoint address expression (#126053)
Setting a breakpoint on `<symbol> + <offset>` used to work until
`2c76e88e9eb284d17cf409851fb01f1d583bb22a`, where this regex was
reworked. Now we only accept `<symbol>+ <offset>` or
`<symbol>+<offset>`.

This patch fixes the regression by adding yet another `[[:space:]]*`
component to the regex.

One could probably simplify the regex (or even replace the regex by just
calling the relevent `consumeXXX` APIs on `llvm::StringRef`). Though I
left that for the future.

rdar://130780342
2025-02-07 09:27:04 +00:00

15 lines
419 B
Plaintext

# RUN: %clang_host -g -O0 %S/Inputs/main.c -o %t.out
# RUN: %lldb %t.out -b -s %s | FileCheck %s
breakpoint set -a "main+26"
breakpoint set -a "main+ 26"
breakpoint set -a "main +26"
breakpoint set -a "main + 26"
breakpoint set -a "main + 26"
# CHECK: Breakpoint 1: address =
# CHECK: Breakpoint 2: address =
# CHECK: Breakpoint 3: address =
# CHECK: Breakpoint 4: address =
# CHECK: Breakpoint 5: address =