diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/maint.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4158161..1478824 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2019-09-12 Andrew Burgess <andrew.burgess@embecosm.com> + * maint.c (maint_print_section_data::maint_print_section_data): + Force use of 'float log10 (float)' by casting the argument to + float. + +2019-09-12 Andrew Burgess <andrew.burgess@embecosm.com> + * maint.c: Add 'cmath' include. (struct maint_print_section_data): New structure. (print_section_index): New function. diff --git a/gdb/maint.c b/gdb/maint.c index 286ec31..1a621a1 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -301,7 +301,7 @@ struct maint_print_section_data arg(arg) { int section_count = gdb_bfd_count_sections (abfd); - index_digits = ((int) log10 (section_count)) + 1; + index_digits = ((int) log10 ((float) section_count)) + 1; } private: |