diff mbox

Oh dear. I regret to inform you that commit aa17805fb9a3a1983a510ba425b682fba03410c2 might be unfortunate

Message ID 20190913013155.GS6076@embecosm.com
State New
Headers show

Commit Message

Andrew Burgess Sept. 13, 2019, 1:31 a.m. UTC
* gdb-buildbot@sergiodj.net <gdb-buildbot@sergiodj.net> [2019-09-12 21:04:31 -0400]:

> My lords, ladies, gentlemen, members of the public.
> It is a matter of great regret and sadness to inform you that commit:
> 	gdb: Have 'maint info sections' print all sections again
> 	aa17805fb9a3a1983a510ba425b682fba03410c2
> might have made GDB unwell.  Since I am just your Butler BuildBot,
> I kindly ask that a human superior officer double-check this.
> Please note that if you are reading this message on gdb-patches, there might
> be other builders broken.

Apologies for causing this breakage.

I have pushed the patch below which should resolve this issue.



commit ec6c8338a89b0ec022b66ed3efdd1577e6449d6d
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Thu Sep 12 21:23:37 2019 -0400

    gdb: Force use of float version of log10
    This commit:
      commit aa17805fb9a3a1983a510ba425b682fba03410c2
      Date:   Sat Aug 31 23:44:40 2019 +0100
          gdb: Have 'maint info sections' print all sections again
    introduced a use of log10 that took an int as a parameter.
    Unfortunately this was causing a compilation error on Solaris, see:
    because there was only a float, double, or long double version of
    log10, and the compiler doesn't know which to choose.
    This commit should resolve this issue by casting the argument to
            * maint.c (maint_print_section_data::maint_print_section_data):
            Force use of 'float log10 (float)' by casting the argument to
diff mbox


diff --git a/gdb/maint.c b/gdb/maint.c
index 286ec310135..1a621a17191 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -301,7 +301,7 @@  struct maint_print_section_data
     int section_count = gdb_bfd_count_sections (abfd);
-    index_digits = ((int) log10 (section_count)) + 1;
+    index_digits = ((int) log10 ((float) section_count)) + 1;