public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/28606] New: Breakpoint command lists are only executed after exit from while loop
@ 2021-11-18 14:23 szepkuti.bence at gmail dot com
  2021-11-18 14:24 ` [Bug breakpoints/28606] " szepkuti.bence at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: szepkuti.bence at gmail dot com @ 2021-11-18 14:23 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28606
           Summary: Breakpoint command lists are only executed after exit
                    from while loop
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: breakpoints
          Assignee: unassigned at sourceware dot org
          Reporter: szepkuti.bence at gmail dot com
  Target Milestone: ---

Created attachment 13794
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13794&action=edit
test.c

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug breakpoints/28606] Breakpoint command lists are only executed after exit from while loop
  2021-11-18 14:23 [Bug breakpoints/28606] New: Breakpoint command lists are only executed after exit from while loop szepkuti.bence at gmail dot com
@ 2021-11-18 14:24 ` szepkuti.bence at gmail dot com
  2021-11-18 14:29 ` szepkuti.bence at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: szepkuti.bence at gmail dot com @ 2021-11-18 14:24 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Bence Szépkúti <szepkuti.bence at gmail dot com> ---
Created attachment 13795
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13795&action=edit
test.gdb

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug breakpoints/28606] Breakpoint command lists are only executed after exit from while loop
  2021-11-18 14:23 [Bug breakpoints/28606] New: Breakpoint command lists are only executed after exit from while loop szepkuti.bence at gmail dot com
  2021-11-18 14:24 ` [Bug breakpoints/28606] " szepkuti.bence at gmail dot com
@ 2021-11-18 14:29 ` szepkuti.bence at gmail dot com
  2021-11-18 14:30 ` szepkuti.bence at gmail dot com
  2021-11-18 14:56 ` szepkuti.bence at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: szepkuti.bence at gmail dot com @ 2021-11-18 14:29 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Bence Szépkúti <szepkuti.bence at gmail dot com> ---
Command lists set for breakpoints encountered while inside a while loop in a
gdb script don't get executed until we exit from the while loop.

Steps to reproduce:

$ gcc -O0 -g -o test test.c
$ gdb -batch -x test.gdb ./test
Breakpoint 1 at 0x5fe: file test.c, line 2.

Breakpoint 1, foo () at test.c:2
2           return 1;
Breakpoint hit 1 time(s)
$i at the start of the loop: 1

Breakpoint 1, foo () at test.c:2
2           return 1;
$i at the end of the loop: 1
Breakpoint hit 2 time(s)
$i after the end of the loop: 2

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug breakpoints/28606] Breakpoint command lists are only executed after exit from while loop
  2021-11-18 14:23 [Bug breakpoints/28606] New: Breakpoint command lists are only executed after exit from while loop szepkuti.bence at gmail dot com
  2021-11-18 14:24 ` [Bug breakpoints/28606] " szepkuti.bence at gmail dot com
  2021-11-18 14:29 ` szepkuti.bence at gmail dot com
@ 2021-11-18 14:30 ` szepkuti.bence at gmail dot com
  2021-11-18 14:56 ` szepkuti.bence at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: szepkuti.bence at gmail dot com @ 2021-11-18 14:30 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Bence Szépkúti <szepkuti.bence at gmail dot com> ---
Created attachment 13796
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13796&action=edit
Output of the test

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug breakpoints/28606] Breakpoint command lists are only executed after exit from while loop
  2021-11-18 14:23 [Bug breakpoints/28606] New: Breakpoint command lists are only executed after exit from while loop szepkuti.bence at gmail dot com
                   ` (2 preceding siblings ...)
  2021-11-18 14:30 ` szepkuti.bence at gmail dot com
@ 2021-11-18 14:56 ` szepkuti.bence at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: szepkuti.bence at gmail dot com @ 2021-11-18 14:56 UTC (permalink / raw)
  To: gdb-prs

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

Bence Szépkúti <szepkuti.bence at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |szepkuti.bence at gmail dot com

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-18 14:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 14:23 [Bug breakpoints/28606] New: Breakpoint command lists are only executed after exit from while loop szepkuti.bence at gmail dot com
2021-11-18 14:24 ` [Bug breakpoints/28606] " szepkuti.bence at gmail dot com
2021-11-18 14:29 ` szepkuti.bence at gmail dot com
2021-11-18 14:30 ` szepkuti.bence at gmail dot com
2021-11-18 14:56 ` szepkuti.bence at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).