diff options
author | Tom Tromey <tom@tromey.com> | 2020-03-12 13:32:15 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-03-12 13:32:15 -0600 |
commit | 64f251023bcbd068861d4cb83b4e925083e0ea35 (patch) | |
tree | 2cf97ec5aee1f920ba66ddcfc5f9ce1cd98e3c27 /gdb/symfile-mem.c | |
parent | 3f512721a829ce7b2d38236917309a32f42faa99 (diff) | |
download | gdb-64f251023bcbd068861d4cb83b4e925083e0ea35.zip gdb-64f251023bcbd068861d4cb83b4e925083e0ea35.tar.gz gdb-64f251023bcbd068861d4cb83b4e925083e0ea35.tar.bz2 |
Fix CORE_ADDR size assertion in symfile-mem.c
symfile-mem.c has some assertions about the size of various types, to
ensure that gdb and BFD don't get out of sync in a way that would
cause bugs.
Once CORE_ADDR is always 64-bit, one of these assertions can fail for
a 32-bit BFD build. However, the real requirement here is just that
CORE_ADDR is wider -- because this code promotes a bfd_vma to a
CORE_ADDR.
This patch corrects the assert.
gdb/ChangeLog
2020-03-12 Tom Tromey <tom@tromey.com>
* symfile-mem.c: Update CORE_ADDR size assert.
Diffstat (limited to 'gdb/symfile-mem.c')
-rw-r--r-- | gdb/symfile-mem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c index a62d0d0..e2d2e43 100644 --- a/gdb/symfile-mem.c +++ b/gdb/symfile-mem.c @@ -57,7 +57,7 @@ /* Verify parameters of target_read_memory_bfd and target_read_memory are compatible. */ -gdb_static_assert (sizeof (CORE_ADDR) == sizeof (bfd_vma)); +gdb_static_assert (sizeof (CORE_ADDR) >= sizeof (bfd_vma)); gdb_static_assert (sizeof (gdb_byte) == sizeof (bfd_byte)); gdb_static_assert (sizeof (ssize_t) <= sizeof (bfd_size_type)); |