public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [FYI] Fix the build after bfd_get_signed_8 change
@ 2019-12-11 15:00 Tom Tromey
  2019-12-11 23:15 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2019-12-11 15:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

A recent commit changed bfd_get_signed_8 to extend the result to a
bfd_signed_vma.  This caused a compiler error in one spot in my
--enable-targets=all gdb build, where the result of bfd_get_signed_8
was passed to printf.

This patch fixes the build.  Tested by rebuilding.

gdb/ChangeLog
2019-12-11  Tom Tromey  <tromey@adacore.com>

	* fbsd-tdep.c (fbsd_core_info_proc_status): Cast result of
	bfd_get_signed_8.

Change-Id: Ic015f5fd3d88da6b5da8f7b4e1d11d5c981333db
---
 gdb/ChangeLog   | 5 +++++
 gdb/fbsd-tdep.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index 1d097470fe4..937f696f44c 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -1433,7 +1433,7 @@ fbsd_core_info_proc_status (struct gdbarch *gdbarch)
 			   sec, value);
   printf_filtered ("stime, children: %s.%06d\n", plongest (sec), (int) value);
   printf_filtered ("'nice' value: %d\n",
-		   bfd_get_signed_8 (core_bfd, descdata + kp->ki_nice));
+		   (int) bfd_get_signed_8 (core_bfd, descdata + kp->ki_nice));
   fbsd_core_fetch_timeval (gdbarch, descdata + kp->ki_start, sec, value);
   printf_filtered ("Start time: %s.%06d\n", plongest (sec), (int) value);
   printf_filtered ("Virtual memory size: %s kB\n",
-- 
2.21.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [FYI] Fix the build after bfd_get_signed_8 change
  2019-12-11 15:00 [FYI] Fix the build after bfd_get_signed_8 change Tom Tromey
@ 2019-12-11 23:15 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2019-12-11 23:15 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On Wed, Dec 11, 2019 at 08:00:15AM -0700, Tom Tromey wrote:
> A recent commit changed bfd_get_signed_8 to extend the result to a
> bfd_signed_vma.  This caused a compiler error in one spot in my
> --enable-targets=all gdb build, where the result of bfd_get_signed_8
> was passed to printf.

Sorry, and thanks for cleaning up after me.  I saw the buildbot
message this morning and made the same fix, only to see it disappear
with git rebase.  :-)

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-11 23:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 15:00 [FYI] Fix the build after bfd_get_signed_8 change Tom Tromey
2019-12-11 23:15 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).