On ppc64-linux a function symbol does not point to code, but to the
function descriptor. Thus the previous change for this test case
broke it:
https://sourceware.org/ml/gdb-patches/2014-01/msg00275.html
This patch reverts to the original method, re-introducing '_start'
symbols. In addition, it adds sufficient alignment before the label,
such that the label never points into an alignment gap.
gdb/testsuite/ChangeLog:
* gdb.dwarf2/dw2-dir-file-name.c (FUNC): Insert alignment and
define "*_start" label. Make "name" static.
* gdb.dwarf2/dw2-dir-file-name.exp: Replace references to
${name} by references to ${name}_start.
S390, the dw2-dir-file-name test case fails in the first
gdb_continue_to_breakpoint. Indeed, the breakpoint is now placed into
the alignment gap *before* the actual function.
This happens because the test case declares the respective "*_start"
symbol as a "loose" label before the function definition, and the
compiler inserts the alignment between that label and the function
itself.
The "*_start" symbols were only necessary because FUNC made the
function static. The fix makes the functions extern instead, thus
making the "*_start" labels unnecessary.
testsuite/
2014-01-10 Andreas Arnez <arnez@linux.vnet.ibm.com>
Pedro Alves <palves@redhat.com>
* gdb.dwarf2/dw2-dir-file-name.c (FUNC): Remove "*_start" symbol.
Make "name" extern.
* gdb.dwarf2/dw2-dir-file-name.exp (out_cu, out_line): Replace
references to ${name}_start by references to ${name}.
Some files managed to get in the tree with outdated copyright years.
This fixes it. Applied.
gdb/
2013-02-12 Pedro Alves <palves@redhat.com>
* break-catch-sig.c: Update copyright years.
gdb/testsuite/
2013-02-12 Pedro Alves <palves@redhat.com>
* gdb.base/catch-signal.c: Update copyright years.
* gdb.base/catch-signal.exp: Update copyright years.
* gdb.dwarf2/dw2-dir-file-name.c: Update copyright years.
* gdb.dwarf2/dw2-dir-file-name.exp: Update copyright years.
* gdb.dwarf2/dw2-empty-pc-range.S: Update copyright years.
* gdb.dwarf2/dw2-error.S: Update copyright years.
* gdb.dwarf2/dw2-error.c: Update copyright years.
* gdb.dwarf2/dw2-restrict.S: Update copyright years.
* gdb.dwarf2/dw2-restrict.c: Update copyright years.
* gdb.dwarf2/dw2-restrict.exp: Update copyright years.
Add a new variable that controls a way in which filenames are
displayed.
* NEWS (set filename-display): New entry.
* source.c (filename_display_basename, filename_display_relative)
(filename_display_absolute, filename_display_kind_names)
(filename_display_string, show_filename_display_string)
(symtab_to_filename_for_display): New.
(_initialize_source): Added initialization of 'filename-display'
variable.
* source.h (symtab_to_filename_for_display): Added declaration.
* stack.c (print_frame): Added new variable and calling of a new
function and condition with this variable. Changed third argument of
calling of a function.
gdb/doc/
* gdb.texinfo (Backtrace): Added description of 'filename-display'
variable in 'set/show backtrace' section.
gdb/testsuite/
* gdb.dwarf2/dw2-dir-file-name.exp: New file.
* gdb.dwarf2/dw2-dir-file-name.c: New file.