This is the mail archive of the gdb-patches@sourceware.org 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]

[PATCH 0/4] Fix dw2-ifort-parameter.exp on 64-bit big-endian systems


I've encountered two problems with dw2-ifort-parameter.exp:

* On PPC64, 'func' and 'main' are function descriptors and don't point
  to the actual code.  Thus the usage of these symbols in
  dw2-ifort-parameter-debug.S is broken.

* On s390x, the test case fails like this:

        Breakpoint 1, 0x00000000800005d2 in func (param=<error reading
        variable: Cannot access memory at address 0x0>)
        (gdb) p/x param
        Cannot access memory at address 0x0
  
  This is because the DWARF pointer size is hard-coded to 4, which leads
  to DW_OP_deref retrieving the topmost (!) four bytes of the value's
  address and using it as the location of a formal parameter.  From
  reading the DWARF standard it could be argued that DW_OP_deref
  shouldn't actually use the DWARF pointer size, but the architecture's
  address size.  However, using the DWARF pointer size is
  long-established practice in gcc and gdb.

The last patch in the series fixes the first problem.  The third patch
fixes the second problem, as a "side effect" of migrating the DWARF code
to Dwarf::assemble.  The first two patches are not really required for
the fix, but just enable the continued use of prepare_for_testing.


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