Unbreak gdb build on 32-bit host with ADI support
authorWeimin Pan <weimin.pan@oracle.com>
Sat, 26 Aug 2017 00:33:25 +0000 (19:33 -0500)
committerPedro Alves <palves@redhat.com>
Thu, 31 Aug 2017 08:07:17 +0000 (10:07 +0200)
commit654670a4f0928e3eddc6395d6804deb2e61a0614
tree189acc6ae9d307b8d7cbfeda6c6643328af8d271
parentaf471f828cc74d65b50a7531ba2c69522266cfe9
Unbreak gdb build on 32-bit host with ADI support

The problem of failing to build with arm-linux-gnueabihf-g++-4.8 was
that type CORE_ADDR is of "unsigned long" on a 64-bit machine so it's
OK to use %lx but is of type "unsigned long long" on a 32 bit system.

Fixed the problem in three places - (1) use a temp variable of type
CORE_ADDR as argument 3 when calling target_auxv_search() then assign
its value to "blksize" and "nbits" in 2 calls; (2) redo
adi_normalize_address() using masks and xor operators to calculate
normalized address; (3) call paddress() to print CORE_ADDR in either
printf_filtered() or error(). Thank you, Pedro, for all your
suggestions.

gdb/ChangeLog:
2017-08-31  Weimin Pan  <weimin.pan@oracle.com>

* sparc64-tdep.c (adi_stat_t): Fix comment formatting.
(adi_available): Use a temp variable of type CORE_ADDR as argument
3 when calling target_auxv_search.
(adi_normalize_address): Use masks and xor operators to calculate
normalized address.
(adi_read_versions, adi_write_versions, adi_print_versions)
(do_examine, do_assign): Use paddress.
gdb/ChangeLog
gdb/sparc64-tdep.c
This page took 0.029263 seconds and 4 git commands to generate.