public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label).
       [not found] <20030623085800.8357.sana@stl.sarov.ru>
@ 2009-02-04 21:29 ` fche at redhat dot com
  2009-02-04 21:42 ` mjw at redhat dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2009-02-04 21:29 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label).
       [not found] <20030623085800.8357.sana@stl.sarov.ru>
  2009-02-04 21:29 ` [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label) fche at redhat dot com
@ 2009-02-04 21:42 ` mjw at redhat dot com
  2009-02-04 21:45 ` mjw at redhat dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: mjw at redhat dot com @ 2009-02-04 21:42 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From mjw at redhat dot com  2009-02-04 21:42 -------
Simpler example that shows gcc does generate the DW_TAG_labels

$ cat t.c
#include <stdio.h>

int
main (int argc, char *argv)
{
  int i = 0;
  goto there;

here:
  printf("not here\n");
  i = 1;
  
there:
  printf("but here\n");
  if (i == 0)
    goto here;

done:
  return 0;
}

$ gcc -g -o t t.c

$ readelf -wi t | grep -A3 DW_TAG_label
 <2><b6>: Abbrev Number: 9 (DW_TAG_label)
    <b7>   DW_AT_name        : (indirect string, offset: 0x47): there	
    <bb>   DW_AT_decl_file   : 1	
    <bc>   DW_AT_decl_line   : 13	
--
 <2><c1>: Abbrev Number: 9 (DW_TAG_label)
    <c2>   DW_AT_name        : (indirect string, offset: 0x48): here	
    <c6>   DW_AT_decl_file   : 1	
    <c7>   DW_AT_decl_line   : 16	
--
 <2><cc>: Abbrev Number: 9 (DW_TAG_label)
    <cd>   DW_AT_name        : (indirect string, offset: 0xe): done	
    <d1>   DW_AT_decl_file   : 1	
    <d2>   DW_AT_decl_line   : 18	

$ gdb t
GNU gdb Fedora (6.8-29.fc10)
Copyright (C) 2008 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 "i386-redhat-linux-gnu"...
(gdb) break 10
Breakpoint 1 at 0x80483cf: file t.c, line 10.
(gdb) run
Starting program: /tmp/t 
but here

Breakpoint 1, main () at t.c:10
10	  printf("not here\n");
(gdb) break done
Function "done" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mjw at redhat dot com


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label).
       [not found] <20030623085800.8357.sana@stl.sarov.ru>
  2009-02-04 21:29 ` [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label) fche at redhat dot com
  2009-02-04 21:42 ` mjw at redhat dot com
@ 2009-02-04 21:45 ` mjw at redhat dot com
  2009-08-18 21:13 ` tromey at redhat dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: mjw at redhat dot com @ 2009-02-04 21:45 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From mjw at redhat dot com  2009-02-04 21:45 -------
Should have shown the DW_AT_lowpc is also there:
$ readelf -wi t | grep -A4 DW_TAG_label
 <2><b6>: Abbrev Number: 9 (DW_TAG_label)
    <b7>   DW_AT_name        : (indirect string, offset: 0x47): there	
    <bb>   DW_AT_decl_file   : 1	
    <bc>   DW_AT_decl_line   : 13	
    <bd>   DW_AT_low_pc      : 0x80483e2	
 <2><c1>: Abbrev Number: 9 (DW_TAG_label)
    <c2>   DW_AT_name        : (indirect string, offset: 0x48): here	
    <c6>   DW_AT_decl_file   : 1	
    <c7>   DW_AT_decl_line   : 16	
    <c8>   DW_AT_low_pc      : 0x80483cf	
 <2><cc>: Abbrev Number: 9 (DW_TAG_label)
    <cd>   DW_AT_name        : (indirect string, offset: 0xe): done	
    <d1>   DW_AT_decl_file   : 1	
    <d2>   DW_AT_decl_line   : 18	
    <d3>   DW_AT_low_pc      : 0x80483f4	


-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label).
       [not found] <20030623085800.8357.sana@stl.sarov.ru>
                   ` (2 preceding siblings ...)
  2009-02-04 21:45 ` mjw at redhat dot com
@ 2009-08-18 21:13 ` tromey at redhat dot com
  2009-08-18 22:24 ` tromey at redhat dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: tromey at redhat dot com @ 2009-08-18 21:13 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2009-08-18 21:13 -------
gdb reads the labels and even creates a symbol for them,
but then discards this symbol.  As far as I can tell this is
just an oversight; the code in question dates back to the
original public revision.
Search for DW_TAG_label in dwarf2read.c.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at redhat dot com


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label).
       [not found] <20030623085800.8357.sana@stl.sarov.ru>
                   ` (3 preceding siblings ...)
  2009-08-18 21:13 ` tromey at redhat dot com
@ 2009-08-18 22:24 ` tromey at redhat dot com
  2010-07-12 16:11 ` richard dot stuckey at virgin dot net
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: tromey at redhat dot com @ 2009-08-18 22:24 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2009-08-18 22:24 -------
Testing a patch.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware dot|tromey at redhat dot com
                   |org                         |


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label).
       [not found] <20030623085800.8357.sana@stl.sarov.ru>
                   ` (4 preceding siblings ...)
  2009-08-18 22:24 ` tromey at redhat dot com
@ 2010-07-12 16:11 ` richard dot stuckey at virgin dot net
  2010-07-13 19:24 ` tromey at redhat dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: richard dot stuckey at virgin dot net @ 2010-07-12 16:11 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From richard dot stuckey at virgin dot net  2010-07-12 16:11 -------
(In reply to comment #4)
> Testing a patch.

Hello, has there been any progress on this one?

I am seeing the same behaviour.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label).
       [not found] <20030623085800.8357.sana@stl.sarov.ru>
                   ` (5 preceding siblings ...)
  2010-07-12 16:11 ` richard dot stuckey at virgin dot net
@ 2010-07-13 19:24 ` tromey at redhat dot com
  2010-07-13 20:10 ` tromey at redhat dot com
  2010-07-23 14:36 ` richard dot stuckey at virgin dot net
  8 siblings, 0 replies; 9+ messages in thread
From: tromey at redhat dot com @ 2010-07-13 19:24 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2010-07-13 19:24 -------
The thread is here:
http://sourceware.org/ml/gdb-patches/2009-08/msg00322.html

I think I will just commit this and file a new bug for the follow-ups.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label).
       [not found] <20030623085800.8357.sana@stl.sarov.ru>
                   ` (6 preceding siblings ...)
  2010-07-13 19:24 ` tromey at redhat dot com
@ 2010-07-13 20:10 ` tromey at redhat dot com
  2010-07-23 14:36 ` richard dot stuckey at virgin dot net
  8 siblings, 0 replies; 9+ messages in thread
From: tromey at redhat dot com @ 2010-07-13 20:10 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2010-07-13 20:08 -------
Subject: Bug 8357

CVSROOT:	/cvs/src
Module name:	src
Changes by:	tromey@sourceware.org	2010-07-13 20:07:48

Modified files:
	gdb            : ChangeLog dwarf2read.c linespec.c symtab.h 
	gdb/doc        : ChangeLog gdb.texinfo 
	gdb/testsuite  : ChangeLog 
Added files:
	gdb/testsuite/gdb.base: label.c label.exp 

Log message:
	gdb
	PR breakpoints/8357:
	* symtab.h (domain_enum_tag) <LABEL_DOMAIN>: Update comment.
	* linespec.c (decode_line_1): Update comment.  Call decode_label.
	(decode_label): New function.
	(symbol_found): Handle LOC_LABEL.
	* dwarf2read.c (new_symbol) <DW_TAG_label>: Set symbol's type and
	domain.  Call add_symbol_to_list.
	gdb/doc
	* gdb.texinfo (Specify Location): Document labels.
	gdb/testsuite
	* gdb.base/label.exp: New file.
	* gdb.base/label.c: New file.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11982&r2=1.11983
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/dwarf2read.c.diff?cvsroot=src&r1=1.412&r2=1.413
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/linespec.c.diff?cvsroot=src&r1=1.103&r2=1.104
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/symtab.h.diff?cvsroot=src&r1=1.154&r2=1.155
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1083&r2=1.1084
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.737&r2=1.738
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2378&r2=1.2379
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/label.c.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/label.exp.diff?cvsroot=src&r1=NONE&r2=1.1


------- Additional Comments From tromey at redhat dot com  2010-07-13 20:10 -------
I checked in the fix to cvs trunk.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |7.3


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label).
       [not found] <20030623085800.8357.sana@stl.sarov.ru>
                   ` (7 preceding siblings ...)
  2010-07-13 20:10 ` tromey at redhat dot com
@ 2010-07-23 14:36 ` richard dot stuckey at virgin dot net
  8 siblings, 0 replies; 9+ messages in thread
From: richard dot stuckey at virgin dot net @ 2010-07-23 14:36 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From richard dot stuckey at virgin dot net  2010-07-23 14:36 -------
I've applied your fix to our sources, and it's working fine.  This is of great
help in our microcode debugging.

Many thanks.



-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2010-07-23 14:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030623085800.8357.sana@stl.sarov.ru>
2009-02-04 21:29 ` [Bug breakpoints/8357] GDB does not support work with labels (DW_TAG_label) fche at redhat dot com
2009-02-04 21:42 ` mjw at redhat dot com
2009-02-04 21:45 ` mjw at redhat dot com
2009-08-18 21:13 ` tromey at redhat dot com
2009-08-18 22:24 ` tromey at redhat dot com
2010-07-12 16:11 ` richard dot stuckey at virgin dot net
2010-07-13 19:24 ` tromey at redhat dot com
2010-07-13 20:10 ` tromey at redhat dot com
2010-07-23 14:36 ` richard dot stuckey at virgin dot net

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