diff options
author | Tom Tromey <tromey@redhat.com> | 2010-07-13 20:07:44 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-07-13 20:07:44 +0000 |
commit | 0f5238edfdd060ff07a15df61aafdfe21fb6427f (patch) | |
tree | adfbbce9ef20143b41a4b028e22ffdca16fb20fe /gdb/testsuite/gdb.base/label.c | |
parent | 131687b4ade7fdff127269e3b92b01ec3d0872c7 (diff) | |
download | binutils-0f5238edfdd060ff07a15df61aafdfe21fb6427f.zip binutils-0f5238edfdd060ff07a15df61aafdfe21fb6427f.tar.gz binutils-0f5238edfdd060ff07a15df61aafdfe21fb6427f.tar.bz2 |
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.
Diffstat (limited to 'gdb/testsuite/gdb.base/label.c')
-rw-r--r-- | gdb/testsuite/gdb.base/label.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/label.c b/gdb/testsuite/gdb.base/label.c new file mode 100644 index 0000000..f9cd8c3 --- /dev/null +++ b/gdb/testsuite/gdb.base/label.c @@ -0,0 +1,21 @@ +#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; +} + |