This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug threads/19742] New: When a thread is stopped in non-stop mode, a breakpoint can not be set in another thread


https://sourceware.org/bugzilla/show_bug.cgi?id=19742

            Bug ID: 19742
           Summary: When a thread is stopped in non-stop mode, a
                    breakpoint can not be set in another thread
           Product: gdb
           Version: 7.10
            Status: NEW
          Severity: normal
          Priority: P2
         Component: threads
          Assignee: unassigned at sourceware dot org
          Reporter: beausoleil at free dot fr
  Target Milestone: ---

Hi,

I think there is a problem with GDB thread selection. I am in non-stop mode
with a remote target.

When I select a thread and set a breakpoint, everything goes right.

Once the breakpoint is reached, I want to select another thread and set another
breakpoint, but here GDB automatically sends a 'set thread' packet (Hg)
selecting the interrupted thread again :

# Select thread 1
(gdb)thread 1
-> Hgpa410.1

# Set breakpoint
(gdb)break *addr1
-> Z0,addr1,4
<- Stop:T05swbreak:;thread:pa410.1;

# Breakpoint at addr1 is reached, thread 1 is stopped

# Select thread 2
(gdb)thread 2
-> Hgpa410.2

# Set 2d breakpoint
(gdb)break *addr2
-> Hgpa410.1      # Here GDB automatically switches to thread 1 before setting
the breakpoint !!!
-> Z0,addr2,4

Of course this is not the behaviour that I expect, but I may be wrong... If so,
how to workaround ?

Thanks and regards !

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]