Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardware breakpoints are not marked as such on arm/aarch64 #44004

Open
JDevlieghere opened this issue Jan 25, 2020 · 1 comment
Open

Hardware breakpoints are not marked as such on arm/aarch64 #44004

JDevlieghere opened this issue Jan 25, 2020 · 1 comment
Labels
bugzilla Issues migrated from bugzilla lldb

Comments

@JDevlieghere
Copy link
Member

Bugzilla Link 44659
Version unspecified
OS Linux
CC @DavidSpickett,@JDevlieghere

Extended Description

BreakpointSites know they're backed by hardware based on whether the "hardware index" is set. This does not appear the to be done for arm/aarch64, which caused the hardware breakpoints to appear as software breakpoints.

2: name = 'hw_break_function'
2.1:
module = /home/buildslave/buildslave/lldb-cmake-aarch64/build/lldb-test-build.noindex/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.test_hw_break_set_disable_multi_thread_linux/a.out
compile unit = main.cpp
function = hw_break_function(unsigned int)
location = /home/buildslave/buildslave/lldb-cmake-aarch64/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/main.cpp:21:57
address = 0x0000000000400d7c
resolved = true
hardware = false
hit count = 2'

@DavidSpickett
Copy link
Collaborator

I just came across this, I can look into it further if you can remember how you were placing the breakpoints.

At least in some places, we're hardware if we have an index and it's been resolved.

This is what I see with a breakpoint by name at least:

(lldb) breakpoint set -n main --hardware
Breakpoint 1: where = test.o`main + 8 at test.c:11, address = 0x000000000000077c
(lldb) breakpoint list -v
Current breakpoints:
1: name = 'main'
1.1:
module = /tmp/test.o
compile unit = test.c
function = main
location = /tmp/test.c:11
address = test.o[0x000000000000077c]
resolved = false
hardware = false
hit count = 0

(lldb) run
Process 1167457 launched: '/tmp/test.o' (aarch64)
Process 1167457 stopped

  • thread #​1, name = 'test.o', stop reason = breakpoint 1.1
    frame #​0: 0x0000aaaaaaaaa77c test.o`main at test.c:11
    8 Foo f attribute((aligned (64))) = { .a=1, .b=2};
    9
    10 int main() {
    -> 11 printf("---------------------------\n");
    12 printf(" f.a: %p f.b: %p\n", &f.a, &f.b);
    13 printf("---------------------------\n");
    14
    (lldb) breakpoint list -v
    Current breakpoints:
    1: name = 'main'
    1.1:
    module = /tmp/test.o
    compile unit = test.c
    function = main
    location = /tmp/test.c:11
    address = 0x0000aaaaaaaaa77c
    resolved = true
    hardware = true
    hit count = 1

(lldb)

What did you do to get the resolved but not hardware state?

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla lldb
Projects
None yet
Development

No branches or pull requests

2 participants