public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "brobecker at gnat dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/17525] New: target-async: breakpoint commands not executed when program run from -x script Date: Thu, 30 Oct 2014 18:23:00 -0000 [thread overview] Message-ID: <bug-17525-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=17525 Bug ID: 17525 Summary: target-async: breakpoint commands not executed when program run from -x script Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: brobecker at gnat dot com We stumbled onto a regression that is making me think we should be making a GDB 7.8.2 release, after all. On x86_64-linux, with current HEAD or 7.8, consider the following C program: % cat foo.c int increment (int i) { return i + 1; } #define N_INCR 20 int main (void) { int val = 1; int j; for (j = 0; j < N_INCR; j++) val = increment (val); return val == N_INCR; } And the following GDB script: % cat cmds.gdb file foo break increment commands cont end run The script inserts a breakpoint on a function that gets called repetitively, and adds a commands-list to that breakpoint that just "cont"s (until we reach the end of the program). However, trying to execute that script by passing it as a -x argument on the command line yields the following behavior: % /t.a/brobecke/bld/gdb-public/gdb/gdb -q -x cmds.gdb Breakpoint 1 at 0x40049d: file foo.c, line 4. Breakpoint 1, increment (i=1) at foo.c:4 4 return i + 1; Breakpoint 1, increment (i=2) at foo.c:4 4 return i + 1; (gdb) Adding "maintenance set target-async off" makes the problem disappear. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2014-10-30 18:23 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-30 18:23 brobecker at gnat dot com [this message] 2014-10-30 18:37 ` [Bug gdb/17525] " brobecker at gnat dot com 2015-01-13 17:57 ` palves at redhat dot com 2015-01-13 19:01 ` palves at redhat dot com 2015-01-13 21:03 ` dje at google dot com 2015-01-14 12:38 ` cvs-commit at gcc dot gnu.org 2015-01-14 12:43 ` cvs-commit at gcc dot gnu.org 2015-01-14 13:18 ` cvs-commit at gcc dot gnu.org 2015-01-14 13:48 ` palves at redhat dot com 2021-11-08 8:28 ` richardshodges7 at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-17525-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).