summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-04-29 10:37:28 +0930
committerAlan Modra <amodra@gmail.com>2023-05-03 14:40:49 +0930
commitdf2fc6fbfd8f8188b06a6dd3c8987e8c3135ec58 (patch)
tree565073f8cc33644ef1474609d5ba783ff2947ab0 /gdb
parente84ca83738a748d8afe53e74b9666e74ae708dcc (diff)
downloadbinutils-gdb-df2fc6fbfd8f8188b06a6dd3c8987e8c3135ec58.tar.gz
Change signature of bfd crc functions
The crc calculated is 32 bits. Replace uses of unsigned long with uint32_t. Also use bfd_byte* for buffers. bfd/ * opncls.c (bfd_calc_gnu_debuglink_crc32): Use stdint types. (bfd_get_debug_link_info_1, bfd_get_debug_link_info): Likewise. (separate_debug_file_exists, bfd_follow_gnu_debuglink): Likewise. (bfd_fill_in_gnu_debuglink_section): Likewise. * bfd-in2.h: Regenerate. gdb/ * auto-load.c (auto_load_objfile_script): Update type of bfd_get_debug_link_info argument. * symfile.c (find_separate_debug_file_by_debuglink): Likewise. * gdb_bfd.c (get_file_crc): Update type of bfd_calc_gnu_debuglink_crc32 argument.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/auto-load.c2
-rw-r--r--gdb/gdb_bfd.c2
-rw-r--r--gdb/symfile.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 40b05fdc634..5267cb4e64d 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -856,7 +856,7 @@ auto_load_objfile_script (struct objfile *objfile,
struct objfile *parent = objfile->separate_debug_objfile_backlink;
if (parent != nullptr)
{
- unsigned long crc32;
+ uint32_t crc32;
gdb::unique_xmalloc_ptr<char> debuglink
(bfd_get_debug_link_info (parent->obfd.get (), &crc32));
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
index b05c78218ed..17e454eb9fd 100644
--- a/gdb/gdb_bfd.c
+++ b/gdb/gdb_bfd.c
@@ -822,7 +822,7 @@ gdb_bfd_map_section (asection *sectp, bfd_size_type *size)
static int
get_file_crc (bfd *abfd, unsigned long *file_crc_return)
{
- unsigned long file_crc = 0;
+ uint32_t file_crc = 0;
if (bfd_seek (abfd, 0, SEEK_SET) != 0)
{
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 8ae2177b159..d0cb5cb6534 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1536,7 +1536,7 @@ std::string
find_separate_debug_file_by_debuglink
(struct objfile *objfile, std::vector<std::string> *warnings_vector)
{
- unsigned long crc32;
+ uint32_t crc32;
gdb::unique_xmalloc_ptr<char> debuglink
(bfd_get_debug_link_info (objfile->obfd.get (), &crc32));