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]

gdb/1687: local variables in inner blocks are unknown to gdb


>Number:         1687
>Category:       gdb
>Synopsis:       local variables in inner blocks are unknown to gdb
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 23 15:48:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     m.mueller99@kay-mueller.de
>Release:        gdb 6.1.1
>Organization:
>Environment:
Solaris SPARC
  Sun C 5.5 2003/03/12
  Forte Developer 7 C 5.4 2002/03/09
  Sun WorkShop 6 update 2 C 5.3 2001/05/15
  Sun WorkShop 6 2000/04/07 C 5.1
>Description:
For Sun CC compiled programs using stabs gdb seems to have no knowldege 
about local variables in inner blocks.

cc -xdebugformat=dwarf is ok.
>How-To-Repeat:
GNU gdb 6.1.1
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       int
4       main()
5       {
6         int n = 7;
7
8         if (n == 7)
9           {
10          int k = n + 1;
11          printf("k = %d\n", k);
12          }
13        return 0;
14      }
(gdb) b 11
Breakpoint 1 at 0x106a0: file p8.c, line 11.
(gdb) run
Starting program: /export/home/michaelm/gdb/tst/p8

Breakpoint 1, main () at p8.c:11
11          printf("k = %d\n", k);
(gdb) p k
No symbol "k" in current context.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="p8.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="p8.c"

I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQKbWFpbigpCnsKICBpbnQgbiA9IDc7CgogIGlmIChuID09
IDcpCiAgICB7CiAgICBpbnQgayA9IG4gKyAxOwogICAgcHJpbnRmKCJrID0gJWRcbiIsIGspOwog
ICAgfQogIHJldHVybiAwOwp9Cg==


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