From: Thiago Jung Bauermann Date: Fri, 4 Mar 2011 20:07:22 +0000 (+0000) Subject: * eval.c (parse_and_eval_address_1): Remove function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63ffa6eea3815c2bbe36bf4df525315bc1c1b18f;p=binutils-gdb.git * eval.c (parse_and_eval_address_1): Remove function. * linespec.c (decode_indirect): Call parse_to_comma_and_eval instead of parse_and_eval_address_1. * value.h (parse_and_eval_address_1): Remove prototype. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 46f35ee1642..f2508294abd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2011-03-04 Thiago Jung Bauermann + + * eval.c (parse_and_eval_address_1): Remove function. + * linespec.c (decode_indirect): Call parse_to_comma_and_eval + instead of parse_and_eval_address_1. + * value.h (parse_and_eval_address_1): Remove prototype. + 2011-03-04 Michael Snyder * remote.c (putpkt_binary): Document that case stmt falls through. diff --git a/gdb/eval.c b/gdb/eval.c index 4db0466a3f4..09b41a0fbc2 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -93,22 +93,6 @@ parse_and_eval_address (char *exp) return addr; } -/* Like parse_and_eval_address but takes a pointer to a char * variable - and advanced that variable across the characters parsed. */ - -CORE_ADDR -parse_and_eval_address_1 (char **expptr) -{ - struct expression *expr = parse_exp_1 (expptr, (struct block *) 0, 0); - CORE_ADDR addr; - struct cleanup *old_chain = - make_cleanup (free_current_contents, &expr); - - addr = value_as_address (evaluate_expression (expr)); - do_cleanups (old_chain); - return addr; -} - /* Like parse_and_eval_address, but treats the value of the expression as an integer, not an address, returns a LONGEST, not a CORE_ADDR. */ LONGEST diff --git a/gdb/linespec.c b/gdb/linespec.c index 5979c16feb4..68859a8457d 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -980,7 +980,7 @@ decode_indirect (char **argptr) CORE_ADDR pc; (*argptr)++; - pc = parse_and_eval_address_1 (argptr); + pc = value_as_address (parse_to_comma_and_eval (argptr)); values.sals = (struct symtab_and_line *) xmalloc (sizeof (struct symtab_and_line)); diff --git a/gdb/value.h b/gdb/value.h index ad90a38f5ca..0889cefc6b1 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -662,8 +662,6 @@ extern struct type *parse_and_eval_type (char *p, int length); extern CORE_ADDR parse_and_eval_address (char *exp); -extern CORE_ADDR parse_and_eval_address_1 (char **expptr); - extern LONGEST parse_and_eval_long (char *exp); extern void unop_promote (const struct language_defn *language,