public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/12932] New: Incorrent code line number on breakpoint set by function name
@ 2011-06-24 23:55 jimenezrick at gmail dot com
  2011-06-24 23:56 ` [Bug breakpoints/12932] " jimenezrick at gmail dot com
  2011-07-29 21:09 ` jan.kratochvil at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: jimenezrick at gmail dot com @ 2011-06-24 23:55 UTC (permalink / raw)
  To: gdb-prs

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

           Summary: Incorrent code line number on breakpoint set by
                    function name
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jimenezrick@gmail.com


Created attachment 5820
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5820
Test case

*Tested on GDB 7.3.50.20110624 x86_64*

In the next code, add a breakpoint in the function `f' with
the command `break f'. The breakpoint is placed after the
last brace of `for (;;)' which is wrong. It makes bypass the
first iteration of the loop. When the breakpoint is hit then i=1:

=================================================
void f(char *s, int i)
{
        for (;;) {
                if (s[i++] == '\n')
                        break;
        } <--- breakpoint set here with `break f'
               with i=1
}

int main(int argc, char *argv[])
{
        char buf[] = "0123456789\n";

        f(buf, 0);

        return 0;
}
=================================================

-- 
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/12932] Incorrent code line number on breakpoint set by function name
  2011-06-24 23:55 [Bug breakpoints/12932] New: Incorrent code line number on breakpoint set by function name jimenezrick at gmail dot com
@ 2011-06-24 23:56 ` jimenezrick at gmail dot com
  2011-07-29 21:09 ` jan.kratochvil at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jimenezrick at gmail dot com @ 2011-06-24 23:56 UTC (permalink / raw)
  To: gdb-prs

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

Ricardo Catalinas Jiménez <jimenezrick at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jimenezrick at gmail dot
                   |                            |com

-- 
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/12932] Incorrent code line number on breakpoint set by function name
  2011-06-24 23:55 [Bug breakpoints/12932] New: Incorrent code line number on breakpoint set by function name jimenezrick at gmail dot com
  2011-06-24 23:56 ` [Bug breakpoints/12932] " jimenezrick at gmail dot com
@ 2011-07-29 21:09 ` jan.kratochvil at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-07-29 21:09 UTC (permalink / raw)
  To: gdb-prs

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

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jan.kratochvil at redhat
                   |                            |dot com
         Resolution|                            |INVALID

--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-07-29 21:09:27 UTC ---
Filed as:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49906

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

end of thread, other threads:[~2011-07-29 21:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-24 23:55 [Bug breakpoints/12932] New: Incorrent code line number on breakpoint set by function name jimenezrick at gmail dot com
2011-06-24 23:56 ` [Bug breakpoints/12932] " jimenezrick at gmail dot com
2011-07-29 21:09 ` jan.kratochvil at redhat 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).