X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fparse.c;h=8841e598a0e3b20474737b791f4e2224aef82005;hb=27bc4d809ea2b4a3e4833806494db3a2fee83c64;hp=95b0c187f9dee7501c0ecb05efa9e9f8b7444306;hpb=64c50499d5446901112a8a7c169fc6cb751f8fe2;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/parse.c b/gdb/parse.c index 95b0c187f9..8841e598a0 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -10,7 +10,7 @@ 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 + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -19,9 +19,7 @@ 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., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ /* Parse an expression from text in a string, and return the result as a struct expression pointer. @@ -249,6 +247,18 @@ write_exp_elt_dblcst (DOUBLEST expelt) write_exp_elt (tmp); } +void +write_exp_elt_decfloatcst (gdb_byte expelt[16]) +{ + union exp_element tmp; + int index; + + for (index = 0; index < 16; index++) + tmp.decfloatconst[index] = expelt[index]; + + write_exp_elt (tmp); +} + void write_exp_elt_type (struct type *expelt) { @@ -471,6 +481,7 @@ write_dollar_variable (struct stoken str) { struct symbol *sym = NULL; struct minimal_symbol *msym = NULL; + struct internalvar *isym = NULL; /* Handle the tokens $digits; also $ (short for $0) and $$ (short for $$1) and $$digits (equivalent to $<-digits> if you could type that). */ @@ -509,6 +520,17 @@ write_dollar_variable (struct stoken str) if (i >= 0) goto handle_register; + /* Any names starting with $ are probably debugger internal variables. */ + + isym = lookup_only_internalvar (copy_name (str) + 1); + if (isym) + { + write_exp_elt_opcode (OP_INTERNALVAR); + write_exp_elt_intern (isym); + write_exp_elt_opcode (OP_INTERNALVAR); + return; + } + /* On some systems, such as HP-UX and hppa-linux, certain system routines have names beginning with $ or $$. Check for those, first. */ @@ -531,10 +553,10 @@ write_dollar_variable (struct stoken str) return; } - /* Any other names starting in $ are debugger internal variables. */ + /* Any other names are assumed to be debugger internal variables. */ write_exp_elt_opcode (OP_INTERNALVAR); - write_exp_elt_intern (lookup_internalvar (copy_name (str) + 1)); + write_exp_elt_intern (create_internalvar (copy_name (str) + 1)); write_exp_elt_opcode (OP_INTERNALVAR); return; handle_last: @@ -708,6 +730,7 @@ operator_length_standard (struct expression *expr, int endpos, case OP_LONG: case OP_DOUBLE: + case OP_DECFLOAT: case OP_VAR_VALUE: oplen = 4; break;