This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

breakpoints/1682: breakpoint on a function name or first line in function does not work


>Number:         1682
>Category:       breakpoints
>Synopsis:       breakpoint on a function name or first line in function does not work
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 21 12:58:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     m.mueller99@kay-mueller.de
>Release:        gdb 6.1
>Organization:
>Environment:
Solaris SPARC 32 and 64 bits, only with Sun cc
>Description:
Breakpoint on function name stops at wrong location. 
Breakpoint on first line in function outputs 

  "Cannot insert breakpoint <n>. 
   Error accessing memory address 0x0: I/O error."
>How-To-Repeat:
  GNU gdb 20040614
  Copyright 2004 Free Software Foundation, Inc.
  GDB is free software, covered by the GNU General Public License, and you are
  welcome to change it and/or distribute copies of it under certain conditions.
  Type "show copying" to see the conditions.
  There is absolutely no warranty for GDB.  Type "show warranty" for details.
  This GDB was configured as "sparc-sun-solaris2.8"...
  (gdb) list 1,100
  1       #include <stdio.h>
  2
  3       void fun(void);
  4
  5       int
  6       main()
  7       {
  8         fun();
  9         printf("line %d\n", __LINE__);
  10      }
  11
  12      void
  13      fun()
  14      {
  15        int n = 7;
  16
  17        printf("fun: n = %d\n", n);
  18      }
  (gdb) b main
  Breakpoint 1 at 0x106cc: file p1.c, line 9.
  (gdb) run
  Starting program: /export/home/michaelm/gdb/gdb-6.1.patch/tst/p1
  fun: n = 7

  Breakpoint 1, main () at p1.c:9
  9         printf("line %d\n", __LINE__);
  (gdb) # This is the second line in main!!!
  (gdb) b 8
  Breakpoint 2 at 0x0: file p1.c, line 8.
  (gdb) run
  The program being debugged has been started already.
  Start it from the beginning? (y or n) y

  Starting program: /export/home/michaelm/gdb/gdb-6.1.patch/tst/p1
  Warning:
  Cannot insert breakpoint 2.
  Error accessing memory address 0x0: I/O error.

  (gdb)

>Fix:
see 

http://sources.redhat.com/ml/gdb-patches/2004-06/msg00448.html
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]