diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-03-26 14:47:19 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-03-26 14:47:19 +0000 |
commit | 442ddf5987d97d3d8fc9c3e64449417d4cec3190 (patch) | |
tree | d697b674588393743f88af467ee7f9501efb0f45 /gdb/testsuite/gdb.dwarf2/dw2-noloc-main.c | |
parent | 4a1f88fe96b6ac3069d7c76e2c07a8b8a5620356 (diff) | |
download | binutils-gdb-442ddf5987d97d3d8fc9c3e64449417d4cec3190.tar.gz |
gdb/
Recognize missing DW_AT_location as <value optimized out>.
* dwarf2read.c
(new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
Call add_symbol_to_list.
gdb/testsuite/
* gdb.dwarf2/dw2-noloc-main.c: New file.
* gdb.dwarf2/dw2-noloc.S: New symbols matrix.
(.text): Remove.
(.data): New.
(DW_AT_stmt_list, .debug_line, DW_AT_frame_base): Remove.
(DW_AT_low_pc, DW_AT_high_pc): Reference `dw2-noloc-main.c'.
(DW_TAG_subprogram func_cu1, noloc): Remove.
(main): New.
* gdb.dwarf2/dw2-noloc.exp: Use prepare_for_testing, compile also
`dw2-noloc-main.c'. Test the new DIEs from `dw2-noloc.S'.
(file_symbols): New procedure.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/dw2-noloc-main.c')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-noloc-main.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-noloc-main.c b/gdb/testsuite/gdb.dwarf2/dw2-noloc-main.c new file mode 100644 index 00000000000..6c59f2338ff --- /dev/null +++ b/gdb/testsuite/gdb.dwarf2/dw2-noloc-main.c @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2009 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +asm (".globl cu_text_start"); +asm ("cu_text_start:"); + +int +main (void) +{ + return 0; +} + +asm (".globl cu_text_end"); +asm ("cu_text_end:"); |