mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
Improve GDB support for FreeBSD host/target.
To configure.in: make PRINTF_HAS_LONG_LONG check more pedantic; check that SCANF_HAS_LONG_DOUBLE instead of assuming PRINTF_HAS_LONG_DOUBLE implies it; document.
This commit is contained in:
parent
d14573e31e
commit
f7b8c9ce46
@ -1,3 +1,21 @@
|
||||
Mon Nov 24 08:59:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* config/i386/tm-fbsd.h: New file.
|
||||
* config/i386/fbsd.mt (TM_FILE): Change to tm-fbsd.h.
|
||||
|
||||
* config/i386/nm-fbsd.h (FLOAT_INFO): Move definition from here.
|
||||
* config/i386/tm-fbsd.h (FLOAT_INFO): To here.
|
||||
|
||||
* configure.in (PRINTF_HAS_LONG_LONG): Check full functionality of
|
||||
%ll format specifier.
|
||||
(SCANF_HAS_LONG_DOUBLE): Check the scanf family for support of
|
||||
long double using %Lg.
|
||||
* acconfig.h: Provide default undef for SCANF_HAS_LONG_DOUBLE.
|
||||
* configure: Re-generate.
|
||||
|
||||
* c-exp.y (parse_number): Use sscanf %Lg when host has
|
||||
SCANF_HAS_LONG_DOUBLE not PRINTF_HAS_LONG_DOUBLE
|
||||
|
||||
Sun Nov 23 17:12:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* printcmd.c (print_insn): Set the machine type if known.
|
||||
|
@ -24,6 +24,9 @@
|
||||
/* Define if the "%Lg" format works to print long doubles. */
|
||||
#undef PRINTF_HAS_LONG_DOUBLE
|
||||
|
||||
/* Define if the "%Lg" format works to scan long doubles. */
|
||||
#undef SCANF_HAS_LONG_DOUBLE
|
||||
|
||||
/* Define if using Solaris thread debugging. */
|
||||
#undef HAVE_THREAD_DB_LIB
|
||||
|
||||
|
@ -936,7 +936,7 @@ parse_number (p, len, parsed_float, putithere)
|
||||
num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval,&c);
|
||||
else
|
||||
{
|
||||
#ifdef PRINTF_HAS_LONG_DOUBLE
|
||||
#ifdef SCANF_HAS_LONG_DOUBLE
|
||||
num = sscanf (p, "%Lg%c", &putithere->typed_val_float.dval,&c);
|
||||
#else
|
||||
/* Scan it into a double, then assign it to the long double.
|
||||
|
32
gdb/config/i386/tm-fbsd.h
Normal file
32
gdb/config/i386/tm-fbsd.h
Normal file
@ -0,0 +1,32 @@
|
||||
/* Target macro definitions for i386 running FreeBSD
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include "i386/tm-i386bsd.h"
|
||||
|
||||
|
||||
#undef NUM_REGS
|
||||
#define NUM_REGS 14
|
||||
|
||||
|
||||
#undef IN_SOLIB_CALL_TRAMPOLINE
|
||||
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) STREQ (name, "_DYNAMIC")
|
||||
|
||||
|
||||
extern i386_float_info ();
|
||||
#define FLOAT_INFO i386_float_info ()
|
306
gdb/configure
vendored
306
gdb/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -119,10 +119,14 @@ AC_MSG_CHECKING(for long long support in printf)
|
||||
AC_CACHE_VAL(gdb_cv_printf_has_long_long,
|
||||
[AC_TRY_RUN([
|
||||
int main () {
|
||||
char buf[16];
|
||||
long long l = 0x12345;
|
||||
sprintf (buf, "%llx", l);
|
||||
return (strcmp ("12345", buf));
|
||||
char buf[32];
|
||||
long long l = 0;
|
||||
l = (l << 16) + 0x0123;
|
||||
l = (l << 16) + 0x4567;
|
||||
l = (l << 16) + 0x89ab;
|
||||
l = (l << 16) + 0xcdef;
|
||||
sprintf (buf, "0x%016llx", l);
|
||||
return (strcmp ("0x0123456789abcdef", buf));
|
||||
}],
|
||||
gdb_cv_printf_has_long_long=yes,
|
||||
gdb_cv_printf_has_long_long=no,
|
||||
@ -164,6 +168,25 @@ if test $gdb_cv_printf_has_long_double = yes; then
|
||||
fi
|
||||
AC_MSG_RESULT($gdb_cv_printf_has_long_double)
|
||||
|
||||
dnl See if the compiler and runtime support scanning long doubles
|
||||
|
||||
AC_MSG_CHECKING(for long double support in scanf)
|
||||
AC_CACHE_VAL(gdb_cv_scanf_has_long_double,
|
||||
[AC_TRY_RUN([
|
||||
int main () {
|
||||
char *buf = "3.141592653";
|
||||
long double f = 0;
|
||||
sscanf (buf, "%Lg", &f);
|
||||
return !(f > 3.14159 && f < 3.14160);
|
||||
}],
|
||||
gdb_cv_scanf_has_long_double=yes,
|
||||
gdb_cv_scanf_has_long_double=no,
|
||||
gdb_cv_scanf_has_long_double=no)])
|
||||
if test $gdb_cv_scanf_has_long_double = yes; then
|
||||
AC_DEFINE(SCANF_HAS_LONG_DOUBLE)
|
||||
fi
|
||||
AC_MSG_RESULT($gdb_cv_scanf_has_long_double)
|
||||
|
||||
AC_FUNC_MMAP
|
||||
|
||||
BFD_NEED_DECLARATION(malloc)
|
||||
|
@ -1,3 +1,8 @@
|
||||
Mon Nov 24 13:55:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* gdbint.texinfo (Host Conditionals): Document
|
||||
PRINTF_HAS_LONG_DOUBLE, SCANF_HAS_LONG_DOUBLE, HAVE_LONG_DOUBLE.
|
||||
|
||||
Fri Jul 4 14:52:31 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* gdbint.texinfo (Host Conditionals): Add CRLF_SOURCE_LINES.
|
||||
|
Loading…
Reference in New Issue
Block a user