public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "xdegaye at gmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug breakpoints/13574] New: breakpoint data not consistent after source editing and run Date: Sun, 08 Jan 2012 12:10:00 -0000 [thread overview] Message-ID: <bug-13574-4717@http.sourceware.org/bugzilla/> (raw) http://sourceware.org/bugzilla/show_bug.cgi?id=13574 Bug #: 13574 Summary: breakpoint data not consistent after source editing and run Product: gdb Version: 7.3 Status: NEW Severity: normal Priority: P2 Component: breakpoints AssignedTo: unassigned@sourceware.org ReportedBy: xdegaye@gmail.com Classification: Unclassified The following gdb session shows that after inserting an empty line before a breakpoint, recompiling and re-running, then the 'info' and 'clear' commands refer to the breakpoint old line number while the 'list' command and gdb when stopping at this breakpoint, refer to the new line number. The gdb/mi '-break-list' command also reports the breakpoint old line number. === foo.c ====================== int main(int argc, char ** argv) { return 0; } === gdb session ================ $ gcc -g foo.c $ gdb-7.3.92/install/bin/gdb a.out GNU gdb (GDB) 7.3.92 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /path/to/a.out...done. (gdb) break foo.c:3 Breakpoint 1 at 0x400487: file foo.c, line 3. (gdb) run Starting program: /path/to/a.out Breakpoint 1, main (argc=1, argv=0x7fffffffe7e8) at foo.c:3 3 return 0; (gdb) # insert a new line before the breakpoint at line 3 (gdb) shell sed -i -e "s/^\s*\({\)\s*$/\1\n/" foo.c; gcc -g foo.c (gdb) run The program being debugged has been started already. Start it from the beginning? (y or n) yes `/path/to/a.out' has changed; re-reading symbols. Starting program: /path/to/a.out Breakpoint 1, main (argc=1, argv=0x7fffffffe7e8) at foo.c:4 4 return 0; (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 0x0000000000400487 in main at foo.c:3 breakpoint already hit 1 time (gdb) clear 4 No breakpoint at 4. (gdb) clear 3 Deleted breakpoint 1 (gdb) list 1 int main(int argc, char ** argv) 2 { 3 4 return 0; 5 } (gdb) =================== -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next reply other threads:[~2012-01-08 12:10 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-01-08 12:10 xdegaye at gmail dot com [this message] 2012-01-08 12:45 ` [Bug breakpoints/13574] " zilla at kayari dot org 2024-01-07 16:59 ` ssbssa at sourceware dot org
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-13574-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).