aboutsummaryrefslogtreecommitdiff
path: root/gdb/parser-defs.h
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-08-19 13:33:15 +0000
committerDoug Evans <dje@google.com>2010-08-19 13:33:15 +0000
commitd30f5e1f70ffa9fab08ccdacdba1bd6365d2511d (patch)
treea578156b090268842ed34a2a077d2eb6b6519cd2 /gdb/parser-defs.h
parent2837d59e6b7e523fee86a5a5a050ecb5554ccd1b (diff)
downloadgdb-d30f5e1f70ffa9fab08ccdacdba1bd6365d2511d.zip
gdb-d30f5e1f70ffa9fab08ccdacdba1bd6365d2511d.tar.gz
gdb-d30f5e1f70ffa9fab08ccdacdba1bd6365d2511d.tar.bz2
PR exp/11926
* parser-defs.h (parse_float, parse_c_float): Declare. * parse.c (parse_float, parse_c_float): New function. * c-exp.y (parse_number): Call parse_c_float. * objc-exp.y (parse_number): Ditto. * p-exp.y (parse_number): Ditto. Use ANSI/ISO-style definition. * jv-exp.y (parse_number): Call parse_float, fix suffix handling. testsuite/ * gdb.base/printcmds.exp (test_float_accepted): New function. Move existing float tests there. Add tests for floats with suffixes. (test_float_rejected): New function. * gdb.java/jv-print.exp (test_float_accepted): New function. (test_float_rejected): New function. * gdb.objc/print.exp: New file. * gdb.pascal/print.exp: New file. * lib/objc.exp: New file.
Diffstat (limited to 'gdb/parser-defs.h')
-rw-r--r--gdb/parser-defs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index bb79ae1..1625575 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -204,6 +204,12 @@ extern struct type *follow_types (struct type *);
extern void null_post_parser (struct expression **, int);
+extern int parse_float (const char *p, int len, DOUBLEST *d,
+ const char **suffix);
+
+extern int parse_c_float (struct gdbarch *gdbarch, const char *p, int len,
+ DOUBLEST *d, struct type **t);
+
/* During parsing of a C expression, the pointer to the next character
is in this variable. */