public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/13574] New: breakpoint data not consistent after source editing and run
@ 2012-01-08 12:10 xdegaye at gmail dot com
  2012-01-08 12:45 ` [Bug breakpoints/13574] " zilla at kayari dot org
  2024-01-07 16:59 ` ssbssa at sourceware dot org
  0 siblings, 2 replies; 3+ messages in thread
From: xdegaye at gmail dot com @ 2012-01-08 12:10 UTC (permalink / raw)
  To: gdb-prs

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.


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

* [Bug breakpoints/13574] breakpoint data not consistent after source editing and run
  2012-01-08 12:10 [Bug breakpoints/13574] New: breakpoint data not consistent after source editing and run xdegaye at gmail dot com
@ 2012-01-08 12:45 ` zilla at kayari dot org
  2024-01-07 16:59 ` ssbssa at sourceware dot org
  1 sibling, 0 replies; 3+ messages in thread
From: zilla at kayari dot org @ 2012-01-08 12:45 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13574

Jonathan Wakely <zilla at kayari dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zilla at kayari dot org

-- 
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.


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

* [Bug breakpoints/13574] breakpoint data not consistent after source editing and run
  2012-01-08 12:10 [Bug breakpoints/13574] New: breakpoint data not consistent after source editing and run xdegaye at gmail dot com
  2012-01-08 12:45 ` [Bug breakpoints/13574] " zilla at kayari dot org
@ 2024-01-07 16:59 ` ssbssa at sourceware dot org
  1 sibling, 0 replies; 3+ messages in thread
From: ssbssa at sourceware dot org @ 2024-01-07 16:59 UTC (permalink / raw)
  To: gdb-prs

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

Hannes Domani <ssbssa at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |8.2
                 CC|                            |ssbssa at sourceware dot org
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Hannes Domani <ssbssa at sourceware dot org> ---
Works since gdb-8.2.

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

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

end of thread, other threads:[~2024-01-07 16:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-08 12:10 [Bug breakpoints/13574] New: breakpoint data not consistent after source editing and run xdegaye at gmail dot com
2012-01-08 12:45 ` [Bug breakpoints/13574] " zilla at kayari dot org
2024-01-07 16:59 ` ssbssa at sourceware dot org

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).